1. Determine the charges of the ions:
* Magnesium (Mg) is in Group 2 of the periodic table, so it forms a +2 ion (Mg²⁺).
* Fluorine (F) is in Group 17 (or 7A) of the periodic table, so it forms a -1 ion (F⁻).
2. Balance the charges:
* To have a neutral compound, the positive and negative charges must balance.
* You need two fluoride ions (2 x -1 = -2) to balance the +2 charge of the magnesium ion.
3. Write the formula:
* The formula for the ionic compound is MgF₂.