First, sodium only has one loosely held electron in its 3s orbital, while magnesium has two, so it is much easier to give up their electrons to reach a full shell. Second, the ionization energies of the electrons is lower in sodium than magnesium. In order to strip the electron from sodium, 495.8 kJ per mol^-1 while the total of the ionization energies for the two electrons in magensium is 2188.4 It is easier for 4.413876563 atoms of sodium to lose their electrons than it is for one atom of magnesium to lose theirs.