Chemical formula is a symbolized representation of a chemical compound. It tells us the type of atom(s) (element) present in the compound and in what ratios. Atoms are indicated by their symbols as shown in the periodic table, and the number of atoms are indicated as subscripts. For example, the chemical formula for water is H2O, consists of two hydrogen atoms (H) and one oxygen atom (O).
A chemical formula may be written in two ways, as an empirical formula or a molecular formula. The empirical formula is commonly used for both ionic compounds (compounds formed by donation and reception of electrons by participating elements, e.g. NaCl (sodium chloride or common salt) and for covalent compounds (compounds formed by sharing of electrons by participating elements, (e.g. CH4, methane). Molecular formula is commonly used for covalent compounds (e.g., C2H6, ethane).
The empirical formula denotes the smallest possible ratio that corresponds to the actual ratio by atoms or formula unit. To construct an empirical formula for an ionic compound, one needs to write the symbol of cations (positively charged ions) first and then the anion (negatively charged ion). Then fulfill the valence requirement of each atom as well as the least possible ratio of atoms present in that compound (e.g., Al2O3 for aluminum oxide). For carbon containing compounds, one needs to write the carbon atom first, then hydrogen atom, followed by other atoms in alphabetical order (e.g., CHCl3 for chloroform).
The molecular formula denotes the actual number of different atoms present in one molecule of that compound. In some cases a compound's molecular formula is the same as its empirical formula (e.g., water H2O, ammonia NH3, methane/natural gas CH4) and in others it is an integral multiple of empirical formula (e.g., hydrogen peroxide, empirical formula is HO and molecular formula is H2O2, which is multiple of two of empirical formula). To construct the molecular formula, one needs to follow the steps as for writing empirical formulas, although the actual number of atoms not the smallest ratio is used. Molecular formulas provide the foundation of structure and the molecular weight of a molecule. Yet, it does not provide a complete picture of a molecule, especially for organic molecules. In almost all organic molecules, only part of the molecule (functional groups) participate in a chemical reaction. Also, for one molecular formula, it is possible to have several compounds or isomers (e.g., for C4H10, two compounds; butane and methyl propane) with totally different physical and chemical properties. Hence, organic chemists can use an expanded version of the molecular formula, called the structural formula.
A compound's structural formula consists of the actual number of atoms in the compound as well as showing where the chemical bonds are between them. It also provides information about length of chemical bond(s) and angle between chemical bonds. A structural formula has several representations: Lewis dot form, bond-line, stick bond notation, valence orbital notation, and projection form. Firstly, Lewis dot form is the simplest representation of communicating a chemical structure. In Lewis dot form, the atoms are represented by their corresponding symbols, and chemical bonds are represented by a pair of electrons or dots. Each chemical bond is represented by a pair of electrons. Thus single bond, double bond, and triple bonds are represented by two, four, and six dots, respectively. One can easily count the sharing (involved in chemical bond formation) and unsharing electrons (not involved in chemical bond formation). Secondly, "bond-line" notation is similar to Lewis dot form except the bonding electrons are replaced by line(s). Therefore, single, double, and triple bonds are represented by one, two, and three line(s) respectively. Thirdly, "stick-bond" notation is the condensed version of bond-line notation. Each end of a open chain with a single line or a line branching out from a open chain or from a closed cyclic structure represents one methyl (CH3) group. Each corner in an open chain or a cyclic structure represents a methylene (-CH2-) group. Functional groups such as alcohol (-OH), aldehyde (-CHO), acid (-COOH), amine (-NH2), ester (-COOR), etc. are represented by their actual atomic symbols. Fourthly, valence orbital notation, in addition to the above information, reveals the shape of orbital or distribution of electron density around atoms. Fifthly, structure of a compound can be represented in a projected form, because atoms in any molecule occupy space or possess three dimensional structure. Projected form can further be represented in wedge, sawhorse, Newman projection, ball and stick, space filling molecular model, and Fischer projection forms. All these projection forms additionally enable one to see the spatial relationship between atoms and rotation around the connecting chemical bonds. Conceptually, projection forms are an advanced level of learning, but they provide almost a complete insight into structure and properties of a molecule.