Home / IGCSE Mathematics 0580 / Algebraic manipulation
Cambridge IGCSE Mathematics 0580 · Algebra and graphs

Algebraic manipulation

Collecting like terms, expanding brackets (one, two and, for Extended, three), factorising by taking out common factors, and for Extended students the other kinds of factorising (grouping, the difference of two squares, perfect squares, quadratics and cubics with a common factor) and completing the square.

C2.2E2.2Core and ExtendedFree lesson
What the syllabus says

C2.2 (Core)

  • 1 Simplify expressions by collecting like terms.
  • 2 Expand products of algebraic expressions.
  • 3 Factorise by extracting common factors.

Notes and examples

  • Simplify means give the answer in its simplest form, e.g. 2a+3b+5a−9b=7a−6b.
  • e.g. expand 3x(2x−4y).
  • Includes products of two brackets involving one variable, e.g. expand (2x+1)(x−4).
  • Factorise means factorise fully, e.g. 9x2+15xy=3x(3x+5y).

E2.2 (Extended)

  • 1 Simplify expressions by collecting like terms.
  • 2 Expand products of algebraic expressions.
  • 3 Factorise by extracting common factors.
  • 4 Factorise expressions of the form:
  • ax+bx+kay+kby
  • a2x2−b2y2
  • a2+2ab+b2
  • ax2+bx+c
  • ax3+bx2+cx.
  • 5 Complete the square for expressions in the form ax2+bx+c.

Notes and examples

  • Simplify means give the answer in its simplest form, e.g. 2a2+3ab−1+5a2−9ab+4=7a2−6ab+3.
  • e.g. expand 3x(2x−4y), (3x+y)(x−4y).
  • Includes products of more than two brackets, e.g. expand (x−2)(x+3)(2x+1).
  • Factorise means factorise fully, e.g. 9x2+15xy=3x(3x+5y).

Quoted from the Cambridge IGCSE Mathematics 0580 syllabus for 2025 to 2027.

Collecting like terms

Like terms have exactly the same letters raised to exactly the same powers. 5a and −2a are like terms; so are 3xy and 7yx, because xy and yx are the same product. But 4x and 4x2 are not like terms, and nor are 2a and 2b.

To simplify an expression, add or subtract the numbers in front of like terms (the coefficients) and leave the letters alone. Each term carries the sign in front of it, so it helps to underline or ring the terms with their signs before you start.

2a+3b+5a−9b=(2a+5a)+(3b−9b)=7a−6b

Why is this allowed? Because 2a+5a means 2 lots of a and 5 more lots of a, which is 7 lots of a, whatever number a is. Unlike terms cannot be combined in this way: 7 lots of a and −6 lots of b do not make 1ab or anything like it, so 7a−6b is as simple as it gets.

"Simplify" means give the answer in its simplest form: every set of like terms collected into one.

Collecting terms with powers Extended

Extended questions mix terms such as a2, ab and plain numbers. The rule is the same: only identical letter parts combine.

2a2+3ab−1+5a2−9ab+4=7a2−6ab+3

Here 2a2+5a2=7a2, 3ab−9ab=−6ab and −1+4=3. A useful order for the answer is highest power first, then the mixed terms, then the number.

Worked example 1

Simplify (a) 6x−4y−2x+9y (b) 5m+3−8m−7.

  1. (a) x terms: 6x−2x=4x. y terms: −4y+9y=5y. Answer: 4x+5y.

  2. (b) m terms: 5m−8m=−3m. Numbers: 3−7=−4. Answer: −3m−4.

  3. In (b) the sign belongs to the term after it: the −8m and the −7 are both negative.

Answer: (a) 4x+5y (b) −3m−4

Expanding a single bracket

To expand a bracket means to multiply it out so that there are no brackets left. Multiply every term inside by the term outside:

3x(2x−4y)=3x×2x+3x×(−4y)=6x2−12xy

