Working out a formula
Ionic compounds contain ions. You can work out the formula of an ionic compound if you know which ions are in it. Ionic compounds are electrically neutral because they contain equal numbers of positive and negative charges. In sodium chloride, one Na+ ion is needed for every Cl- ion, so its formula is NaCl.
Many ionic compounds have ions with different numbers of charges. For example, aluminium oxide contains ions and ions. Two ions give a total of six positive charges, and three ions give a total of six negative charges…