← everywhy
ALGEBRA · DIFFERENCE OF CUBES

What is a³ − b³, really?

The textbook says a³ − b³ = (a − b)(a² + ab + b²). That middle +ab looks random, and the plus signs look wrong for a subtraction. They aren't: take a cube, cut a smaller cube out of its corner, and the leftover splits into three boxes that all share one edge.

Drag to turn the blocks

The same thing, in algebra

The blocks are the picture. Here are the two ways you'd see it on paper — and how they line up with the three boxes.

Check it: multiply out the right side

Distribute a, then distribute −b. The four middle terms cancel in pairs:

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

Derive it: add and subtract, pull out (a − b)

If a = b, then a³ − b³ = 0 — so (a − b) must be a factor. Sneak in −a²b + a²b and −ab² + ab² to make it appear three times:

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

Those three terms are the three boxes: a²(a − b) is the bottom slab, ab(a − b) the bar, b²(a − b) the block behind the hole. "Add and subtract" in algebra is "cut into pieces" in the picture — and pulling out (a − b) is the distributive property read backwards.

Your turn: any a and b

Change the sizes and flip between the three views. Whatever a and b are, the leftover always cuts into three boxes that are a − b deep.

Replay: three moves

1

Cut a corner out

A cube of side a minus a corner cube of side b leaves exactly a³ − b³ little cubes — but in a notched, awkward shape.

2

Slice the leftover into three boxes

A bottom slab a·a·(a − b), a bar a·b·(a − b), and a block b·b·(a − b). Every one of them has an edge of length a − b: the depth of the notch.

3

Line them up by that shared edge

Turn each box so its a − b edge faces you and push them together. One slab, a − b deep, with a front face of a² + ab + b². Volume = depth × face.

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

That's the difference of cubes. All three signs inside the second bracket are +, because all three boxes are there — nothing in the picture is taken away twice.

Its twin: a³ + b³

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

For a sum of cubes, the first bracket flips to (a + b) and only the middle sign flips to minus. (The picture for this one needs a cube added to a cube — a story for another day.)

A memory hook, SOAP: the first sign is the Same as the original, the middle is Opposite, the last is Always Positive. Check it on numbers: 1001 = 10³ + 1³ = 11 × 91.

Practice: spot the trap

Nine problems built on the mistakes people actually make — a stray minus in the middle, forgetting to cube-root first, (a − b)³ in disguise. Pick an answer, then tap the wrong ones too: each hides a specific slip.

First-try score: 0 / 0