Magnesium hydroxide and magnesium oxide both appear in the active ingredients of certain over-the-counter medications, particularly laxatives. They're very similar in structure and in function; in fact, in the presence of water, magnesium oxide actually turns into magnesium hydroxide. Because of this—and because there's plenty of water in the body—you can consider them interchangeable with regard to biological activity.
Magnesium hydroxide is an inorganic salt, which means it's not carbon based like the molecules of life, and it's made up of positively and negatively charged particles. The chemical formula is Mg(OH)2, where the magnesium particles are positively charged, and the OH particles—called hydroxide groups—are negatively charged. You'll often find magnesium hydroxide in the pharmacy as a liquid, though it's a solid if not mixed with water. Mixed with water, it's called milk of magnesia.
Uses of Magnesium Hydroxide
According to PubMed Health, magnesium hydroxide is most often used to relieve symptoms of acid stomach, and to help relieve constipation. It's a weak base, meaning it can react with acids, which are the chemical opposites of bases. If you have acid stomach or acid reflux, taking magnesium hydroxide helps because the compound neutralizes the excess acid and relieves symptoms. Because it's also a laxative, taking large quantities to treat acid stomach can give you diarrhea.
Magnesium oxide has a formula somewhat similar to that of magnesium hydroxide—it's MgO. When magnesium oxide reacts with water, which has the chemical formula H2O, the resulting compound is Mg(OH)2, or magnesium hydroxide. As such, you can have a suspension of magnesium hydroxide in water, but you can't have a suspension of magnesium oxide in water—it would simply turn into magnesium hydroxide. Magnesium oxide is a white powder.
Uses of Magnesium Oxide
Like magnesium hydroxide, magnesium oxide has applications as both an antacid and a laxative, explains PubMed Health. The powder naturally mixes with water in the stomach, forming magnesium hydroxide. There are other uses of magnesium oxide as well. Because it reacts with water, it tends to dry out anything it touches, so it's used as a desiccant—a chemical drying agent. Just as with magnesium hydroxide, using large quantities of magnesium oxide can give you diarrhea.