Difference of Two Squares
Every expression of the form $a^2 - b^2$ hides a pair of brackets: $(a+b)(a-b)$. Learn to spot perfect squares, take square roots, and factorise in one or two steps.
Printable Worksheets
Print or save as PDF — or build a custom worksheet from any module's questions.
Before you read on — factorise $x^2 - 16$. What two numbers multiply to give $-16$ and add to give $0$? Or is there a faster pattern? Try it, then check your reasoning as you go.
When you expand $(a + b)(a - b)$, the middle terms cancel. What remains is $a^2 - b^2$ — a difference of two perfect squares. This pattern is a shortcut: if you see $a^2 - b^2$, you can write it as $(a+b)(a-b)$ instantly.
An expansion of $(a+b)(a-b)$ produces $a^2 - ab + ab - b^2$. The $-ab$ and $+ab$ cancel, leaving $a^2 - b^2$. Factorising reverses this: $a^2 - b^2 = (a+b)(a-b)$.
Know
- The difference of squares formula $a^2 - b^2 = (a+b)(a-b)$
- Common perfect squares up to 100
- Why the middle terms cancel on expansion
Understand
- Why $a^2 + b^2$ cannot be factorised over the reals
- Why you must take the square root, not halve the number
- When to extract a common factor first
Can Do
- Recognise a difference of squares at a glance
- Factorise $a^2 - b^2$ where $a$ and $b$ are numbers, variables, or both
- Combine HCF extraction with difference of squares
Wrong: "$x^2 - 9 = (x - 9)(x + 9)$" — forgot to take the square root of 9.
Right: $x^2 - 9 = (x + 3)(x - 3)$ because $\sqrt{9} = 3$, not 9.
Wrong: "$x^2 + 16 = (x + 4)(x - 4)$" — sum of squares, not difference.
Right: $x^2 + 16$ cannot be factorised over the reals. Only $a^2 - b^2$ works.
The difference of squares formula is one of the most useful shortcuts in algebra. It works because the outer and inner products cancel when you expand $(a+b)(a-b)$, leaving only $a^2 - b^2$.
Expand $(a+b)(a-b)$: First $= a^2$, Outer $= -ab$, Inner $= +ab$, Last $= -b^2$. The $-ab$ and $+ab$ cancel. Result: $a^2 - b^2$.
= a² - b²
You can't use the formula unless both terms are perfect squares. Memorise the common ones and learn to spot squares hiding inside coefficients and variables.
Numbers: $1, 4, 9, 16, 25, 36, 49, 64, 81, 100$. Variables: $x^2 = (x)^2$, $x^4 = (x^2)^2$. Combined: $9x^2 = (3x)^2$, $16a^2 = (4a)^2$.
root 49 = 7
Before you reach for the difference of squares formula, always check for a common factor. Extract it first, then look at what's left inside the brackets. This is how you factorise fully.
$3x^2 - 27$ looks like a difference of squares, but both terms share a factor of 3. Pull out the 3 first: $3(x^2 - 9)$. Now $x^2 - 9$ is a difference of squares: $3(x+3)(x-3)$.
= 3(x+3)(x-3)
A sum of squares — $a^2 + b^2$ — cannot be factorised using real numbers. There is no pair of brackets that multiplies to give $a^2 + b^2$. Only differences split.
$(a+b)(a+b) = a^2 + 2ab + b^2$ — too many terms. $(a+b)(a-b) = a^2 - b^2$ — gives a minus, not a plus. No real factorisation exists for $a^2 + b^2$.
no real factors
Watch Me Solve It · 3 examples
-
1Recognise the pattern$x^2 - 25$ is a difference of two squaresTwo terms, minus sign, both are perfect squares.
-
2Identify $a$ and $b$$a = x$ and $b = 5$ (since $25 = 5^2$)Take the square root of each term, not the original number.
-
3Apply the formula$x^2 - 25 = (x + 5)(x - 5)$$a^2 - b^2 = (a+b)(a-b)$. Substitute $a=x$ and $b=5$.
-
4Check by expanding$(x + 5)(x - 5) = x^2 - 5x + 5x - 25 = x^2 - 25$ ✓The middle terms cancel. We get back to the original.
-
1Check for common factorNo common factor — proceed to formula
-
2Identify $a$ and $b$$4x^2 = (2x)^2$ so $a = 2x$$49 = 7^2$ so $b = 7$The coefficient 4 is also a perfect square. $\sqrt{4x^2} = 2x$.
-
3Apply the formula$4x^2 - 49 = (2x + 7)(2x - 7)$
-
4Check by expanding$(2x + 7)(2x - 7) = 4x^2 - 14x + 14x - 49 = 4x^2 - 49$ ✓
-
1Extract the HCF$3x^2 - 27 = 3(x^2 - 9)$HCF of $3x^2$ and $27$ is $3$. Always do this first.
-
2Recognise difference of squares inside$x^2 - 9 = x^2 - 3^2$What's left in the bracket is now a difference of two perfect squares.
-
3Apply the formula$3(x^2 - 9) = 3(x + 3)(x - 3)$$a = x$, $b = 3$. The 3 outside stays outside.
-
4Check by expanding$3(x + 3)(x - 3) = 3(x^2 - 9) = 3x^2 - 27$ ✓Two-step factorising verified. Fully factorised.
The Formula
- $a^2 - b^2 = (a+b)(a-b)$
- Only works for differences
- $a$ and $b$ are square roots
Perfect Squares
- $1, 4, 9, 16, 25, 36, 49, 64, 81, 100$
- $x^2 = (x)^2$, $4x^2 = (2x)^2$
- Any even power is a square
Multi-step
- Extract HCF first
- Then apply the formula
- Expand to verify
What Not to Do
- $a^2 + b^2$ does not factorise
- Don't halve — take the root
- Don't stop at $3(x^2 - 9)$
How are you completing this lesson?
Brain Trainer · 4 problems
Four problems mixing basic difference of squares, coefficients, common factors and two variables. Work each one, then reveal the answer to check.
-
1 Factorise $x^2 - 81$.
$a = x$, $b = 9$ since $81 = 9^2$$= (x + 9)(x - 9)$ -
2 Factorise $16y^2 - 25$.
$16y^2 = (4y)^2$ and $25 = 5^2$$= (4y + 5)(4y - 5)$ -
3 Fully factorise $2x^2 - 50$.
HCF is 2: $2(x^2 - 25)$. Then $x^2 - 25 = (x+5)(x-5)$$= 2(x + 5)(x - 5)$ -
4 Factorise $9a^2 - 16b^2$.
$9a^2 = (3a)^2$ and $16b^2 = (4b)^2$$= (3a + 4b)(3a - 4b)$
Quick Check · 5 questions
Show Your Working · 3 questions
Q6. Factorise each of the following expressions fully.
(a) $x^2 - 81$ (1 mark)
(b) $16y^2 - 25$ (1 mark)
Q7. For each expression below, state whether it is a difference of squares. If it is, factorise it fully. If it is not, explain why.
(a) $x^2 + 4$ (1 mark)
(b) $25 - 4x^2$ (2 marks)
(c) $3x^2 - 12$ (2 marks)
Q8. A square sports field has side length $(x + 8)$ metres. A smaller square warm-up area inside it has side length $(x - 8)$ metres.
(a) Write an expression for the area of the field not covered by the warm-up area. (2 marks)
(b) Factorise this expression fully using the difference of squares. (2 marks)
Quick Check
1. A — $x^2 - 25 = x^2 - 5^2 = (x+5)(x-5)$.
2. B — $x^2 - 9 = x^2 - 3^2$ is a difference of two perfect squares with a minus sign.
3. C — $4x^2 = (2x)^2$ and $49 = 7^2$. So $(2x+7)(2x-7)$.
4. D — $9a^2 = (3a)^2$ and $16b^2 = (4b)^2$. So $(3a+4b)(3a-4b)$.
5. B — First take out 2: $2(x^2 - 25)$. Then $x^2 - 25 = (x+5)(x-5)$. So $2(x+5)(x-5)$.
Show Your Working Model Answers
Q6 (2 marks): (a) $(x+9)(x-9)$ [1]. (b) $(4y+5)(4y-5)$ [1].
Q7 (4 marks): (a) Not a difference of squares — it is a sum, not a difference [1]. (b) $25 - 4x^2 = 5^2 - (2x)^2$ [1] $= (5+2x)(5-2x)$ [1]. (c) $3(x^2 - 4)$ [1] $= 3(x+2)(x-2)$ [1].
Q8 (4 marks): (a) $(x+8)^2 - (x-8)^2$ [1] $= x^2 + 16x + 64 - (x^2 - 16x + 64) = 32x$ m$^2$ [1]. (b) $[(x+8)+(x-8)][(x+8)-(x-8)]$ [1] $= 2x \cdot 16 = 32x$ m$^2$ [1].
Factorise Twice
Fully factorise $x^4 - 16$. Hint: apply the difference of squares formula once, then look carefully at what remains inside each bracket — one of them might be factorisable again.
Reveal solution
$x^4 - 16 = (x^2)^2 - 4^2 = (x^2 + 4)(x^2 - 4)$.
Now $x^2 - 4$ is also a difference of squares: $(x+2)(x-2)$.
But $x^2 + 4$ is a sum of squares — it cannot be factorised over the reals.
Fully factorised: $(x^2 + 4)(x + 2)(x - 2)$.
Formula
$a^2 - b^2 = (a+b)(a-b)$
Perfect Squares
Recognise $1,4,9,16,25,36,49,64,81,100$
Square Roots
$a$ and $b$ are the square roots of each term
Common Factor
Always take out HCF first
Sum of Squares
$a^2 + b^2$ cannot be factorised this way
Check
Expand to verify your answer
Interactive: Difference of Squares Explorer
Practise recognising and factorising difference of squares expressions with a visual area model. Adjust the terms and watch the factorisation unfold.