This works because of how multiplication spreads over addition. Think of a rectangle 3x wide and (2x−4y) long, split into two pieces: the total area is the sum of the two pieces. In numbers, 3×47=3×40+3×7: the same idea.

Take care with signs when the term outside is negative. −2(x−5)=−2x+10, because −2×−5=+10. A common case is a subtraction in front of a bracket: 7−(x−3) means 7−1(x−3)=7−x+3=10−x.

"Expand and simplify" means expand every bracket and then collect like terms:

3(2a−5)−4(a−2)=6a−15−4a+8=2a−7

Expanding two brackets

To expand (2x+1)(x−4), every term in the first bracket multiplies every term in the second. That gives four products:

(2x+1)(x−4)=2x×x+2x×(−4)+1×x+1×(−4)
=2x2−8x+x−4=2x2−7x−4

A grid, like the one at the end of this section, keeps it organised and shows why there are always four products before simplifying: the terms of one bracket label the rows, the terms of the other label the columns, and each cell is a product. Add the four cells and collect the two x terms.

You can check any expansion by substituting a number: with x=1, (2+1)(1−4)=−9 and 2−7−4=−9.

Squaring a bracket is a product of two brackets. (x−5)2 means (x−5)(x−5)=x2−5x−5x+25=x2−10x+25. It is never just x2+25: the two middle terms are always there.

Grid for (2x+1)(x−4)
×x−4
2x2x2−8x
1x−4

Worked example 2

Expand and simplify (a) (3x−2)(x+5) (b) (x−4)2.

  1. (a) 3x×x=3x2, 3x×5=15x, −2×x=−2x, −2×5=−10.

  2. Collect: 3x2+15x−2x−10=3x2+13x−10.

  3. (b) Write it as two brackets: (x−4)(x−4).

  4. x2−4x−4x+16=x2−8x+16. Note −4×−4=+16.

Answer: (a) 3x2+13x−10 (b) x2−8x+16

Check yourself

Expand and simplify (x+6)(x−2).

Answer it in the portal, where your answer is checked as you type →

Two variables and three brackets Extended

Extended questions use the same method with two letters, such as (3x+y)(x−4y):

3x2−12xy+xy−4y2=3x2−11xy−4y2

xy and yx are like terms, so −12xy+xy=−11xy.

For three brackets, expand any two of them first, simplify, and then multiply the result by the third bracket. Multiplying a bracket of three terms by a bracket of two terms gives six products before simplifying. Keep them in a neat line or a grid, then collect like terms. The answer to a product of three linear brackets has an x3 term, and usually up to four terms in all.

Worked example 3 Extended

Expand and simplify (x+1)(x−3)(2x+5).

  1. First two brackets: (x+1)(x−3)=x2−3x+x−3=x2−2x−3.

  2. Now multiply by (2x+5). Each of the three terms multiplies 2x and then 5:

  3. x2×2x=2x3, x2×5=5x2, −2x×2x=−4x2, −2x×5=−10x, −3×2x=−6x, −3×5=−15.

  4. Collect: 2x3+5x2−4x2−10x−6x−15=2x3+x2−16x−15.

  5. Check with x=1: (2)(−2)(7)=−28 and 2+1−16−15=−28.

Answer: 2x3+x2−16x−15

Factorising by taking out a common factor

Factorising is expanding in reverse: you write an expression as a product. To take out a common factor:

  1. Find the highest common factor (HCF) of the numbers.
  2. Find the letters that appear in every term, each to the lowest power it appears with.
  3. Write the HCF outside a bracket and divide each term by it to get what goes inside.

For 9x2+15xy: the HCF of 9 and 15 is 3, and x is in both terms, so the common factor is 3x. Then 9x2÷3x=3x and 15xy÷3x=5y:

9x2+15xy=3x(3x+5y)

