Free lesson

Every lesson is free, no account needed. Make a free account to save your progress.

Live classGet practice + mocks
  1. Home
  2. Grade 7-12 Math Review
  3. Factoring Differences of Squares and Cubes
Grade 7-12 Math Review · Grade 8 · Quarter 1

Factoring Differences of Squares and Cubes

Two terms only. Check whether both are perfect squares, or both perfect cubes.

Factor completely

50x² − 8

Difference of two squares.

a² − b² = (a + b)(a − b)

x² − 49 = (x + 7)(x − 7) 9m² − 16 = (3m + 4)(3m − 4) x⁴ − 81 = (x² + 9)(x² − 9)

A SUM of squares does not factor

x² + 49 has no factors over the real numbers. There is no "sum of squares" pattern — only the difference works. This is the one exception worth memorising.

The third example is not finished: x² − 9 factors again into (x + 3)(x − 3), so the complete answer is (x² + 9)(x + 3)(x − 3). Always re-check each bracket.

Recognising a perfect square.

TermSquare ofTermSquare of
x²x25x⁴5x²
497100m⁶10m³
9y²3yx²y⁴xy²

A term is a perfect square when its coefficient is a perfect square and every exponent is even. Halve the exponents to get the root.

Sum and difference of cubes.

a³ + b³ = (a + b)(a² − ab + b²) · a³ − b³ = (a − b)(a² + ab + b²)

(a ± b)(a² ∓ ab + b²) same sign opposite always + SOAP: Same, Opposite, Always Positive

x³ − 27

a = x, b = 3

= (x − 3)(x² + 3x + 9)

same, opposite, always positive

The trinomial that comes out almost never factors again. If you find yourself trying to factor x² + 3x + 9, stop — no pair of integers multiplies to 9 and adds to 3.

Perfect cubes to recognise.

1, 8, 27, 64, 125 216, 343, 512, 729, 1000 exponents divisible by 3

8x³ + 125

8 = 2³, 125 = 5³

a = 2x, b = 5

the cube roots

= (2x + 5)(4x² − 10x + 25)

a² = 4x², ab = 10x, b² = 25

Note the middle term is ab, not 2ab. That is the difference between this and a squared binomial, and it is the detail most often slipped.

Which pattern, and in what order.

Step 1 take out the GCF always first
Two terms, both squares? a² − b² pattern difference only
Two terms, both cubes? SOAP sum or difference
Step 4 re-check every bracket x⁴ − 81 needs two rounds

37² − 33²

mental arithmetic

= (37 + 33)(37 − 33)

the same pattern

= 70 × 4 = 280

no squaring needed

Remember the flow

GCF first · Both perfect squares? difference only · Both perfect cubes? SOAP · Re-check every bracket

A sum of squares never factors. A sum of cubes always does.

Two letters, and a GCF hiding the pattern.

If neither number is a perfect square or cube, look for a common factor first.

Factor 16a² − 81b².

16a² = (4a)², 81b² = (9b)²

both terms are squares

= (4a + 9b)(4a − 9b)

a² − b² with a = 4a, b = 9b

Each letter rides along with its number. Check one product: 4a · 4a = 16a² ✓.

Factor 12x² − 27 completely.

= 3(4x² − 9)

GCF 3 first

= 3(2x + 3)(2x − 3)

now both terms are squares

"Neither is a square, so it does not factor"

12 and 27 are not perfect squares, so it is tempting to call 12x² − 27 prime. But the common factor 3 is hiding a difference of squares. Always take the GCF out before deciding.

Factor 2x³ + 16 completely.

= 2(x³ + 8)

GCF 2 first; 8 = 2³

= 2(x + 2)(x² − 2x + 4)

sum of cubes: same, opposite, always +

Variations: a fraction, a bracket as a term, the number first.

The patterns accept any a and b — even a bracket.

x² − 19

19 = (13)²

a fraction can be a perfect square

= (x + 13)(x − 13)

difference of squares

Square-root the top and the bottom separately: √1 = 1 and √9 = 3.

(x + 1)² − 25

= [(x + 1) + 5][(x + 1) − 5]

a = x + 1, b = 5

= (x + 6)(x − 4)

tidy each bracket

Check by expanding both: x² + 2x − 24 either way ✓. Treating the bracket as one block saves the expansion.

1 − 125y³

1 = 1³, 125y³ = (5y)³

a = 1, b = 5y

= (1 − 5y)(1 + 5y + 25y²)

same, opposite, always +

The number can come first. Then a = 1, so a² = 1 and ab = 5y.

On the exam

Two-term factoring items test recognition: both perfect squares with a minus between them, or both perfect cubes. The trap choices are a "factored" sum of squares, an answer that stops after the GCF, and 2ab instead of ab in the cube trinomial. For a 10-second check, put x = 2 into the question and your answer.

Now you try

Practice problem

Factor completely

x⁴ − 16

Hint: after the first factoring, look at each bracket again. One of them can go further; the other genuinely cannot.