* Magnesium (Mg) is in Group 2 of the periodic table, meaning it has a +2 charge when it forms an ion (Mg²⁺).
* Iodine (I) is in Group 17 of the periodic table, meaning it has a -1 charge when it forms an ion (I⁻).
To form a neutral compound, we need two iodine ions (2 x -1 = -2) to balance the +2 charge of the magnesium ion.