The Difference of Two Squares

a squared minus b squared factorises as the sum times the difference. How to spot the pattern, why it needs subtraction, and what to do when the terms carry coefficients.

--

One expression factorises instantly once you recognise it: a square minus a square. The pattern turns a subtraction into a product of two brackets — but only when both terms really are squares, and only when they are being subtracted.

Concept The rule

 a^2 - b^2 = (a+b)(a-b)

The difference of two squares equals the sum of the two terms multiplied by their difference.

The rule works only with subtraction. There is no equivalent factorisation for  a^2 + b^2 using ordinary numbers.

Example Two straightforward cases

Factorise  x^2 - 9 and  25 - y^2 .

Recognise the squares:  x^2 = (x)^2 and  9 = 3^2 , so  a = x and  b = 3 .
 x^2 - 9 = x^2 - 3^2 = (x+3)(x-3)
For the second,  25 = 5^2 and  y^2 = (y)^2 , so  a = 5 and  b = y .
 25 - y^2 = 5^2 - y^2 = (5+y)(5-y)
⟹ (x + 3)(x − 3) and (5 + y)(5 − y)

The order matters: whichever term comes first in the subtraction plays the role of  a .

Example When the terms have coefficients

Factorise  4x^2 - 16 and  9y^2 - 1 .

 4x^2 = (2x)^2 and  16 = 4^2 , giving  (2x+4)(2x-4) .
 9y^2 = (3y)^2 and  1 = 1^2 , giving  (3y+1)(3y-1) .
⟹ (2x + 4)(2x − 4) and (3y + 1)(3y − 1)

The step that matters is rewriting each term as something squared. Once  4x^2 is seen as  (2x)^2 , the rest follows automatically.

Example Checking the factorisation

Verify that  x^2 - 9 = (x+3)(x-3) by multiplying the brackets back out.

 (x+3)(x-3) = x^2 - 3x + 3x - 9
The two middle terms  -3x and  +3x cancel each other.
What remains is  x^2 - 9 .
⟹ the factorisation is correct

That cancellation is the whole reason the rule works. The sum and difference brackets are built precisely so the middle terms disappear.

Note When the rule does not apply
x² + 9 a sum, not a difference x³ − 8 not squares
 x^2 + 9 — the terms are added, so the pattern does not apply.
 x^3 - 8 — these are cubes, not squares.

Before using the rule, confirm two things: both terms are perfect squares, and the sign between them is a minus.

Note Mistakes to avoid
Trying to factorise  a^2 + b^2 with this rule — it only handles subtraction.
Applying it to terms that are not squares, such as  x^3 or  5x .
Writing both brackets with the same sign; one must be a sum and the other a difference.
Forgetting to square a coefficient:  4x^2 is  (2x)^2 , not  (4x)^2 .
Reversing the order of the terms, which changes the sign of the answer.
Summary
  1. a² − b² = (a + b)(a − b): the sum times the difference.
  2. The rule requires subtraction; a² + b² does not factorise this way.
  3. Both terms must be perfect squares — rewrite 4x² as (2x)² to see it.
  4. Multiplying the brackets back out cancels the middle terms, which is why the rule works.
  5. Check the factorisation by expanding; it takes seconds and confirms the answer.