There are two types of compounds: molecular and ionic compounds. For molecular compounds, a molecular formula represents the number and kinds of atoms in the molecule. The molecular formula also tells us the lowest whole number ratio between the atoms in the compound. For example, water is represented by the formula H2O. This formula indicates that in every water molecule, there are two hydrogen atoms for each oxygen atom.
For ionic compounds, a formula represents the lowest whole number ratio between the ions in the ionic compound. For example, the formula MgCl2 .indicates that there are two chlorine ions for every one magnesium ion.
– In general, the formula of a compound contains the symbols of all the elements in the compound.
The number of atoms of each kind is indicated by a subscript written after the symbol. However, the number 1 is not needed as a subscript.
If there are polyatomic ions in the compounds, parentheses are placed around the group, and the number of units of the group is indicated by a subscript. For example, in the formula Ca(OH)2 the subscript 2 indicates that there are 2 hydroxide (OH) groups.