Draw an electron dot diagram to show the formation of each of the following compounds:
[H = 1, C = 6, Mg = 12, Cl = 17]
Magnesium atom loses 2 electrons to attain a stable electronic configuration and becomes a cation.
A non-metallic atom like chlorine gains 1 electron to attain a stable electronic configuration and becomes an anion.
Cations and anions are oppositely charged particles which attract one another to form an electrovalent bond leading to the formation of an electrovalent compound
Here magnesium donates one electron each with two chlorine atoms resulting in the formation of magnesium chloride.