Here's why:
* Noble gas configuration: Noble gases are the elements in Group 18 of the periodic table. They are very stable because they have a full outer shell of electrons. For example, Neon (Ne) has the configuration 2, 8.
* Magnesium's configuration: Magnesium only has two electrons in its outer shell.
* Losing electrons: By losing its two outer electrons, Magnesium will achieve the same electron configuration as Neon, which is a stable configuration.
When Magnesium loses these two electrons, it forms a magnesium ion (Mg²⁺). This ion has a +2 charge because it has lost two negatively charged electrons.
Let me know if you have any more questions!