Each magnesium atom has two valence electrons. Valence electrons obtain their name from their location within an atom. These electrons are located within the outer layer of an atom.
The valence electrons serve a specific purpose. These electrons are involved in what is called the ionization of an element. In other words, when it comes to the functioning of atoms generally, and the magnesium atom specifically, valence electrons permit atoms the ability to bind or combine with other atoms. Magnesium is the eighth most abundant metal found on the Earth. Magnesium is the eleventh most abundant element found within the human body.