A chemical formula is a symbolic representation that indicates the elements in a compound and the ratio of atoms.