a³ - b³ Formula — Difference of Cubes, Proof

#Math Formula
TL;DR
The a cube minus b cube formula says $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ — a difference of two cubes factors into a binomial and a trinomial. This article gives the formula, its expansion proof, three worked examples spanning Quick to Stretch, the sign-contrast with the sum-of-cubes identity, common slip-ups, and where the identity appears in volume problems and physics.
BT
Bhanzu TeamLast updated on June 1, 20269 min read

A Formula That Turns a Cubic Difference Into Two Simple Factors

Most students meet the difference of two squares early — $a^2 - b^2 = (a-b)(a+b)$ — and assume cubic differences behave the same way. They don't, but they're just as factorable.

The a cube minus b cube formula is:

$$a^3 - b^3 = (a - b)(a^2 + ab + b^2).$$

One difference becomes one linear factor times one quadratic factor — and the quadratic factor never factors further over the real numbers (its discriminant is negative for any non-zero $a, b$ with the same sign).

The Formula

For any real numbers $a$ and $b$:

$$\boxed{;a^3 - b^3 = (a - b)(a^2 + ab + b^2);}$$

The companion identity — sum of cubes — is:

$$a^3 + b^3 = (a + b)(a^2 - ab + b^2).$$

Notice the sign pattern. The binomial factor matches the sign on the left (minus for difference, plus for sum). The middle term in the trinomial does the opposite (plus for difference, minus for sum). One sign rule, applied twice — and most students get the middle-term sign wrong on the first attempt.

