Here's why:
* Magnesium (Mg) is a Group 2 element, meaning it has a +2 charge when it forms ions.
* Iodine (I) is a Group 17 element, meaning it has a -1 charge when it forms ions.
To balance the charges and create a neutral compound, you need two iodine ions (2 x -1 = -2) to combine with one magnesium ion (+2).