For example, in iron sulfide every iron atom is joined to one sulfur atom, so its formula is shown as FeS. In sodium oxide, there are two sodium atoms for every oxygen atom, so its formula is shown as Na2O. Notice that the ‘2’ is written as a subscript, so writing Na2O would be wrong.
This diagram shows that one carbon atom and two oxygen atoms combine to make up the units of carbon dioxide. Its chemical formula is written as CO2.
You may be required to use a key to draw your own diagram of a molecule, eg:
Using this key, the molecules SH2 and NH3 would be represented like this.
Sometimes you see more compound formulae such as Na2SO4 and Fe(OH)3: