Let's assume we have 1 mole of potassium nitrate. Since each mole of potassium nitrate contains 1 mole of potassium, 1 mole of nitrogen, and 3 moles of oxygen, the relative proportions of these elements are:
Potassium: 1 mole
Nitrogen: 1 mole
Oxygen: 3 moles
Now, we need to find the simplest whole number ratio of these proportions. To do this, we divide each of the mole values by the smallest mole value, which is 1 mole:
Potassium: 1 mole / 1 mole = 1
Nitrogen: 1 mole / 1 mole = 1
Oxygen: 3 moles / 1 mole = 3
Therefore, the empirical formula of potassium nitrate is KNO3.