They are formulas used to represent the composition of a compound. The empirical formula represents the simplest whole-number ratio of atoms in a compound, while the molecular formula specifies the actual numbers of atoms of each element in a molecule.