In short
The identity is
and the second factor reorganises into a sum of squares:
Two facts pop out immediately. First, if x + y + z = 0, then x^3 + y^3 + z^3 = 3xyz. Second, the bracket of squared differences is always \geq 0, so the sign of the whole expression is locked to the sign of x + y + z. From that, the AM-GM inequality for three positive numbers falls out in one line.
You are sitting with the expression x^3 + y^3 + z^3 - 3xyz and someone tells you it factors. Your first reaction should be disbelief. Three cubes added together do not normally factor — x^3 + y^3 + z^3 on its own is stubbornly irreducible. So why does subtracting 3xyz — that one specific quantity, with that specific coefficient — suddenly unlock everything?
The answer is that 3xyz is not picked at random. It is the exact correction term that makes x + y + z become a factor. Once you see why, the whole identity feels less like a miracle and more like a forced move.
The factorisation itself
The fastest way to see why x + y + z has to be a factor is the substitution trick. Suppose x + y + z = 0. Then x = -(y + z). Plug that into x^3 + y^3 + z^3 - 3xyz:
So
And -3xyz = -3 \cdot (-(y+z)) \cdot yz = 3yz(y+z). Add the two:
So whenever x + y + z = 0, the expression is zero.
Why this forces x + y + z to be a factor: the Factor Theorem for polynomials says that if a polynomial P(x, y, z) vanishes whenever some other polynomial Q vanishes, and Q is irreducible, then Q divides P. Here Q = x + y + z is linear, hence irreducible. We just showed P vanishes on the set \{x + y + z = 0\}. Therefore (x + y + z) must divide x^3 + y^3 + z^3 - 3xyz.
That is the why. Now the what — what is the other factor? Polynomial division is one route. A faster route: the original expression has degree 3, and the linear factor has degree 1, so the other factor must have degree 2 and be symmetric in x, y, z (because the original is symmetric). The most general symmetric quadratic is A(x^2 + y^2 + z^2) + B(xy + yz + zx). Expanding (x + y + z)\,[A(x^2 + y^2 + z^2) + B(xy + yz + zx)] and matching coefficients with x^3 + y^3 + z^3 - 3xyz pins down A = 1 and B = -1. So
You can verify by direct expansion. Multiply (x + y + z)(x^2 + y^2 + z^2 - xy - yz - zx) term by term and almost everything cancels — only x^3, y^3, z^3, and -3xyz survive. The cancellation is the same magic that makes a^3 + b^3 = (a + b)(a^2 - ab + b^2) work, just stretched to three variables.
The "sum of squared differences" form
The second factor, x^2 + y^2 + z^2 - xy - yz - zx, looks asymmetric and slightly ugly. It is not. Multiply it by 2 and watch what happens:
Now regroup:
So
Why the symmetry forces this: the second factor is symmetric in x, y, z (it is unchanged when you swap any two variables). When a symmetric quadratic vanishes at x = y = z (which this one does — substitute and you get 3x^2 - 3x^2 = 0), it tends to organise itself around the differences of the variables. The squared-differences form is the natural canonical version of that.
This rearrangement is the heart of the identity. A sum of three real squares is never negative — each (x - y)^2 \geq 0, (y - z)^2 \geq 0, (z - x)^2 \geq 0, so their sum is \geq 0. And it equals zero only when all three differences are zero, i.e. when x = y = z. Combining with the linear factor:
The sign of the left-hand side is locked to the sign of x + y + z, because the bracket is always \geq 0.
Consequences
Three immediate corollaries fall out, each one a small theorem in its own right.
Corollary 1: if x + y + z = 0, then x^3 + y^3 + z^3 = 3xyz
Plug x + y + z = 0 into the identity. The right-hand side has a factor of (x + y + z) = 0, so the right-hand side is zero. Therefore x^3 + y^3 + z^3 - 3xyz = 0, i.e.
This is the result that shows up most often in JEE Advanced problems. The moment a problem says "the roots of a cubic with no x^2 term", or "three numbers summing to zero", you should reach for this corollary.
Corollary 2: if x = y = z, both sides are zero
If x = y = z, the bracket of squared differences becomes 0 + 0 + 0 = 0. So the right-hand side is zero. Independently, the left-hand side is 3x^3 - 3x \cdot x \cdot x = 3x^3 - 3x^3 = 0. Both sides agree, as they must.
Corollary 3: AM-GM for three variables
For non-negative real numbers x, y, z \geq 0, the bracket (x - y)^2 + (y - z)^2 + (z - x)^2 is \geq 0 and the linear factor (x + y + z) is also \geq 0. So
which rearranges to
Substituting x \to a^{1/3}, y \to b^{1/3}, z \to c^{1/3} for non-negative a, b, c:
That is the AM-GM inequality for three variables, derived in two lines from the cubic identity. Equality holds when a = b = c — exactly when the squared-differences bracket is zero.
The full story of this inequality lives at AM-GM-HM Inequality, but the cubic identity is one of its cleanest proofs.
Example 1: $x = y = z = 1$
With x = y = z = 1, the left-hand side is 1 + 1 + 1 - 3 \cdot 1 \cdot 1 \cdot 1 = 3 - 3 = 0.
The right-hand side, using the factored form, is (1 + 1 + 1)\,(1 + 1 + 1 - 1 - 1 - 1) = 3 \cdot 0 = 0.
Or using the squared-differences form: \tfrac{1}{2} \cdot 3 \cdot [(1-1)^2 + (1-1)^2 + (1-1)^2] = \tfrac{3}{2} \cdot 0 = 0.
Both factored forms give 0, matching the left-hand side. The expression is exactly zero whenever the three variables coincide — which is the equality case of AM-GM.
Example 2: $x = 1, y = 2, z = -3$ (sum is zero)
Here x + y + z = 1 + 2 - 3 = 0, so Corollary 1 should apply: x^3 + y^3 + z^3 ought to equal 3xyz.
Left-hand side: 1^3 + 2^3 + (-3)^3 = 1 + 8 - 27 = -18.
Three-times-product: 3 \cdot 1 \cdot 2 \cdot (-3) = -18.
They match. The factored form also confirms it: (x + y + z) \cdot (\ldots) = 0 \cdot (\ldots) = 0, so x^3 + y^3 + z^3 - 3xyz = 0, i.e. x^3 + y^3 + z^3 = 3xyz = -18. Tick.
This is the corollary you would use on a JEE problem like: "If a + b + c = 0 and a^3 + b^3 + c^3 = -27, find abc." Answer: abc = -9, instantly, no expansion needed.
Example 3: AM-GM for three positive numbers
Claim. For any a, b, c \geq 0, \dfrac{a + b + c}{3} \geq \sqrt[3]{abc}, with equality iff a = b = c.
Proof. Let x = a^{1/3}, y = b^{1/3}, z = c^{1/3} — all non-negative since a, b, c \geq 0. Then x^3 = a, y^3 = b, z^3 = c, and xyz = (abc)^{1/3}.
Apply the identity:
The right-hand side is a product of two non-negative quantities (since x, y, z \geq 0 makes x + y + z \geq 0, and the bracket of squares is always \geq 0). So
Divide by 3:
Equality holds when the bracket vanishes, i.e. when x = y = z, i.e. when a = b = c. The whole argument is the cubic identity dressed in different variables.
Why this identity matters
You will meet this identity over and over in JEE problems. It is the swiss-army knife for any question involving three variables that sum to zero, three roots of a depressed cubic, or symmetric expressions in three unknowns. It also gives the slickest proof of three-variable AM-GM, which is itself a workhorse for inequality problems.
The deeper reason it is "beautiful": it bridges algebra (a polynomial identity), inequality theory (a sum of squares), and the Factor Theorem (the substitution argument that forced x + y + z to be a factor). One identity, three different mathematical traditions speaking through it. That is why it is worth knowing by heart.
If you want to dig further into how the squared-differences trick generalises, see Sum of Squares Form and the related identities at Algebraic Identities.
References
- Factor Theorem (Wikipedia) — the substitution argument used to force x + y + z as a factor.
- AM-GM Inequality (Wikipedia) — the inequality that drops out of the squared-differences form.
- Symmetric Polynomials (Wikipedia) — why the second factor must be symmetric.
- Newton's Identities — generalises the relationship between power sums like x^3+y^3+z^3 and elementary symmetric polynomials.