Here's why:
* K (Potassium) is a metal and tends to lose one electron to form a +1 cation (K+).
* O (Oxygen) is a nonmetal and tends to gain two electrons to form a -2 anion (O2-).
* Ionic compounds are formed by the electrostatic attraction between positively charged cations and negatively charged anions.
In K2O, two potassium ions (K+) combine with one oxide ion (O2-) to achieve electrical neutrality.