* Calcium (Ca) is a metal and tends to lose two electrons to achieve a stable electron configuration. This makes it a cation with a +2 charge (Ca²⁺).
* Oxygen (O) is a nonmetal and tends to gain two electrons to achieve a stable electron configuration. This makes it an anion with a -2 charge (O²⁻).
The opposite charges of the calcium cation and oxygen anion attract each other strongly, forming an electrostatic attraction known as an ionic bond. This results in the formation of the ionic compound calcium oxide (CaO).