Here's why:
* Magnesium (Mg) has a +2 charge (Mg²⁺).
* Chlorine (Cl) has a -1 charge (Cl⁻).
To achieve a neutral compound, the positive and negative charges must balance. Since magnesium has a +2 charge, we need two chloride ions (each with a -1 charge) to make the total charge zero:
+2 (Mg²⁺) + 2 × (-1) (Cl⁻) = 0
This is why the formula for magnesium chloride is MgCl₂.