Here are the essential concepts you must grasp in order to answer the question correctly.
Noble Gas Configuration
Noble gas configuration refers to the electron arrangement of noble gases, which have full outer electron shells, making them stable and unreactive. Atoms tend to lose, gain, or share electrons to achieve this stable configuration, typically resembling the nearest noble gas in the periodic table.
Recommended video:
The Electron Configuration
Electron Loss in Metals
Metals, such as magnesium, tend to lose electrons to achieve a stable electron configuration. The number of electrons lost corresponds to the number of valence electrons in the outer shell. For magnesium, which has two valence electrons, losing these electrons allows it to attain a noble gas configuration.
Recommended video:
Electron Configurations of Transition Metals
Periodic Table and Group Trends
The periodic table organizes elements by their atomic number and electron configuration. Elements in the same group exhibit similar chemical properties, including the number of valence electrons. Magnesium is in Group 2, indicating it typically loses two electrons to achieve the stable electron configuration of neon, the nearest noble gas.
Recommended video:
The most important parts of the periodic table for organic chemistry