Magnesium oxide (MgO) has a 2:1 ratio of magnesium to oxygen ions, not a 1:1 ratio. In the crystal lattice of magnesium oxide, each magnesium ion is surrounded by six oxide ions, and each oxide ion is surrounded by six magnesium ions. This arrangement maximises the electrostatic attraction between the positive and negative ions and results in a very stable compound.