The different ways of expressing the chemical formula comes from the different conventions for showing the physical structure of the molecule via the formula.