CHEMISTRY · LESSON 06 OF 12
Writing formulas and naming compounds
Write formulas from ion charges and name ionic and molecular compounds so that the formula, the name and the charges always agree.
What this lesson explains
A name and a formula describe the same chemical composition in different ways. Decide first whether the substance is ionic or molecular; the naming rules depend on that choice. The aim is to account for both atom counts and electric charge.
Every calculation that follows — moles, reactions in solution, gases — starts from a correct formula. A wrong subscript gives a wrong molar mass and a wrong mole ratio.
Before you begin
Ion charges from the periodic table
Main-group metals lose electrons to reach a noble-gas configuration: group 1 → 1+, group 2 → 2+, Al → 3+. Non-metals gain electrons: group 17 → 1−, group 16 → 2−, N → 3− (see Periodic table and Chemical bonding).
Ionic versus molecular
A metal with a non-metal (or a polyatomic ion such as NH₄⁺) usually forms an ionic compound; two non-metals form a molecular compound.
The idea, made visible
Ionic compounds contain cations and anions in a ratio with total charge zero. Write the cation first. Use the lowest whole-number ratio of complete ions that gives neutrality; keep every polyatomic ion intact. Calcium Ca²⁺ and chloride Cl⁻ give CaCl₂. Calcium and nitrate NO₃⁻ give Ca(NO₃)₂: parentheses show two whole nitrate ions. Do not reduce the internal subscripts of an ion such as peroxide O₂²⁻.
For an ionic name, name the cation followed by the anion. A one-element anion ends in -ide: chloride, oxide, sulfide. A polyatomic ion keeps its established name: nitrate, sulfate, hydroxide. Metals with more than one common charge need a Roman numeral identifying the charge: iron(II) means Fe²⁺; iron(III) means Fe³⁺. The numeral is not an atom count. Metals with a usual fixed charge, such as sodium or calcium, ordinarily do not need it.
Binary molecular compounds made from two non-metals usually use prefixes to state atom counts: mono 1, di 2, tri 3, tetra 4, penta 5, hexa 6. The first element normally omits mono; the second ends in -ide and includes its prefix. Standard vowel contractions give monoxide and pentoxide. CO is carbon monoxide; CO₂ is carbon dioxide. A molecular formula is not reduced to its empirical ratio.
Names must also preserve the chemical context. HCl(g) is hydrogen chloride; HCl(aq) is hydrochloric acid. Common introductory oxyacid names follow the anion: nitrate → nitric acid, nitrite → nitrous acid, sulfate → sulfuric acid. These patterns supplement a table of known ions; they do not let you invent an unknown ion’s formula.
| Cation | Charge | Anion | Charge |
|---|---|---|---|
| sodium, Na⁺ | +1 | chloride, Cl⁻ | −1 |
| calcium, Ca²⁺ | +2 | nitrate, NO₃⁻ | −1 |
| aluminium, Al³⁺ | +3 | sulfate, SO₄²⁻ | −2 |
| ammonium, NH₄⁺ | +1 | carbonate, CO₃²⁻ | −2 |
| iron(II), Fe²⁺ | +2 | hydroxide, OH⁻ | −1 |
| iron(III), Fe³⁺ | +3 | phosphate, PO₄³⁻ | −3 |
The formulas and what they mean
| Symbol | Meaning | Unit |
|---|---|---|
| superscript charge | net ion charge; sign and magnitude | multiples of elementary charge |
| subscript | number of atoms or intact ion groups in a formula | count |
| Roman numeral | metal ion charge in an ionic name | positive integer |
| (aq), (s), (l), (g) | aqueous, solid, liquid and gas states | state labels |
Charge balance for an ionic formula
Σ (number of each ion × signed ion charge) = 0
Conditions and limits: For a neutral compound, not for an isolated charged ion.
Two-ion ratio
a qcation + b qanion = 0
Conditions and limits: a and b are positive whole numbers in the lowest ratio of intact ions. A polyatomic ion’s internal formula stays unchanged.
Charge from a known formula
metal charge = total negative charge magnitude / number of metal ions
Conditions and limits: Applies here when all metal ions have the same charge and the anion charge is known. Mixed-valence compounds require more information.
A first worked example
From name to formula and back
- Decide ionic or molecular.
- Ionic: write the cation and anion with their charges; choose the smallest numbers of each ion that make the total charge zero; keep polyatomic ions in parentheses when more than one is needed.
- Ionic name: cation name (with a Roman numeral for variable-charge metals) + anion name (-ide for single-element anions).
- Molecular: use prefixes for atom counts (omit mono- on the first element); do not reduce the formula.
Write a formula from two ionic charges
Problem. Write the formula and name for a compound containing Al³⁺ and SO₄²⁻.
Two Al³⁺ ions give +6; three SO₄²⁻ ions give −6.
The smallest common charge magnitude is 6.
Write Al₂(SO₄)₃.
Three sulfate groups require parentheses around the complete ion.
Name: aluminium sulfate.
Aluminium has its usual +3 charge; sulfate retains its ion name.
Result: Al₂(SO₄)₃, aluminium sulfate.
What it means: It contains two Al, three S and twelve O atoms per formula unit. AlSO₄ would carry a net +1 charge and is not the neutral formula.
A different case
Recover a metal charge from a formula
Problem. Name FeCl₂ and FeCl₃.
Each chloride is Cl⁻. In FeCl₂, two chlorides contribute −2, so Fe is +2.
The total must be zero.
In FeCl₃, three chlorides contribute −3, so Fe is +3.
The number of Fe ions is one in both formulas.
Use iron(II) chloride and iron(III) chloride.
The Roman numeral distinguishes two different metal-ion charges.
Result: FeCl₂: iron(II) chloride. FeCl₃: iron(III) chloride.
What it means: Iron trichloride can occur in other naming conventions, but the charge-based ionic convention used here clearly identifies Fe³⁺.
More worked cases
Each case below uses a different skill. Every step and result is shown.
Preserve a polyatomic cation
Problem. Write the formula of ammonium carbonate.
Ammonium is NH₄⁺; carbonate is CO₃²⁻.
Retrieve each complete ion and its charge.
Two ammonium ions balance one carbonate: 2(+1) + (−2) = 0.
Use the smallest neutral ratio of ions.
Write (NH₄)₂CO₃.
The outside 2 multiplies both N and H within ammonium.
Result: (NH₄)₂CO₃.
What it means: There are 2 N, 8 H, 1 C and 3 O atoms per formula unit. The subscript does not apply only to H.
Molecular prefixes preserve the actual formula
Problem. Name N₂O₄ and write the formula for carbon dioxide.
N₂O₄ has two N and four O atoms: dinitrogen tetroxide.
The prefix tetra contracts before oxide in the conventional name.
Carbon dioxide has one C and two O atoms: CO₂.
No mono is normally used for the first element.
Keep N₂O₄ as the molecular formula; NO₂ is its empirical formula.
Reducing the ratio loses the actual counts in one molecule.
Result: N₂O₄ is dinitrogen tetroxide; carbon dioxide is CO₂.
What it means: Use molecular prefixes for molecular composition, not instead of charge balance in ordinary ionic names.
An acid name depends on its state
Problem. Distinguish HCl(g), HCl(aq) and HNO₃(aq).
HCl(g) is hydrogen chloride; HCl(aq) is hydrochloric acid.
The aqueous acid name describes hydrogen chloride dissolved in water.
HNO₃(aq) is nitric acid; the associated anion is nitrate, NO₃⁻.
The common -ate to -ic acid pattern applies.
Result: Hydrogen chloride gas; hydrochloric acid solution; nitric acid solution.
What it means: A state label can change the appropriate name, so do not drop it when it conveys essential information.
Common misunderstandings
Misunderstanding: A Roman numeral gives the number of metal atoms.
Correct idea: It gives the charge of that metal ion in this convention.
Misunderstanding: Cross the charge numbers without checking.
Correct idea: Verify neutrality and reduce the ratio of complete ions. Keep the internal formula of polyatomic ions intact.
Misunderstanding: Reduce all molecular formulas.
Correct idea: A molecular formula states actual counts, even when a simpler empirical ratio exists.
Misunderstanding: Treat every formula containing only non-metals as molecular.
Correct idea: Ammonium salts contain the polyatomic cation NH₄⁺ and are ionic; identify the species first.
Keep in mind
- Σ (number of each ion × signed ion charge) = 0Charge balance for an ionic formula
- a qcation + b qanion = 0Two-ion ratio
- metal charge = total negative charge magnitude / number of metal ionsCharge from a known formula
Scope of this lesson
- Organic nomenclature and complex-ion names are outside Semester 1.
Next: Moles, molar mass and chemical formulas. The mole links the particles in a formula to the grams on a balance: n = m/M and N = nNA. Formulas give atom ratios, percentage composition and empirical formulas.
Further reading: OpenStax Chemistry 2e — Chemical nomenclature. Sources and credits.