Here's why:
* Magnesium (Mg) is in group 2 of the periodic table, meaning it has a +2 charge as an ion (Mg²⁺).
* Chlorine (Cl) is in group 17 of the periodic table, meaning it has a -1 charge as an ion (Cl⁻).
To balance the charges, you need two chlorine ions (2 x -1 = -2) to match the +2 charge of the magnesium ion.