Intermediate level

Special products

Seven identities that turn multiplying out brackets into a single line — and the same seven read right to left, which is factoring. The square of a sum and of a difference, the difference of squares, the cubes and the sum and difference of cubes, proved on a drawing and used for mental arithmetic.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

Where this is used

Real situations where you count exactly the way this lesson teaches:

  • Mental arithmetic at the till
    The product 98 · 102 is (100 − 2)(100 + 2), so 10,000 − 4 = 9,996. In the same way 47 · 53 = 50² − 3² = 2,500 − 9 = 2,491. Any product of two numbers sitting symmetrically around a round hundred or fifty collapses into a single subtraction.
  • A plot of land and a wider garden
    A square plot has a 40 m side. Widening it by 3 m on every side adds (40 + 3)² − 40² = 6 · 40 + 9 = 249 m², not 2 · 3 · 40 = 240 m² — the missing 9 m² is the little corner square that the square-of-a-sum formula remembers for you.
  • Mechanics and braking energy
    The energy that has to be shed braking from v₁ to v₂ is ½m(v₁² − v₂²) = ½m(v₁ − v₂)(v₁ + v₂). For a 1,000 kg car slowing from 20 m/s to 10 m/s that is 500 · 10 · 30 = 150,000 J — 150 kJ turned into heat in the brake pads.
  • Programming and cheaper arithmetic
    Testing a² − b² = 0 over a million pairs costs two multiplications per pair — two million in total. Written as (a − b)(a + b) it costs one multiplication and two additions per pair: a million multiplications fewer, and an addition is markedly cheaper than a multiplication in a CPU.

All formulas

  • Square of a sum

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

    the middle term is twice the product, not the product

  • Square of a difference

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

    both squares positive, the minus sits on the middle term only

  • Difference of squares

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

    the only one of these where the middle term disappears

  • Cube of a sum

    (a+b)3=a3+3a2b+3ab2+b3(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3

    coefficients 1, 3, 3, 1

  • Cube of a difference

    (ab)3=a33a2b+3ab2b3(a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3

    alternating signs, starting with a plus

  • Difference of cubes

    a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)

    a plus on the middle term of the bracket

  • Sum of cubes

    a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2)

    a minus on the middle term of the bracket

Multiplying (x+7)(x+7)(x + 7)(x + 7) can be done term by term and then collected. But the same computation comes back a dozen times a day and always ends the same way. Special products are those repeated results written down once — (x+7)2(x + 7)^2 becomes x2+14x+49x^2 + 14x + 49 in a single move, with nothing to expand.

What matters more is that every one of them works both ways. Left to right it is expanding; right to left it is factoring, the step that opens cancelling in rational expressions and solving inequalities.

The square of a sum and of a difference

(a+b)2=a2+2ab+b2(ab)2=a22ab+b2(a + b)^2 = a^2 + 2ab + b^2 \qquad (a - b)^2 = a^2 - 2ab + b^2

Where the middle term comes from is clearest as an area. A square of side a+ba + b cuts into four pieces: the square a2a^2, the square b2b^2 and two identical rectangles of area abab each.

a + ba + b
A square of side a + b. Cut along the division of its side it leaves four pieces: a², b² and two rectangles a·b.

Two rectangles — hence 2ab2ab, not abab. That is the whole content of the identity, and the exact place where it is usually dropped.

In the square of a difference only the sign of the middle term changes. The outer terms are squares, so they stay positive:

(x5)2=x210x+25(x - 5)^2 = x^2 - 10x + 25
Expand (2x + 3)² and (3a − 4b)².

The difference of squares

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

This is the only one of the identities where the middle term vanishes: expanding leaves a2+abbab2a^2 + ab - ba - b^2, and abab cancels baba.

Geometrically: cut a square of side bb out of a square of side aa, and rearrange what is left into a single rectangle with sides aba - b and a+ba + b.