"Factorise" in an exam means factorise fully: nothing more can come out of the bracket. 3(3x2+5xy) and x(9x+15y) are both correct as far as they go, but both lose a mark, because 3 and x respectively can still come out of the bracket.

Always check by expanding your answer in your head. And if a term is exactly the common factor, it leaves 1 behind, not nothing. In 12x2y−8xy2+4xy the common factor is 4xy, and 4xy÷4xy=1, so the answer is 4xy(3x−2y+1).

Worked example 4

Factorise completely 12a2b−18ab2.

  1. HCF of 12 and 18 is 6.

  2. Both terms contain a (lowest power a1) and b (lowest power b1). So the common factor is 6ab.

  3. 12a2b÷6ab=2a and 18ab2÷6ab=3b.

  4. Answer: 6ab(2a−3b). Check: 6ab×2a=12a2b and 6ab×3b=18ab2.

Answer: 6ab(2a−3b)

Check yourself

Factorise completely 10ab−15a.

Answer it in the portal, where your answer is checked as you type →

Factorising by grouping Extended

Four terms with no factor common to all of them can often be factorised in pairs. Take a common factor from the first pair and from the second pair; if the brackets match, that bracket is itself a common factor.

ax+bx+kay+kby=x(a+b)+ky(a+b)=(a+b)(x+ky)

If the brackets do not match, try taking out a negative factor from the second pair, or pair the terms differently. For example 6xy−9x+4y−6=3x(2y−3)+2(2y−3)=(2y−3)(3x+2).

Difference of two squares and perfect squares Extended

Expand (p−q)(p+q): p2+pq−pq−q2=p2−q2. The middle terms cancel. Reading this backwards gives the difference of two squares:

p2−q2=(p−q)(p+q)

So a2x2−b2y2=(ax−by)(ax+by). For example 16x2−9y2=(4x−3y)(4x+3y). Look for a common factor first: 50−2x2=2(25−x2)=2(5−x)(5+x).

A sum of two squares, such as x2+9, does not factorise.

A perfect square comes from squaring a bracket: (a+b)2=a2+2ab+b2. Spot it when the first and last terms are squares and the middle term is twice the product of their roots: x2+10x+25=(x+5)2 and 9x2−12x+4=(3x−2)2.

Factorising quadratic expressions Extended

When x2 has coefficient 1, (x+m)(x+n)=x2+(m+n)x+mn. So to factorise x2+bx+c, find two numbers that multiply to c and add to b.

For x2−2x−15: the pairs that multiply to −15 are 1 and −15, −1 and 15, 3 and −5, −3 and 5. Only 3 and −5 add to −2. So x2−2x−15=(x+3)(x−5).

When the coefficient of x2 is not 1, as in ax2+bx+c, split the middle term:

  1. Multiply a×c.
  2. Find two numbers that multiply to ac and add to b.
  3. Use them to split bx into two terms, then factorise by grouping.

An expression of the form ax3+bx2+cx has x in every term. Take out x (and any number) first, then factorise the quadratic that is left. That is what "factorise completely" is testing.

Worked example 5 Extended

Factorise 6x2−7x−3.

  1. a×c=6×(−3)=−18.

  2. Two numbers that multiply to −18 and add to −7: −9 and 2.

  3. Split the middle term: 6x2−9x+2x−3.

  4. Group in pairs: 3x(2x−3)+1(2x−3).

  5. The bracket (2x−3) is common: (2x−3)(3x+1).

  6. Check: (2x−3)(3x+1)=6x2+2x−9x−3=6x2−7x−3.

Answer: (2x−3)(3x+1)

Worked example 6 Extended

Factorise completely (a) 3x3+3x2−18x (b) 2x3−8x.

  1. (a) Every term has a factor 3x: 3x(x2+x−6).

  2. Two numbers that multiply to −6 and add to 1: 3 and −2. So 3x(x+3)(x−2).

  3. (b) Common factor 2x: 2x(x2−4).

  4. x2−4 is a difference of two squares: 2x(x−2)(x+2).

  5. Stopping at 3x(x2+x−6) or 2x(x2−4) would not be complete.

