Here's why:
* Ionic bonds form when one atom (the metal) loses electrons to become a positively charged ion (cation) and another atom (the nonmetal) gains those electrons to become a negatively charged ion (anion).
* The charges of the ions within the compound balance each other out to create a neutral compound.
For example:
* Sodium chloride (NaCl): Sodium (Na) loses one electron to become Na+, while chlorine (Cl) gains one electron to become Cl-. The +1 charge of the sodium ion is balanced by the -1 charge of the chloride ion, resulting in a neutral compound.
* Magnesium oxide (MgO): Magnesium (Mg) loses two electrons to become Mg+2, while oxygen (O) gains two electrons to become O-2. The +2 charge of the magnesium ion is balanced by the -2 charge of the oxide ion.
Important Note: While the overall charge of an ionic compound is zero, individual ions within the compound do carry a charge.