a + ba − b
A rectangle with sides a − b and a + b has exactly the area of the square a² with the square b² taken out.

The identity is the shortest route to a product done in the head. The numbers 9898 and 102102 sit symmetrically around a hundred, so:

98102=(1002)(100+2)=100222=100004=999698 \cdot 102 = (100 - 2)(100 + 2) = 100^2 - 2^2 = 10\,000 - 4 = 9996

A sum of squares a2+b2a^2 + b^2 does not factor — there is no such identity, and the reason shows up in quadratic equations: x2+4=0x^2 + 4 = 0 has no real roots, so it has no real factors either.

Reading the identity backwards: factoring

The same equality read right to left turns a sum into a product:

x29=x232=(x3)(x+3)x^2 - 9 = x^2 - 3^2 = (x - 3)(x + 3) 4x2+20x+25=(2x)2+22x5+52=(2x+5)24x^2 + 20x + 25 = (2x)^2 + 2 \cdot 2x \cdot 5 + 5^2 = (2x + 5)^2

Recognizing a perfect square comes down to three checks: are the outer terms squares, do they share a sign, and is the middle term twice the product of their roots. If any one of them fails, the identity is not there.

Factor 49 − 25y² and x² + 12x + 36.

Cubes

The same identities one degree up. The cube of a sum has coefficients 1,3,3,11, 3, 3, 1, and the cube of a difference has the same coefficients with alternating signs:

(a+b)3=a3+3a2b+3ab2+b3(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 (ab)3=a33a2b+3ab2b3(a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3

Two further identities factor a sum and a difference of cubes. Unlike squares, both of them factor here:

a3b3=(ab)(a2+ab+b2)a3+b3=(a+b)(a2ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2) \qquad a^3 + b^3 = (a + b)(a^2 - ab + b^2)

The signs are crossed, and that is the only thing to remember: the minus in the first bracket goes with a plus on the middle term of the second, and the other way round.

x38=x323=(x2)(x2+2x+4)x^3 - 8 = x^3 - 2^3 = (x - 2)(x^2 + 2x + 4)

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
expand (x − 1)²

Common mistakes

  • Losing the doubling(a+b)2(a + b)^2 is a2+2ab+b2a^2 + 2ab + b^2, never a2+b2a^2 + b^2. The numerical check takes three seconds: (3+4)2=49(3 + 4)^2 = 49, while 9+16=259 + 16 = 25.
  • Not squaring the coefficient — in (2x+3)2(2x + 3)^2 the first term is (2x)2=4x2(2x)^2 = 4x^2, not 2x22x^2.
  • A negative square — in (ab)2(a - b)^2 the minus belongs to the middle term only; b2b^2 stays positive, because it is a square.
  • Factoring a sum of squaresa2+b2a^2 + b^2 has no factorization over the reals. Only the difference factors.
  • Crossing the signs in the cubes — in the factorization of a3b3a^3 - b^3 the second bracket carries a plus on abab, even though the original difference carries a minus.

Formula card

Topic: Special products

  • Square of a sum

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

    the middle term is twice the product, not the product

  • Square of a difference

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

    both squares positive, the minus sits on the middle term only

  • Difference of squares

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

    the only one of these where the middle term disappears

  • Cube of a sum

    (a+b)3=a3+3a2b+3ab2+b3(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3

    coefficients 1, 3, 3, 1

  • Cube of a difference

    (ab)3=a33a2b+3ab2b3(a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3

    alternating signs, starting with a plus

  • Difference of cubes

    a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)

    a plus on the middle term of the bracket

  • Sum of cubes

    a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2)

    a minus on the middle term of the bracket

a + ba + b
A square of side a + b. Its area is (a + b)², and cut apart it is a², b² and two rectangles a·b.
a + ba − b
A rectangle with sides a − b and a + b comes from the square a² with the square b² cut out — which is why its area is a² − b².

Frequently asked questions

Related articles