* 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 the oxygen anion attract each other strongly, forming an ionic bond. This attraction results in the formation of the compound calcium oxide (CaO).