Skip to main content
Learning LoftInstitute

Mathematics

The Difference of Two Squares

a² − b² always factorises to (a + b)(a − b) because the middle terms cancel. Used on x² − 49, on 9y² − 16, and to work out 51² − 49² without a calculator.

Difference of two squares

An expression made by subtracting one square from another, of the form a² − b², which always factorises into (a + b)(a − b).

Also called
Difference of squares, DOTS
Where students meet it
Grade 9 algebra, and throughout GCSE and IGCSE factorising, simplifying algebraic fractions and non-calculator arithmetic.

The short answer

The difference of two squares is any expression of the form a² − b², one square subtracted from another. It always factorises as (a + b)(a − b), because expanding those brackets makes the two middle terms cancel. So x² − 49 becomes (x + 7)(x − 7).

An example

9y² − 16 = (3y)² − 4² = (3y + 4)(3y − 4)

9y² is (3y)² and 16 is 4², so here a is 3y and b is 4. Expanding the answer gives 9y² − 12y + 12y − 16: the −12y and +12y cancel, which is why the original expression has no y term at all. That missing middle term is the clue to look for the pattern.

Why the middle term disappears

Expand (a + b)(a − b) in full and you get a² − ab + ab − b². The two middle terms are the same size with opposite signs, so they cancel and only a² − b² survives.

That cancellation is the whole idea. Every other pair of brackets leaves a middle term behind — (x + 3)(x + 5) keeps its 8x — and the difference of two squares is the one arrangement engineered to lose it.

The identity is worth reading in both directions. Left to right it factorises; right to left it expands, so (2x + 5)(2x − 5) can be written straight down as 4x² − 25 with no multiplying out at all.

Spotting it on the page

Three things have to be true at once: exactly two terms, both of them squares, and a minus sign between them. x² − 49 qualifies, 25 − x² qualifies and factorises as (5 + x)(5 − x), and 4x² − 9 qualifies because 4x² is (2x)².

A sum does not. x² + 49 has no factorisation of this kind, and no amount of rearranging produces one at this level. Sometimes the pattern is hidden behind a common factor: 2x² − 8 is not a difference of two squares as written, but taking out the 2 leaves 2(x² − 4), and that inner bracket is.

Using it on numbers

The identity holds for numbers as well as letters, which makes some non-calculator questions almost instant. 51² − 49² becomes (51 + 49)(51 − 49), and that is 100 × 2 = 200, without ever working out either square.

The same move handles 100² − 98², which becomes 198 × 2 = 396 and is quicker than working out either square.

It also does the tidying in algebraic fractions. Faced with (x² − 9) over (x + 3), factorising the top into (x + 3)(x − 3) lets the (x + 3) cancel, and the whole expression collapses to x − 3.

Common questions

Does x² + 49 factorise as well?

No. A sum of two squares has no factorisation into brackets with real numbers, so at GCSE and IGCSE the correct answer is that it cannot be factorised. Only the subtraction version works, and mistakenly writing (x + 7)(x + 7) is a common way to lose the mark, since that expands to x² + 14x + 49.

Is 4x² − 9 a difference of two squares?

Yes. 4x² is (2x)² and 9 is 3², so it factorises as (2x + 3)(2x − 3). Coefficients in front of the letter do not break the pattern as long as they are square numbers — 4, 9, 16, 25 and so on. Check by expanding: the −6x and +6x cancel.

Does the order of the brackets matter?

No, (a + b)(a − b) and (a − b)(a + b) give the same result, because multiplication can be done in either order. The order inside the original expression does matter, though: a² − b² and b² − a² differ by a sign, so 9 − x² is −(x² − 9).

Where does this turn up besides factorising?

In simplifying algebraic fractions, where a difference of two squares on the top cancels with a bracket on the bottom, and in rearranged Pythagoras: a² = c² − b² can be written as (c + b)(c − b), which is occasionally the quickest route through a numerical problem.

Last updated

Knowing the word is not the same as using it

A tutor can watch a student use this in a question and see exactly where the understanding stops. The first class is free.

optional
optional
Subjects

Pick everything you want covered

Class format
optional
optional

The more specific you are, the better we can match a tutor.

WhatsApp us