Magnesium has two valence electrons. Valence electrons determine the chemical properties of an atom. The periodic table of elements is used to find the number of valence electrons in an element.
The location and number of valence electrons in magnesium is written as 3s to the power of 2. Magnesium is in the second column, and subsequently the second group, of elements in the periodic table of elements. Each of the elements in this column have two valence electrons. These electrons are located in the outermost shell of an atom. The bonding characteristics of an atom are determined by its valence electrons.