The chemical formula of a chemical is a way of expressing information about the atoms that the chemical consists of. It may also supply limited information about the types of bonding in the chemical, but does not discuss types of isomerism.
The formula will identify all the atoms making up the chemical, and their number and relative order. The atom are identified using their chemical symbol. For example methane, a simple molecule consisting of one carbon atom bonded to four hydrogen atoms is given the chemical formula of CH4. Note that the number of atoms of hydrogen are in sub-text.
A slightly more complex molecule, ethane, consists of two carbon atoms bonded singly to each-other, and each having three hydrogen atoms bonded to them. The chemical formula for this molecule is CH3CH3. If there was a double bond between the carbon atoms (and thus each carbon only had two hydrogens), the chemical formula may be written thus: CH2CH2, and the fact that there is a double bond between the carbons is assumed. However, a more explicit and correct method is to write H2C:CH2. The two dots indicate that there is a double bond between the atoms that are either side of them.
A triple bond may be expressed with three dots, and in the case where there may be ambiguity, a single dot may be used to indicate a single bond.
Molecules with multiple functional groups that are the same may be expressed in the following way: (CH3)3CH. Note however that this implies a different structure from other molecules that can be formed using the same atoms (isomers). The formula (CH3)3CH, implies a chain of three carbon atoms, with the middle carbon atom bonded to another carbon:
with the remaining bonds on the carbons all bonded to hydrogen molecules. However the same number of atoms (10 hydrogens and 4 carbons) may be used to make a straight chain: CH3CH2CH2CH3.
In the case of polymers, brackets are placed around the repeating unit. For example, in the case of polythene: CH3(CH2)50CH3, would indicate a molecule of polythene with 50 repeating units. If the number of repeating units is unknown or variable, the letter n may be used to indicate this: CH3(CH2)nCH3.
In the case of ions, the charge on a particular atom may be denoted in superscript. For example Na+, or Cu2+. The total charge of a molecule may also be shown in this way. For example H3O+