J.R. S. answered 10/13/18
Ph.D. in Biochemistry--University Professor--Chemistry Tutor
Sodium (Na) is in group 1 and has 1 valence electron. It will form a monovalent cation, Na^+, but not Na^2+ as that would not be stable.
Magnesium is in group 2 and has 2 valence electrons. Itvwill form a divalent cation, Mg^2+, but not Mg^3+ as that would not be stable.