How to Write a Chemical Formula for a Compound

A chemical formula serves as a concise, standardized shorthand to represent the composition of a substance. It uses element symbols from the periodic table and numerical subscripts to show which elements are present and the relative count of atoms for each one. For instance, the formula H\(_{2}\)O instantly tells a chemist that a water molecule contains two atoms of hydrogen and one atom of oxygen. The construction of this formula depends on the type of chemical bond holding the elements together.

Constructing Formulas for Ionic Compounds

Ionic compounds form when atoms transfer electrons, typically between a metal and a nonmetal, creating positively charged ions (cations) and negatively charged ions (anions). The fundamental rule for writing an ionic formula is that the total positive charge must perfectly balance the total negative charge, resulting in a compound with a net electrical charge of zero. This need for charge neutrality guides the entire process of formula construction.

The most common method for determining the correct ratio of ions is the “crisscross method,” which begins by identifying the symbols and charges of the cation and the anion. The numerical value of the cation’s charge becomes the subscript for the anion, and the numerical value of the anion’s charge becomes the subscript for the cation. The signs of the charges are dropped in the final formula, and any subscript of one is omitted. For example, sodium chloride involves Na\(^+\) and Cl\(^-\), resulting in the formula NaCl.

When a compound contains a polyatomic ion, such as the hydroxide ion (OH\(^-\)), it acts as a single charged unit. If the formula requires more than one of these units to balance the charge, the polyatomic ion must be enclosed in parentheses before applying the subscript. For instance, magnesium hydroxide requires two OH\(^-\) ions for balance with Mg\(^{2+}\), leading to the formula Mg(OH)\(_{2}\).

Constructing Formulas for Covalent Compounds

Covalent compounds, also known as molecular compounds, are formed when two nonmetals share electrons to create a bond. The formula is derived directly from the Greek numerical prefixes used in the compound’s systematic name.

The prefixes indicate the count of atoms present for each element. For example, “di-” means two, “tri-” means three, and “tetra-” means four. To write the formula, identify the symbols for the two nonmetals and use the prefix number as the subscript. The name dinitrogen tetroxide translates directly to N\(_{2}\)O\(_{4}\), showing two nitrogen atoms and four oxygen atoms.

The prefix “mono-” is typically omitted for the first element in the name but is always used for the second element. For instance, carbon dioxide implies one carbon atom and two oxygen atoms, yielding the formula CO\(_{2}\).

Understanding Empirical vs. Molecular Formulas

Chemical formulas can be expressed in two primary ways that communicate different levels of detail about the compound’s composition. The molecular formula provides the exact number of atoms of each element present in a single molecule, such as the formula for glucose, C\(_{6}\)H\(_{12}\)O\(_{6}\).

In contrast, the empirical formula represents the simplest whole-number ratio of atoms in the compound. This is achieved by dividing the subscripts in the molecular formula by the greatest common factor. For the glucose molecular formula C\(_{6}\)H\(_{12}\)O\(_{6}\), the greatest common factor is six, which reduces the formula to the empirical form CH\(_{2}\)O.

For some compounds, such as water (H\(_{2}\)O), the molecular and empirical formulas are identical because the subscripts cannot be reduced further. However, for many others, like butane (C\(_{4}\)H\(_{10}\)), the molecular formula shows the real count, while the empirical formula (C\(_{2}\)H\(_{5}\)) only shows the simplest ratio.