Here's why:
* Cations are positively charged ions.
* Anions are negatively charged ions.
* Ionic compounds are formed by the electrostatic attraction between cations and anions.
In CaCl₂:
* Ca (calcium) is a metal and tends to lose electrons to form a positive ion, Ca²⁺.
* Cl (chlorine) is a nonmetal and tends to gain electrons to form a negative ion, Cl⁻.
The formula CaCl₂ indicates that there are two chloride ions (Cl⁻) for every one calcium ion (Ca²⁺) to balance the charges.