Chemical Formulae and Equations
Learn to write chemical formulae, balance equations, and calculate formula masses

The Language of Chemistry
Formulae, Equations, and Calculations
A chemical formula shows which elements are in a compound and how many atoms of each element are present. Subscript numbers indicate the number of atoms—for example, H₂O shows 2 hydrogen atoms bonded to 1 oxygen atom. When there's no subscript, it means there's just 1 atom.
Valency is the combining power of an element—the number of electrons it loses, gains, or shares when bonding. Knowing valencies helps you write correct formulae. Sodium has valency 1 (Na⁺), chlorine has valency 1 (Cl⁻), so sodium chloride is NaCl. Magnesium has valency 2 (Mg²⁺), so with chlorine it forms MgCl₂.
Polyatomic ions are groups of atoms that carry a charge, such as hydroxide (OH⁻), sulfate (SO₄²⁻), and nitrate (NO₃⁻). When writing formulae with these ions, use brackets if more than one is needed: Mg(OH)₂ shows two hydroxide ions bonded to one magnesium ion.
A chemical equation uses formulae to show reactants (starting materials) and products (substances formed). Reactants are written on the left, products on the right, with an arrow (→) showing the direction of the reaction.
Equations must be balanced so that the same number of each type of atom appears on both sides—this reflects the law of conservation of mass. Balance by adding coefficients (numbers in front of formulae), never by changing subscripts.
State symbols show the physical state of each substance: (s) for solid, (l) for liquid, (g) for gas, and (aq) for aqueous (dissolved in water). For example: 2Na(s) + 2H₂O(l) → 2NaOH(aq) + H₂(g).
The relative formula mass (Mr) is the sum of all relative atomic masses in a compound's formula. For CO₂: Mr = 12 + (16 × 2) = 44. For H₂SO₄: Mr = (1 × 2) + 32 + (16 × 4) = 98.
A mole is the amount of substance containing 6.02 × 10²³ particles (Avogadro's number). The mass of one mole of a substance in grams equals its relative formula mass. One mole of CO₂ has a mass of 44 g.
To convert between mass and moles: moles = mass ÷ Mr. For example, 22 g of CO₂ = 22 ÷ 44 = 0.5 moles. This is essential for stoichiometry—calculating amounts in reactions.
Equation 1 of 4
Chemical Formula
Click to reveal definition
Question:
Write a balanced equation for the reaction between magnesium and hydrochloric acid, including state symbols. Then calculate the mass of magnesium chloride produced from 2.4 g of magnesium. (Mg=24, Cl=35.5)
Solution:
Step 1 - Word equation: Magnesium + Hydrochloric acid → Magnesium chloride + Hydrogen
Step 2 - Write formulae: Mg + HCl → MgCl₂ + H₂
Step 3 - Balance: Mg + 2HCl → MgCl₂ + H₂
Step 4 - Add state symbols: Mg(s) + 2HCl(aq) → MgCl₂(aq) + H₂(g)
Step 5 - Calculate moles of Mg: moles = 2.4 ÷ 24 = 0.1 mol
Step 6 - Use ratio: 1:1 ratio, so moles of MgCl₂ = 0.1 mol
Step 7 - Calculate mass: Mr of MgCl₂ = 24 + (35.5 × 2) = 95
Mass = moles × Mr = 0.1 × 95 = 9.5 g
What is the chemical formula for water?