Here's how it works:
* Potassium (K) is a metal in Group 1 of the periodic table, meaning it has a +1 charge when it forms an ion (K⁺).
* Oxygen (O) is a nonmetal in Group 16, meaning it has a -2 charge when it forms an ion (O²⁻).
To form a neutral compound, the charges must balance. This requires two potassium ions (2 × +1 = +2) to balance one oxygen ion (-2). Therefore, the formula for potassium oxide is K₂O.