Get A+ with YaClass!
Register now to understand any school subject with ease and get great results on your exams!

Theory:

 Sodium chloride (\(NaCl\)):
 
Sodium holds an atomic number of \(11\) and an electronic configuration of \(2, 8, 1\). Thus, it has one electron more than the nearest stable noble gas electronic configuration, Neon. As a result, sodium tends to lose one electron from its outermost shell and obtain a stable electronic configuration, resulting in a sodium cation (\(Na^+\)).
 
11.png
Ionic bond formation in sodium chloride
 
Chlorine holds an atomic number of \(17\) and an electronic configuration of \(2, 8, 7\). It has one lower electron than the closest stable noble gas electrical configuration - Argon. As a result, chlorine tends to gain one electron to achieve a stable electronic configuration, resulting in the formation of the chloride anion (\(Cl^-\)).
 
nacl.jpg
Ionic bond formation in sodium chlorine
  
When a sodium atom joins with a chlorine atom, one electron is transferred from the sodium atom to the chlorine atom, resulting in a sodium chloride molecule.Thus, both atoms have a stable octet electronic configuration.
  
Magnesium chloride(\(MgCl_2\)):
 
Magnesium holds an atomic number of \(12\), and its electronic configuration is \(2, 8, 2\). Thus, it has two more electrons than the closest stable electronic configuration of a noble gas, Neon. As a result, magnesium tends to lose two electrons from its outermost shell and obtains a stable electronic configuration, resulting in magnesium cation (\(Mg^2{^+}\)).
 
9.png
Ionic bond formation in Magnesium chloride
  
When a magnesium atom joins two chlorine atoms, two electrons are transferred from the magnesium to the chlorine, resulting in a magnesium chloride molecule. Thus, both atoms have a stable octet electronic configuration.