Potassium nitrate is an ionic compound, meaning it is composed of positively and negatively charged ions. In this case, the potassium ion (K+) is positively charged, while the nitrate ion (NO3-) is negatively charged. The attraction between these oppositely charged ions holds the compound together.