Skip to content
LoveToCalc

Identity — what does that mean?

Difference of cubes

The same rule as for the sum, with every sign touching b flipped — and a trinomial where everything is a plus.

In Swedish: Differensen av två kuber

(a−b)(a²+ab+b²)=a³−b³

a
First term
b
Second term
Show why the formula is true
  1. Multiply every term in the first bracket by every term in the second.

    (a−b)(a²+ab+b²)=a³+aab+ab²−ba²−bab−b³

  2. The same term, aab, was added and taken away again, so the pair cancels.

    a³+aab+ab²−ba²−bab−b³=a³+ab²−bab−b³

  3. The same term, ab², was added and taken away again, so the pair cancels.

    a³+ab²−bab−b³=a³−b³

The rule

The card above states the equality the other way round, (a − b)(a² + ab + b²) = a³ − b³. The proof multiplies the product out; read backwards, the same equality is the factorisation, which is how it stands at the top here.

If you meant the sum, it is on sum of cubes. The two factorisations differ only in their signs.

Three signs differ, not one

Expression First bracket Trinomial
a³ − b³ (a − b) (a² + ab + b²)
a³ + b³ (a + b) (a² − ab + b²)

The trinomial here is all plus signs, which is easy to remember because it is the simpler of the two. The bracket inherits the expression’s sign; the trinomial takes the opposite.

How it differs from the squares

The difference of squares says a² − b² = (a + b)(a − b). Two brackets, each with two terms, and neither factors further.

Here you get one bracket with two terms and a trinomial with three. The reason is that cubes produce six products when multiplied out against the squares’ four — more terms are needed for four of them to cancel in pairs.

And unlike the squares, both signs work. a² + b² does not factor over the reals; a³ + b³ does.

Factoring with it

Expression a b Factored
x³ − 8 x 2 (x − 2)(x² + 2x + 4)
x³ − 1 x 1 (x − 1)(x² + x + 1)
27x³ − 64 3x 4 (3x − 4)(9x² + 12x + 16)
x³ − 125 x 5 (x − 5)(x² + 5x + 25)

x³ − 1 is the one most worth recognising. The factor (x − 1) shows that x = 1 is a root, and the other factor, x² + x + 1, has no real roots, so x = 1 is the only real solution of x³ = 1.

Common mistakes

Common questions

Can the trinomial be factored further? Not over the reals. a² + ab + b² has discriminant −3b², which is negative for every b ≠ 0. Here and in the sum’s version alike, the factorisation is finished after one step.

Is there a rule for a⁵ − b⁵ as well? Yes, for every positive whole-number exponent n: aⁿ − bⁿ has (a − b) as a factor. The second factor grows by one term each time — for the fifth power it is a⁴ + a³b + a²b² + ab³ + b⁴. Same pattern, more terms.

Last reviewed October 6, 2026 ·How pages are reviewed

AlgebraAll formulas