In the ionic compound magnesium oxide (MgO), magnesium (Mg^2+) donates two electrons from its 2.8.2 configuration, while oxygen (O^2-) gains two electrons, achieving a stable 2.8 configuration, resulting in a balanced, electrostatically bonded compound.
Magnesium, with an electronic configuration of 2.8.2, tends to lose its two valence electrons to achieve a stable, noble gas-like configuration (2.8). Oxygen, with an electronic configuration of 2.6, tends to gain two electrons to attain a stable, noble gas-like configuration (2.8).
In the formation of the ionic compound magnesium oxide (MgO), magnesium readily donates two electrons to oxygen. This results in magnesium (Mg^2+) having a stable electron configuration of 2.8 and oxygen (O^2-) achieving a stable configuration of 2.8. This electrostatic attraction between oppositely charged ions forms the ionic bond in magnesium oxide.