Answer: (a) 3x(x+3)(x−2) (b) 2x(x−2)(x+2)

Check yourself Extended

Factorise x2−x−20.

Answer it in the portal, where your answer is checked as you type →

Completing the square Extended

Expanding (x+p)2 gives x2+2px+p2. So x2+2px is the start of a perfect square, short by p2:

x2+2px=(x+p)2−p2

To write x2+bx+c in the form (x+p)2+q:

  1. Halve the coefficient of x to get p.
  2. Write (x+p)2, then subtract p2 to undo the extra term, and add c.

For x2+6x+4: half of 6 is 3, so (x+3)2−9+4=(x+3)2−5.

When the coefficient of x2 is a≠1, take a out of the x2 and x terms first, complete the square inside the bracket, then multiply back out the number you subtracted. Do not forget that last step: it is where most marks go.

Why it is useful. A square is never negative, so (x+3)2⩾0 and (x+3)2−5⩾−5. The minimum value of x2+6x+4 is −5, when x=−3. Completing the square also leads to solving quadratic equations and finding turning points of graphs.

Worked example 7 Extended

Write 2x2−12x+7 in the form a(x+b)2+c, and write down its minimum value.

  1. Take out 2 from the first two terms: 2(x2−6x)+7.

  2. Inside the bracket: x2−6x=(x−3)2−9.

  3. So 2[(x−3)2−9]+7=2(x−3)2−18+7.

  4. =2(x−3)2−11. So a=2, b=−3, c=−11.

  5. Check: 2(x2−6x+9)−11=2x2−12x+18−11=2x2−12x+7.

  6. 2(x−3)2 is never negative, so the minimum value is −11, when x=3.

Answer: 2(x−3)2−11; minimum value −11

Check yourself Extended

Write x2+8x+5 in the form (x+a)2+b.

Answer it in the portal, where your answer is checked as you type →

Key points

  • Like terms have identical letters and powers. Add their coefficients; never combine unlike terms.

  • Expanding: every term in one bracket multiplies every term in the other. Two brackets give four products before simplifying.

  • (x+a)2=x2+2ax+a2. The middle term is always there.

  • Factorise means factorise fully: take out the HCF of the numbers and every common letter. Check by expanding.

  • Extended: look for a common factor first, then grouping (four terms), the difference of two squares p2−q2=(p−q)(p+q), a perfect square, or a quadratic (two numbers that multiply to ac and add to b).

  • Extended: x2+bx+c=(x+b2)2−(b2)2+c. When a≠1, take a out first and multiply it back into the constant.

Where marks are lost

  • Combining unlike terms: 3x+2y is not 5xy, and 4x+4x2 is not 8x3.

  • Losing a sign when a negative multiplies a bracket: −4(a−2)=−4a+8, not −4a−8.

  • Expanding (x−5)2 as x2+25 or x2−25.

  • Only multiplying the first term in the bracket: 4(3x−7) is 12x−28, not 12x−7.

  • Factorising only partly, such as 3(3x2+5xy) instead of 3x(3x+5y). That loses a mark.

  • Forgetting the 1 when a whole term is taken out: 4xy(3x−2y+1), not 4xy(3x−2y).

  • Extended: treating x2+9 as a difference of two squares. A sum of squares does not factorise.

  • Extended: in 3(x+2)2−4×3−5, forgetting to multiply the 4 by 3 when completing the square with a≠1.

Related IGCSE Mathematics 0580 lessons

All IGCSE Mathematics 0580 lessons →

An original lesson written to the Cambridge IGCSE Mathematics 0580 syllabus (2025 to 2027). The worked examples and questions are our own, not Cambridge questions. Back to every IGCSE Mathematics 0580 lesson.