Back to courseLesson 11 of 14

Perfect squares & the difference of squares

What you'll learn

Recognize (a + b)² and a² − b² on sight — with the geometric picture that makes both formulas obvious.

Two multiplication patterns show up so often that algebra treats them as sight-words: the perfect square and the difference of squares. Recognize them and whole problems collapse; miss them and you'll grind through the long way.

The perfect square

(a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2

Not a² + b² — the middle term 2ab is the whole point. Geometrically, a square of side a + b contains an a² tile, a b² tile, and two a-by-b rectangles; those two rectangles are the 2ab. So x² + 6x + 9 = (x + 3)², spotted instantly: first and last terms are squares (x², 3²) and the middle is twice their product (2 · x · 3).

The subtraction version just flips the middle sign: (a − b)² = a² − 2ab + b².

The difference of squares

aaa² − b²a + ba − b(a − b)(a + b)
Remove b² from a², cut the L-shape in two, and slide the tall piece around: the same area, now a rectangle. That's why a² − b² = (a − b)(a + b).

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

The picture is the proof: carve b² out of a², cut the L-shape, and the pieces reassemble into an (a − b) × (a + b) rectangle. Same area, factored shape.

Expanding (a − b)(a + b) confirms it — the cross terms −ab and +ab cancel, which is exactly why no middle term survives.

Spotting them in the wild

ExpressionPatternFactored
x² − 49difference of squares(x − 7)(x + 7)
9x² − 25difference of squares(3x − 5)(3x + 5)
x² + 10x + 25perfect square(x + 5)²
4x² − 12x + 9perfect square(2x − 3)²
x² + 16a sum of squaresdoesn't factor (over the reals)

That last row is the classic trap: a² − b² splits, a² + b² does not.

A party trick that's actually the pattern

18 × 22 = (20 − 2)(20 + 2) = 400 − 4 = 396, in your head. The difference of squares is a fact about numbers, not just x's.

Why this matters

Perfect squares are the engine of completing the square — two lessons from now, x² + bx + (b/2)² will become (x + b/2)², and the quadratic formula falls out of that single recognition.

Check your understanding

Question 1 of 2

Factor: 9x² − 16

Next lesson