Skip to content
Study Hall
Lesson 7 of 8The Nature of Matter
Unit 3 · Lesson 7 of 8

Compounds and Chemical Formulas

What a chemical formula tells you, how to count the atoms in a formula (including coefficients and brackets), how ionic and molecular compounds differ, and why simple ionic compounds have the formulas they do.

4 min read9 practice questionsAsk AI about this →

Key things to remember

  1. 1A subscript gives the number of atoms of the element just before it; no subscript means 1.
  2. 2A subscript after a bracket multiplies everything inside; a coefficient multiplies the whole formula.
  3. 3Ionic compounds: usually a metal and a non-metal; electrons transferred; crystal lattice; high melting point; conduct when dissolved or melted.
  4. 4Molecular compounds: non-metals only; electrons shared; separate molecules; lower melting points; usually poor conductors.
  5. 5In an ionic compound the ion charges add to zero, which sets the ratio: and give .

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.

Counting atoms: multiply inside the bracket by the subscript, then multiply everything by the coefficient.
FormulaAtoms of each elementTotal atoms
H₂OH 2, O 13
CO₂C 1, O 23
NH₃N 1, H 34
CaCO₃Ca 1, C 1, O 35
C₆H₁₂O₆C 6, H 12, O 624
Mg(OH)₂Mg 1, O 2, H 25
2 H₂OH 4, O 26
Counting atoms in some formulas. The last row has a coefficient of 2, so every atom is doubled.

Ionic and molecular compounds

Ionic compounda metal + a non-metalMolecular compoundnon-metals onlyNae⁻ClNa⁺Cl⁻Na gives 1 electron to Cl, making ionsNa⁺Cl⁻Na⁺Cl⁻Na⁺Cl⁻Na⁺Cl⁻Na⁺Cl⁻Na⁺Cl⁻Na⁺Cl⁻Na⁺NaCl: a lattice of + and − ionsOHHH₂O (water)OOCCO₂ (carbon dioxide)dots = pairs of shared electronswater: many separate moleculesElectronstransferredParticlesions in a latticeMelting pointhigh (NaCl: 801 °C)Conducts?when melted or dissolvedExamplesNaCl, MgO, CaCl₂ElectronssharedParticlesseparate moleculesMelting pointlower (H₂O: 0 °C)Conducts?usually poor conductorsExamplesH₂O, CO₂, CH₄, sugar
Fig 1Ionic compounds (a metal and a non-metal; electrons are transferred; sodium chloride forms a lattice of ions; high melting point; conducts when dissolved) compared with molecular compounds (non-metals only; electrons are shared; water and carbon dioxide molecules; lower melting point; usually poor conductors).

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.

Elements that come in pairs
Seven elements exist as two-atom molecules: hydrogen, nitrogen, oxygen, fluorine, chlorine, bromine and iodine (, , , , , , ). They are called diatomic. Each molecule has only one kind of atom, so they are elements, not compounds.
NameFormulaTypeWhere you meet it
WaterH₂OMolecularEverywhere: drinking water, oceans, your cells
Carbon dioxideCO₂MolecularBreathed out; fizz in soft drinks; a greenhouse gas
MethaneCH₄MolecularNatural gas for furnaces and stoves
Sucrose (table sugar)C₁₂H₂₂O₁₁MolecularSweetening food
AmmoniaNH₃MolecularGlass cleaners and fertilizers
Sodium chlorideNaClIonicTable salt and road salt
Calcium chlorideCaCl₂IonicRoad salt that works in colder weather
Calcium carbonateCaCO₃IonicChalk, limestone, eggshells and antacid tablets
Sodium hydrogen carbonate (baking soda)NaHCO₃IonicBaking and cleaning
Some common compounds. Compounds of a metal with non-metals are usually ionic; compounds of only non-metals are usually molecular.
Formulas on the job
Pharmacists check the formulas and doses of medicines, because molecules that differ by a single atom can act very differently in the body. Chemical technicians test products in quality-control labs to make sure each batch has the right compounds in the right amounts.

Worked examples

Reveal one step at a time and try to beat it to the next line.

Example 1
How many atoms of each element, and how many atoms in total, are in one molecule of glucose, ?
Example 2
Count the atoms of each element and the total in .
Example 3
Classify each compound as ionic or molecular: (a) KCl, (b) , (c) .
Example 4
Calcium and chlorine form an ionic compound. Work out its formula and name.

Where marks get lost

  • Applying a subscript to the wrong element. In the 2 belongs to oxygen only: 1 carbon and 2 oxygen atoms.
  • Forgetting the bracket. In the 2 doubles both O and H, so there are 2 hydrogen atoms, not 1.
  • Forgetting to multiply by the coefficient. has 4 hydrogen atoms and 2 oxygen atoms, not 2 and 1.
  • Calling or a compound. They have two atoms of the same element, so they are elements.
  • Thinking an ionic formula like NaCl shows one molecule. Ionic compounds form a lattice of ions; the formula shows only the ratio.

Flashcards 8

Chemical formula
Subscript
Coefficient
Ionic compound
+ 4 more

Practice

1
How many atoms in total are in one molecule of table sugar, ?
atoms
2
How many oxygen atoms are in ?
oxygen atoms
3
How many hydrogen atoms are in ?
hydrogen atoms
4
What does the 2 in tell you?
5
Which compound is ionic?
6
Magnesium forms ions and oxygen forms ions. What is the formula of magnesium oxide?
7
Match each property to the type of compound it describes best.
Melts at 801 °C and conducts when dissolved in water
Made of separate molecules held together by shared electrons
Two atoms of the same element joined together
8
Name the ionic compound formed from potassium and iodine.
9
Why does a solution of table salt in water conduct electricity, while a solution of sugar does not?

Spot a mistake on this page? Let us know