The Difference of Two Squares

Some quadratics have no middle term — just one square minus another. These have a special shortcut. Whenever you see one square subtracted from another square, it factorises in a single step:

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

You can check it by multiplying the brackets out: the outer and inner terms (+ab and -ab) cancel, leaving exactly a^2 - b^2.

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

Why it works — an area picture

The identity is just a square with a smaller square cut out, rearranged. Start with a square of side a and remove a square of side b from a corner — the leftover area is a^2 - b^2. Cut that L-shape into two pieces and slide them together, and you get a rectangle that is (a + b) wide and (a - b) tall. Nothing was added or thrown away, so the two areas are equal. Step through it.

Spotting it in numbers

The trick is recognising each part as a perfect square. Take the square root of each term to get a and b, then write the two brackets:

x^2 - 9 = x^2 - 3^2 = (x + 3)(x - 3)

It works just as well when the leading term has a coefficient — as long as that coefficient is itself a perfect square. Here 4x^2 = (2x)^2 and 25 = 5^2:

4x^2 - 25 = (2x)^2 - 5^2 = (2x + 5)(2x - 5)

The pattern needs a minus sign. A sum of two squares, like x^2 + 9, does not factorise this way — there is no cancelling middle term to make.

See it explained

Khan Academy introduces the difference-of-squares pattern and factorises examples like it: