Here's why:
* Magnesium's electron configuration: Magnesium has 12 electrons, with the configuration 2-8-2. This means it has 2 electrons in its outermost shell (the 3rd shell).
* Full outer shell: A full outer shell for magnesium would be 8 electrons (like the noble gas neon).
* Losing electrons: Magnesium can achieve a full outer shell by losing its 2 outer electrons, leaving it with a stable configuration of 2-8.
This process of losing electrons makes magnesium a positively charged ion (Mg²⁺).