Skip to content
LoveToCalc

Identity — what does that mean?

Sum of cubes

A sum of two cubes factors, unlike a sum of two squares. That exception is what the rule is about.

In Swedish: Summan 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 same equality the other way round, (a + b)(a² − ab + b²) = a³ + b³, because that is the direction the proof runs: two brackets multiply out step by step, while getting from a³ + b³ to brackets means finding the factor first. It is one line — an equals sign reads both ways — and the reading you usually need is the one at the top.

It is the sum of two cubes that factors, and that is worth pausing on. A sum of two squares, a² + b², does not factor over the reals. For cubes both signs work, which makes the difference of cubes a twin rather than a special case.

The sign in the middle

This is where mistakes happen. The bracket takes a plus, the trinomial a minus:

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

The signs cross. The rule of thumb: the bracket inherits the sign from the expression, the trinomial takes the opposite one, and the last term of the trinomial is always a plus.

That the trinomial has no doubled product is the other difference from the square of a sum. There it is 2ab; here it is ab. That is not something to memorise but something the proof produces: multiplying the brackets out gives six products, and four of them cancel in two pairs.

Factoring with it

The expression has to be two cubes. Train the eye on the common ones:

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

The last row is the valuable one: x³ + 1 does not look like two cubes until you see that 1 is 1³.

What it is good for. A fraction like (x³ + 8)/(x + 2) reduces to x² − 2x + 4 once the numerator is factored. And x = −2 is a root of x³ + 8, which the factor (x + 2) shows at a glance.

Common mistakes

Common questions

Is there a matching rule for fourth powers? a⁴ − b⁴ works, by the difference of squares twice: (a² − b²)(a² + b²) = (a − b)(a + b)(a² + b²). a⁴ + b⁴ factors over the reals too, though not over the integers: (a² + √2·ab + b²)(a² − √2·ab + b²). It is a² + b² that does not.

How do you know the proof is right? Multiply the two brackets out and see what is left. Six products come out, the a²b terms cancel and the ab² terms cancel. a³ + b³ remains. The card above shows every step.

Last reviewed October 6, 2026 ·How pages are reviewed

AlgebraAll formulas