Expressions, formulae & change of subject · Lesson 1 of 3

Substituting and expanding

Letters stand for numbers: put numbers in carefully, collect like terms, multiply out brackets without losing a term or a sign, and read function notation.

20 minYou should already know: Number foundations & fractions
  1. 1
  2. 2
  3. 3

Algebra is arithmetic with some numbers written as letters. Every rule you know for numbers still holds. This lesson covers the three things you do with expressions all the time: substituting, collecting like terms and expanding brackets.

Substituting: put the numbers in

To find the value of an expression, replace each letter with its number, in brackets, then work it out in the usual order: brackets, powers, multiply and divide, then add and subtract.

For a=4a = 4 and b=−6b = -6:

(a−b)2=(4−(−6))2=102=100\begin{aligned} (a - b)^2 &= (4 - (-6))^2 \\ &= 10^2 = 100 \end{aligned}

Given a ratio instead of the numbers

Sometimes you’re told only m:n=3:2m : n = 3 : 2 (or mn=32\frac mn = \frac32), and asked for the value of an expression. You don’t know mm and nn, and you don’t need to. Write both in terms of one letter: m=3km = 3k and n=2kn = 2k. When every term has the same power of the letters, kk cancels:

mnkkkkkm = 3kn = 2k
One block sizem : n = 3 : 2 means m = 3k and n = 2k
m2+n2m2−n2=9k2+4k29k2−4k2=13k25k2=135\frac{m^2 + n^2}{m^2 - n^2} = \frac{9k^2 + 4k^2}{9k^2 - 4k^2} = \frac{13k^2}{5k^2} = \frac{13}{5}

If two ratios share a letter, such as pq\frac pq and qr\frac qr, write all three letters in terms of the shared one.

More: substituting numbers and ratios

Like terms

Like terms have exactly the same letters to the same powers: 3x3x and −5x-5x are like terms; 3x3x and 3x23x^2 are not; 2ab2ab and 5ba5ba are (the order of multiplying doesn’t matter). You can add or take away like terms, and only like terms:

4x+3y−x+2y=3x+5y4x + 3y - x + 2y = 3x + 5y

Writing an expression from words

Word problems often ask you to write the expression yourself. Name each quantity with its letter, then say the sentence in symbols one piece at a time. A worker paid rr naira an hour for 40 hours, and then 1121\frac12 times that rate for hh more hours, earns

40r+112rh=r(40+32h) naira40r + 1\tfrac12 rh = r\left(40 + \tfrac32 h\right) \text{ naira}

Test your expression with small numbers you can check in your head: with r=2r = 2 and h=2h = 2, that’s 80+6=8680 + 6 = 86 naira.

More: writing expressions from words

Expanding brackets

A number or letter in front of a bracket multiplies everything inside it: 3(2x−5)=6x−153(2x - 5) = 6x - 15, and −2(x−4)=−2x+8-2(x - 4) = -2x + 8 (a negative times a negative is positive).

Two brackets multiplied together need every term in the first to multiply every term in the second. The grid keeps track of all four products:

Expanding bracketsStep through the grid

(x + 3)(x + 2)

×x2
x??
3??
Every term in the first bracket multiplies every term in the second: four multiplications. Watch the signs: the sign in front of a number belongs to it.
cdabacadbcbdac + ad + bc + bd
Four productsEvery term of one bracket times every term of the other

Function notation

A function is a rule, written like f(x)=x2+1f(x) = x^2 + 1. The letter in the bracket is the input: f(3)f(3) means put 3 in place of xx everywhere in the rule. The input can be an expression too: f(x−2)f(x - 2) means put (x−2)(x - 2), in brackets, in place of every xx.

f(x) = x² + 1f(3) = 3² + 1 = 10f(x − 2) = (x − 2)² + 1
Whatever is in the bracketreplaces x everywhere in the rule

Sometimes the question runs the other way. If f(x+3)=x2−4xf(x + 3) = x^2 - 4x and you want f(5)f(5), choose xx so that the bracket is 5: x+3=5x + 3 = 5 gives x=2x = 2, then f(5)=22−4(2)=−4f(5) = 2^2 - 4(2) = -4.

The inverse function f−1f^{-1} undoes ff. Do the opposite steps in the reverse order, or write y=f(x)y = f(x) and make xx the subject: y=2x−5y = 2x - 5 gives x=y+52x = \frac{y + 5}{2}, so f−1(x)=x+52f^{-1}(x) = \frac{x + 5}{2}.

fx× 2− 52x − 5f⁻¹x+ 5÷ 2(x + 5) ÷ 2
The inverse machineUndo each step of f, last one first

More: function notation and inverses

A past question, step by step

Worked example · WAEC 2024

WAEC 2024 · Paper 1 · Q5

Simplify: (2p−q)2−(p+q)2(2p - q)^2 - (p + q)^2.

  1. Expand each square

    Multiply out each bracket squared, keeping both middle terms.

    (2p−q)2=4p2−4pq+q2(p+q)2=p2+2pq+q2\begin{aligned} (2p - q)^2 &= 4p^2 - 4pq + q^2 \\ (p + q)^2 &= p^2 + 2pq + q^2 \end{aligned}

    Think first. What do you get for (2p−q)2(2p - q)^2 and for (p+q)2(p + q)^2?

  2. Take away the whole of the second

    Put the second expansion in a bracket so the minus sign reaches every term:

    4p2−4pq+q2−(p2+2pq+q2)=4p2−4pq+q2−p2−2pq−q2\begin{aligned} &4p^2 - 4pq + q^2 - (p^2 + 2pq + q^2) \\ &= 4p^2 - 4pq + q^2 - p^2 - 2pq - q^2 \end{aligned}

    Think first. The minus sign in front applies to every term of (p+q)2(p + q)^2. What are the signs after you take it away?

  3. Collect like terms

    =3p2−6pq= 3p^2 - 6pq
  4. Match the options

    The options are factorised, so take out the common factor 3p3p: 3p2−6pq=3p(p−2q)3p^2 - 6pq = 3p(p - 2q). The answer is A.

Your turn

WAEC 2022 · Paper 1 · Q10

If a=3a = 3 and b=−7b = -7, find the value of 5b+(a+b)2(a−b)2\dfrac{5b + (a + b)^2}{(a - b)^2}.

Worked solution (try it first)
  1. Put in a=3a = 3 and b=−7b = -7.
  2. The top is 5(−7)+(3−7)2=−35+165(-7) + (3 - 7)^2 = -35 + 16, which is −19-19.
  3. The bottom is (3−(−7))2=102=100(3 - (-7))^2 = 10^2 = 100.
  4. So the value is −19100=−0.19\dfrac{-19}{100} = -0.19, option C.

Report a problem with this question

More past questions like this