* Ionic Compounds: These compounds form when a metal (like magnesium) loses electrons to become a positively charged cation and a nonmetal (like oxygen) gains electrons to become a negatively charged anion. The opposite charges attract, forming an ionic bond.
* Magnesium (Mg): It belongs to Group 2 (alkaline earth metals) and has a tendency to lose two electrons, forming a +2 cation (Mg²⁺).
* Oxygen (O): It belongs to Group 16 (chalcogens) and has a tendency to gain two electrons, forming a -2 anion (O²⁻).
* Formula Unit: The simplest whole-number ratio of ions in an ionic compound is represented by its formula unit. In MgO, one Mg²⁺ ion combines with one O²⁻ ion to achieve electrical neutrality.
Let me know if you have any more questions about ionic compounds or their formulas!