Here's how it's derived:
* Magnesium (Mg): Magnesium is a Group 2 element, meaning it forms a +2 ion (Mg²⁺).
* Bicarbonate (HCO₃): Bicarbonate is a polyatomic ion with a -1 charge (HCO₃⁻).
* Balancing charges: To balance the charges, we need two bicarbonate ions for every magnesium ion. This gives us the formula Mg(HCO₃)₂.