Most aquariums don't need magnesium. If your fish tank -- freshwater or salt -- features only fish, you needn't worry about this trace element. However, certain types of aquariums feature organisms that require magnesium to thrive. If you've moved on to advanced aquariums that feature plants or certain aquariums, you may have to supplement magnesium to keep your organisms healthy.
You have to worry about magnesium only if you keep organisms that use and deplete this mineral. Fish get most of the minerals they need from food. Even the most basic fish flakes have enough of this trace element for them. However, planted freshwater aquariums and marine reef tanks feature organisms that may require magnesium to survive. Both types of aquariums fall into the advanced category, since aquarium plants take a surprising amount of effort and corals are notorious for requiring exacting care.
Signs of Low Magnesium
Different organisms have different ways of showing that something's wrong. In general, plants will get soggy and soft to the touch if they lack trace elements like magnesium. Most aquarium plants have some crispness to them -- though exceptions exist. Know what's normal for your plants. Corals exhibit considerable diversity. However, as a general rule, corals glow more slowly than usual and may loose their color if they lack trace elements like magnesium. Again, you have to know what's normal for your species to know when something's wrong.
For freshwater aquariums, you may add magnesium for plants. Most commercially available aquarium fertilizers will contain trace elements like magnesium; you will rarely have to go out of your way to just add magnesium. For reef aquariums, salt mix contains all of the trace elements corals need to survive. However, if you have enough corals, they can use up all of the magnesium between water changes. Pet shops that cater to reef hobbyists will usually carry magnesium supplements. Always follow the manufacturer's recommendations for dosing.
In the freshwater aquarium, you never have to test for magnesium. If you have plants and fertilize them, you can consider the problem solved. However, in marine aquariums, water chemistry is more complicated; you need to monitor magnesium levels to make sure you're not overdosing. You should test for magnesium when you test for calcium. Aquarium Fish International Magazine recommends you test your calcium levels monthly or whenever you see signs of distress or slow growth in your corals.