Difference of two squares GCSE questions ask you to factorise any expression written as one perfect square minus another, such as a² − b². The rule is always the same: a² − b² factorises into (a + b)(a − b), so once you spot the pattern you can write the answer in seconds.
What is the difference of two squares rule?
The difference of two squares — often shortened to DOTS — is a special factorising case that appears throughout GCSE algebra. Whenever you see one square term subtracted from another, with nothing else in the expression, it factorises using a fixed identity:
$$a^2 - b^2 = (a + b)(a - b)$$
You can prove this by expanding the brackets: $(a+b)(a-b) = a^2 - ab + ab - b^2 = a^2 - b^2$. The middle terms cancel out, which is exactly why the rule works for any values of $a$ and $b$ — whether they are plain numbers, single letters, or more complicated terms such as $3x$ or $5y^2$.
Two features confirm you are looking at a genuine difference of two squares: the expression has exactly two terms, and both terms are perfect squares separated by a subtraction sign. If there is a plus sign between the terms, or if either term is not a perfect square, this shortcut does not apply.
How do you factorise a difference of two squares step by step?
Follow this method every time you meet an expression of the form $a^2 - b^2$:
- Check the expression has exactly two terms with a minus sign between them.
- Find the square root of each term to identify $a$ and $b$.
- Write the two brackets $(a + b)(a - b)$, substituting in the square roots you found.
- Expand your answer mentally to confirm it matches the original expression.
Worked example: Factorise $x^2 - 16$.
Here $a^2 = x^2$, so $a = x$. And $b^2 = 16$, so $b = 4$, since $4^2 = 16$. Substituting into the identity gives:
$$x^2 - 16 = (x + 4)(x - 4)$$
Checking by expansion: $(x+4)(x-4) = x^2 - 4x + 4x - 16 = x^2 - 16$. The answer is confirmed correct.
What does it look like with coefficients and higher powers?
Not every GCSE question is as simple as $x^2 - a^2$. Higher tier papers often disguise the pattern with coefficients, extra letters, or higher powers. The table below shows how the identity still applies in each case.
| Expression | a | b | Factorised form |
|---|---|---|---|
| $x^2 - 25$ | $x$ | $5$ | $(x+5)(x-5)$ |
| $9x^2 - 4$ | $3x$ | $2$ | $(3x+2)(3x-2)$ |
| $4x^2 - 49y^2$ | $2x$ | $7y$ | $(2x+7y)(2x-7y)$ |
| $x^4 - 1$ | $x^2$ | $1$ | $(x^2+1)(x^2-1)$ |
Worked example: Factorise $9x^2 - 4$.
Recognise $9x^2$ as a perfect square: $\sqrt{9x^2} = 3x$. Recognise $4$ as a perfect square: $\sqrt{4} = 2$. So $a = 3x$ and $b = 2$, giving:
$$9x^2 - 4 = (3x + 2)(3x - 2)$$
Look closely at the last row of the table: $x^4 - 1$ factorises to $(x^2+1)(x^2-1)$, but the bracket $x^2 - 1$ is itself a difference of two squares and factorises further, to $(x+1)(x-1)$. Always check whether a bracket can be factorised a second time — GCSE mark schemes usually expect the fully factorised form.
How do you spot the difference of two squares when it is disguised?
Exam questions frequently hide DOTS inside a longer problem. Watch out for these situations:
- A common factor first. An expression like $2x^2 - 18$ needs the factor of 2 removed before the squares become visible: $2(x^2 - 9) = 2(x+3)(x-3)$.
- Numerical differences of squares. Non-calculator papers sometimes ask you to calculate something like $103^2 - 97^2$ without squaring either number. Writing this as $(103+97)(103-97) = 200 \times 6 = 1200$ is far faster than long multiplication.
- Algebraic fractions. The numerator or denominator of a fraction may factorise using DOTS, letting you cancel a shared bracket and simplify the fraction.
Worked example: Simplify $\dfrac{x^2 - 9}{x + 3}$.
Factorise the numerator using the difference of two squares: $x^2 - 9 = (x+3)(x-3)$. The fraction becomes $\dfrac{(x+3)(x-3)}{x+3}$, and the matching $(x+3)$ terms cancel, leaving the simplified answer $x - 3$.
Frequently asked questions
Does the difference of two squares work with a plus sign?
No. The identity $a^2 - b^2 = (a+b)(a-b)$ only applies when the two square terms are separated by a subtraction. An expression like $a^2 + b^2$, the sum of two squares, cannot be factorised over ordinary numbers using this method, and in most GCSE contexts it does not factorise at all.
What if one of the terms is not a perfect square?
Then the expression is not a genuine difference of two squares, and this shortcut does not apply. You would need a different factorising method instead, such as taking out a common factor or, for a full trinomial, standard quadratic factorising. Always check that both terms have exact square roots before reaching for this rule.
Can difference of two squares questions appear without any algebra?
Yes. Non-calculator papers sometimes use the identity as a fast way to work out purely numerical differences, such as $52^2 - 48^2$. Recognising it as $(52+48)(52-48) = 100 \times 4 = 400$ avoids two lengthy squaring calculations and is a useful exam-technique shortcut worth practising.
Is the difference of two squares the same as factorising any quadratic?
They overlap, but DOTS is a special case rather than the general method. A standard quadratic $ax^2 + bx + c$ needs the usual factorising approach of finding two numbers that multiply and add correctly, whereas a difference of two squares has no middle $x$ term at all — it goes straight from $a^2 - b^2$ to two brackets, which is much quicker once you recognise the pattern.
Want Professor Pi to check every factorising step with you before you move on? Add the AI Tutors connector at aitutors.me.