Sodium is a chemical element and present in the first group of periodic table. Magnesium is also an element and present in the second group of periodic table. Sodium is an alkali metal and magnesium is an alkaline metal. Magnesium reacts with sodium chloride to yield magnesium chloride and sodium metal.
NaCl ------ > Na+1 + Cl-1
Mg ------ > Mg+2 + 2e-1
2Na+1 + 2e-1------ > 2Na
The balanced chemical equation for the reaction is;
Mg + 2NaCl ------ > MgCl2 + 2Na
NaCl ------ > Na+1 + Cl-1
Mg ------ > Mg+2 + 2e-1
2Na+1 + 2e-1------ > 2Na
The balanced chemical equation for the reaction is;
Mg + 2NaCl ------ > MgCl2 + 2Na