Final answer:
Magnesium forms a cation with a 2+ charge when it loses two electrons, symbolized as Mg2+.
Step-by-step explanation:
The metal magnesium will form a cation with a charge of 2+. This occurs because magnesium, a group 2 element in the periodic table, must lose two electrons to achieve the electron configuration of the previous noble gas, neon. When magnesium loses these two electrons, it creates a positively charged ion with a charge of +2, symbolized as Mg2+. Hence, in chemical reactions, such as with nitrogen or chlorine, it forms ionic compounds like magnesium nitride or magnesium chloride, respectively. While magnesium forms a cation, nonmetals typically form negatively charged ions (anions), such as nitrogen forming an anion with a 3- charge, represented as N3-.