* Magnesium (Mg) is a metal and tends to lose two electrons to become a positively charged ion (Mg²⁺).
* Chlorine (Cl) is a nonmetal and tends to gain one electron to become a negatively charged ion (Cl⁻).
To form a neutral compound, two chloride ions (each with a -1 charge) are needed to balance the +2 charge of the magnesium ion. This results in the formula MgCl₂.
Therefore, magnesium chloride forms one ionic bond between the magnesium ion and each of the two chloride ions.