Here's how we arrive at that:
* Mg represents the element Magnesium.
* I represents the element Iodine.
* The subscript '2' indicates that there are two iodine ions for every magnesium ion.
In naming ionic compounds, we use the following rules:
1. The name of the metal (cation) comes first.
2. The name of the nonmetal (anion) comes second, with the ending changed to "-ide".
Therefore, the name of MgI₂ is Magnesium Iodide.