Compounds are pure substances that differ from elements, in that they contain more than one kind of atom. Compounds are formed when atoms join chemically. Compounds always obey the law of definite proportions. In any compound, the elements are always combined in the same proportions by mass.
E.g. H2O = Water
= 2g of Hydrogen, for every 16g of Oxygen
In many compounds the atoms are bound together in molecules. A molecule is a neutral group of atoms that act as a single unit. All molecules of an given compound are identical. Compounds composed of molecules are called molecular compounds. They tend to have low melting and boiling points.
Not all compounds are molecular compounds. Ionic compounds are composed of positive and negative ions. The ions are arranged in an orderly 3-D pattern. A formula unit is the lowest whole number ratio of ions in an ionic compound.
A chemical formula shows the numbers of atoms in the smallest representative unit of a compound, there are two types f chemical formulas.
A molecular formula shows the number and kinds of atoms present in a molecule or compound.
E.g. C6H12O6 (Sugar)
A formula unit shows the number of kinds of ions/atoms present in the smallest unit of an ionic compound e.g. MgSO4 (Magnesium Sulphate)