Carbon dioxide is the gas you breathe out and plants take in. Carbon monoxide is a colourless, odourless gas that can kill, which is why Ontario homes with fuel-burning appliances or an attached garage must have carbon monoxide alarms. The only difference between them is one oxygen atom: versus . A chemical formula is a short code that tells you exactly which elements are in a compound and how many atoms of each. Reading formulas correctly matters, in a lab, a pharmacy or a factory.
A formula is written with element symbols. A subscript, the small number written below and after a symbol, tells how many atoms of that element there are. No subscript means 1. In there are 2 hydrogen atoms and 1 oxygen atom. A subscript after a bracket multiplies everything inside the bracket. A coefficient, a full-size number in front of a formula, tells how many of that whole unit there are: means three water molecules.
| Formula | Atoms of each element | Total atoms |
|---|---|---|
| H₂O | H 2, O 1 | 3 |
| CO₂ | C 1, O 2 | 3 |
| NH₃ | N 1, H 3 | 4 |
| CaCO₃ | Ca 1, C 1, O 3 | 5 |
| C₆H₁₂O₆ | C 6, H 12, O 6 | 24 |
| Mg(OH)₂ | Mg 1, O 2, H 2 | 5 |
| 2 H₂O | H 4, O 2 | 6 |
Ionic and molecular compounds
An ionic compound usually forms when a metal reacts with a non-metal. The metal atoms give electrons to the non-metal atoms, making positive and negative ions that attract each other strongly. The ions stack into a huge, repeating three-dimensional pattern called a crystal lattice. Because there are no separate molecules, the formula shows the ratio of ions: NaCl means one sodium ion for every chloride ion. The strong attractions give ionic compounds high melting points (table salt melts at 801 °C). They do not conduct electricity as solids, but when they dissolve in water or melt, the ions are free to move and the liquid conducts.
A molecular compound forms when non-metal atoms share electrons instead of transferring them. The shared electrons hold the atoms together in a molecule, a separate group of atoms joined together. The formula tells you exactly how many atoms are in one molecule: one water molecule is 2 hydrogen atoms and 1 oxygen atom. The attractions between separate molecules are weak, so molecular compounds usually have low melting and boiling points, and many are liquids or gases at room temperature. They usually do not conduct electricity, even when dissolved, because they do not form ions.
Why ionic formulas have those numbers
In an ionic compound the positive and negative charges must cancel out to zero. Magnesium loses 2 electrons to become , but a chlorine atom can take only 1 electron to become . So two chloride ions are needed for each magnesium ion, and the formula is : (+2) + 2 × (−1) = 0. To name a simple ionic compound, write the metal's name, then the non-metal's name with its ending changed to -ide: sodium chloride, magnesium chloride, calcium oxide, potassium iodide.
| Name | Formula | Type | Where you meet it |
|---|---|---|---|
| Water | H₂O | Molecular | Everywhere: drinking water, oceans, your cells |
| Carbon dioxide | CO₂ | Molecular | Breathed out; fizz in soft drinks; a greenhouse gas |
| Methane | CH₄ | Molecular | Natural gas for furnaces and stoves |
| Sucrose (table sugar) | C₁₂H₂₂O₁₁ | Molecular | Sweetening food |
| Ammonia | NH₃ | Molecular | Glass cleaners and fertilizers |
| Sodium chloride | NaCl | Ionic | Table salt and road salt |
| Calcium chloride | CaCl₂ | Ionic | Road salt that works in colder weather |
| Calcium carbonate | CaCO₃ | Ionic | Chalk, limestone, eggshells and antacid tablets |
| Sodium hydrogen carbonate (baking soda) | NaHCO₃ | Ionic | Baking and cleaning |