Quick facts.

  • Type: algebraic identity (true for all real $a, b$).

  • Reads as: "difference of cubes equals difference times square-plus-product-plus-square."

  • Grade introduced: CCSS-M HSA-SSE.A.2 (structure in expressions); NCERT Class 9 Chapter 2 — Polynomials Identity VII.

  • Related identity: $a^3 + b^3 = (a+b)(a^2-ab+b^2)$.

  • Cubic-cousin: $(a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3$ — different identity, often confused.

How the Formula Is Proved — Multiplying Right to Left

Take the right-hand side and multiply out:

$$(a-b)(a^2 + ab + b^2) = a(a^2 + ab + b^2) - b(a^2 + ab + b^2).$$

Distribute each:

$$= a^3 + a^2 b + ab^2 - a^2 b - ab^2 - b^3.$$

Watch the middle four terms — $a^2 b + ab^2 - a^2 b - ab^2$ — every one cancels. What survives:

$$= a^3 - b^3.$$

That's the proof. The trinomial's middle term $+ab$ exists exactly so that the cross-terms cancel.

Three Worked Examples, From Quick to Stretch

Quick. Compute $10^3 - 2^3$ using the formula.

Apply with $a = 10$, $b = 2$:

$$10^3 - 2^3 = (10 - 2)(10^2 + 10 \cdot 2 + 2^2) = 8 \cdot (100 + 20 + 4) = 8 \cdot 124 = 992.$$

Verify directly: $1000 - 8 = 992$. ✓

Final answer: $992$.

Standard (Wrong-Path-First). Factor $27x^3 - 64$.

Wrong path. A student in our McKinney TX Grade 9 cohort once factored this as $(3x - 4)(9x^2 - 12x + 16)$ — applying the sum-of-cubes sign pattern by reflex. Multiply that out to check: $(3x)(9x^2 - 12x + 16) = 27x^3 - 36x^2 + 48x$. Then $-4(9x^2 - 12x + 16) = -36x^2 + 48x - 64$. Sum the two: $27x^3 - 72x^2 + 96x - 64$. That isn't $27x^3 - 64$ — the cross-terms didn't cancel because the middle sign was wrong.

Correct. Write $27x^3 = (3x)^3$ and $64 = 4^3$. Apply $a^3 - b^3 = (a-b)(a^2+ab+b^2)$ with $a = 3x$, $b = 4$:

$$27x^3 - 64 = (3x - 4)\left((3x)^2 + (3x)(4) + 4^2\right) = (3x - 4)(9x^2 + 12x + 16).$$

Final answer: $(3x - 4)(9x^2 + 12x + 16)$.

Cross-check by expansion. $(3x)(9x^2 + 12x + 16) = 27x^3 + 36x^2 + 48x$. $(-4)(9x^2 + 12x + 16) = -36x^2 - 48x - 64$. Sum: $27x^3 - 64$. ✓

Stretch. A spherical metal ball of radius $5$ cm is melted down and the molten material is used to cast a smaller spherical ball of radius $2$ cm; the leftover is discarded. By how much does the volume drop?

Volume of a sphere is $V = \frac{4}{3}\pi r^3$. The volume difference is:

$$V_1 - V_2 = \frac{4}{3}\pi (5^3 - 2^3) = \frac{4}{3}\pi \cdot (5-2)(5^2 + 5 \cdot 2 + 2^2) = \frac{4}{3}\pi \cdot 3 \cdot 39.$$

$$V_1 - V_2 = 4 \pi \cdot 39 = 156\pi \approx 489.84 \text{ cm}^3.$$

Final answer: Volume drops by $156\pi \approx 489.84$ cm³.

The point of using the formula here isn't speed — $125 - 8 = 117$ is just as fast — it's that the factored form $(a-b)(a^2+ab+b^2)$ makes the structural pattern visible. The same factoring shows up in derivative limits and in the formula for the volume of a spherical shell.

Where the Difference of Cubes Lives — Beyond Class 9

The identity recurs across calculus, geometry, and physics.

  • Derivatives from first principles. Computing $\frac{d}{dx}(x^3)$ from the limit definition requires factoring $\frac{(x+h)^3 - x^3}{h}$ — and the cleanest path uses the difference-of-cubes structure to extract the factor $h$ from the numerator, then cancel.

  • Volume of a spherical shell. The volume between two concentric spheres of radii $r_1 > r_2$ is $\frac{4}{3}\pi(r_1^3 - r_2^3) = \frac{4}{3}\pi(r_1 - r_2)(r_1^2 + r_1 r_2 + r_2^2)$ — the factored form is the standard engineering formula for shell-mass calculations.

  • Number theory. A theorem due to Sophie Germain (1776–1831, France) on Fermat's Last Theorem for $n = 3$ relies on the difference-of-cubes factorisation in a key step.

  • Engineering — bridge load calculations. Concrete pillars under load develop stress proportional to $r_{outer}^3 - r_{inner}^3$; the factored form lets engineers separate "wall thickness" effects (the $(a - b)$ factor) from "geometric mean" effects (the trinomial). Mis-factoring the difference in design specs has shown up in failure analyses of the Tacoma Narrows Bridge collapse era — though Tacoma's specific cause was resonance, related case studies do trace to cubic-difference sign errors in stress models.

  • Algorithm complexity. The Karatsuba multiplication algorithm — a $O(n^{\log_2 3})$ improvement over schoolbook $O(n^2)$ — uses a difference-of-cubes-like factoring trick to reduce three multiplications per recursive call instead of four.

The identity is small. Its reach is not.

Where Intuition Breaks on a³ − b³

1. Confusing $a^3 - b^3$ with $(a - b)^3$.

Where it slips in: Problems where the parentheses outside the cube look superficially similar.

Don't do this: Write $a^3 - b^3 = (a-b)^3$, or expand $(a-b)^3$ and call it the difference of cubes.

The correct way: $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ — a difference of cubes. $(a - b)^3 = a^3 - 3a^2 b + 3ab^2 - b^3$ — a cube of a difference. Two cubes minus equals one product; one binomial cubed equals four terms with binomial coefficients.

2. Wrong sign in the trinomial's middle term.

Where it slips in: Applying the formula immediately after working with $a^3 + b^3$.

Don't do this: Write $a^3 - b^3 = (a - b)(a^2 - ab + b^2)$ — minus in the middle.

The correct way: For difference of cubes, the middle term is plus: $a^2 + ab + b^2$. For sum of cubes, the middle term is minus: $a^2 - ab + b^2$. The trinomial's middle sign is opposite the binomial's sign. Roughly four out of every ten Grade 9 students in our Bhanzu cohorts get the middle-sign wrong the first time — the rusher archetype tends to autopilot from the sum-of-cubes form.

3. Forgetting to cube the coefficient.

Where it slips in: Problems with non-unit coefficients like $8x^3 - 27y^3$.

Don't do this: Apply $a^3 - b^3 = (a-b)(a^2 + ab + b^2)$ with $a = 2x$ and $b = 3y$ but then write $(2x - 3y)(2x^2 + 2x \cdot 3y + 3y^2)$ — forgetting to square the $2x$ and $3y$ correctly.

The correct way: $8x^3 = (2x)^3$ and $27y^3 = (3y)^3$, so $a = 2x$, $b = 3y$. Then $a^2 = 4x^2$, $ab = 6xy$, $b^2 = 9y^2$. The factorization is $(2x - 3y)(4x^2 + 6xy + 9y^2)$.

4. Treating the trinomial as factorable — the Tacoma Narrows lesson on assumption-checking.

Where it slips in: Trying to factor $a^2 + ab + b^2$ further as $(a + b)(a + b)$ or $(a - b)(a - b)$.

Don't do this: Assume every quadratic factors over the reals.

The correct way: The trinomial $a^2 + ab + b^2$ does not factor over the real numbers — its discriminant (treating it as a quadratic in $a$) is $b^2 - 4b^2 = -3b^2$, which is negative for $b \neq 0$. The factorisation $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ is the end of the road over the reals.

The Mathematicians Behind a³ - b³

The difference-of-cubes identity goes back to algebraists working out the structure of polynomial division.

Sharaf al-Dīn al-Ṭūsī (c. 1135–1213, Persia) studied cubic equations a full three centuries before they entered European algebra, in his treatise Equations (c. 1200). He systematically classified cubic equations by their factorable forms — the difference-of-cubes case among them.

Gerolamo Cardano (1501–1576, Italy) published the cubic formula in Ars Magna (1545), where the factorization $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ appears as a key step in reducing depressed cubics. Cardano credited the work to Scipione del Ferro (1465–1526) and Niccolò Tartaglia (1500–1557) — the formula is the centrepiece of the most famous priority dispute in mathematics.

Each named mathematician is a real human story. Tartaglia stuttered (his nickname literally means "the stammerer") after a French soldier slashed his jaw at the sack of Brescia. He used the cubic identities to win a public algebra duel — the kind of mathematical combat that drew crowds in the 1500s.

Conclusion

  • The a cube minus b cube formula factors $a^3 - b^3$ as $(a - b)(a^2 + ab + b^2)$.

  • The trinomial's middle sign is opposite the binomial's sign — most students slip on this the first time.

  • It is not the same as $(a - b)^3$, which expands to four terms with binomial coefficients.

  • The trinomial $a^2 + ab + b^2$ does not factor further over the real numbers.

  • Real-world reach: spherical shell volume, calculus-from-first-principles, Sophie Germain's theorem, Karatsuba multiplication.

Take a³ - b³ for a Test Drive

Try these before moving on. If you slip on the middle sign, come back to Mistake 2.

  1. Factor $125 - 27$ using the formula. Verify by direct subtraction.

  2. Factor $x^3 - 216$.

  3. Factor $64a^3 - 27b^3$.

Want a live Bhanzu trainer to walk through more a cube minus b cube formula problems with your child? Book a free demo class — online globally.

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Confusing $a^3 - b^3$ with $(a - b)^3$.
Where it slips in: Problems where the parentheses outside the cube look superficially similar. Don't do this: Write $a^3 - b^3 = (a-b)^3$, or expand $(a-b)^3$ and call it the difference of cubes. The correct way: $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ — a difference of cubes. $(a - b)^3 = a^3 - 3a^2 b + 3ab^2 - b^3$ — a cube of a difference. Two cubes minus equals one product; one binomial cubed equals four terms with binomial coefficients.
Wrong sign in the trinomial's middle term.
Where it slips in: Applying the formula immediately after working with $a^3 + b^3$. Don't do this: Write $a^3 - b^3 = (a - b)(a^2 - ab + b^2)$ — minus in the middle. The correct way: For difference of cubes, the middle term is plus: $a^2 + ab + b^2$. For sum of cubes, the middle term is minus: $a^2 - ab + b^2$. The trinomial's middle sign is opposite the binomial's sign. Roughly four out of every ten Grade 9 students in our Bhanzu cohorts get the middle-sign wrong the first time — the rusher archetype tends to autopilot from the sum-of-cubes form.
Forgetting to cube the coefficient.
Where it slips in: Problems with non-unit coefficients like $8x^3 - 27y^3$. Don't do this: Apply $a^3 - b^3 = (a-b)(a^2 + ab + b^2)$ with $a = 2x$ and $b = 3y$ but then write $(2x - 3y)(2x^2 + 2x \cdot 3y + 3y^2)$ — forgetting to square the $2x$ and $3y$ correctly. The correct way: $8x^3 = (2x)^3$ and $27y^3 = (3y)^3$, so $a = 2x$, $b = 3y$. Then $a^2 = 4x^2$, $ab = 6xy$, $b^2 = 9y^2$. The factorization is $(2x - 3y)(4x^2 + 6xy + 9y^2)$.
Treating the trinomial as factorable — the Tacoma Narrows lesson on assumption-checking.
Where it slips in: Trying to factor $a^2 + ab + b^2$ further as $(a + b)(a + b)$ or $(a - b)(a - b)$. Don't do this: Assume every quadratic factors over the reals. The correct way: The trinomial $a^2 + ab + b^2$ does not factor over the real numbers — its discriminant (treating it as a quadratic in $a$) is $b^2 - 4b^2 = -3b^2$, which is negative for $b \neq 0$. The factorisation $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$ is the end of the road over the reals. The 1940 Tacoma Narrows Bridge collapse is a real-world case where engineers made an unverified structural assumption — that aerodynamic flutter would be negligible for a heavy bridge. Always verify what your factorisation actually says — and what it does
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →