Here's why:
* Potassium has one valence electron and tends to lose it to achieve a stable electron configuration. This creates a positively charged potassium ion (K+).
* Oxygen has six valence electrons and tends to gain two electrons to achieve a stable electron configuration. This creates a negatively charged oxide ion (O2-).
* The electrostatic attraction between the oppositely charged ions (K+ and O2-) forms the ionic bond.
Therefore, the compound formed between potassium and oxygen is potassium oxide (K2O), held together by ionic bonds.