What Is A Difference Of Cubes? (3 Key Ideas You Should Know)


A difference of cubes is used in algebra to factor cubic or higher degree polynomials.  The predictable formula for factoring a difference of cubes saves us time if we can recognize the general form.

So, what is a difference of cubes?  A difference of cubes has the form A3 – B3 and factors as (A – B)(A2 + AB + B2). Each term in a difference of cubes has a perfect cube numerical coefficient and exponents that are multiples of 3. In some cases, we need to factor out a GCF (greatest common factor) to reveal a difference of cubes.

Of course, there is also a formula for a sum of cubes: A3 + B3 = (A + B)(A2 – AB + B2).

In this article, we’ll talk about difference of cubes and when to use this formula.  We’ll also answer some common questions and look at some examples to make the concepts clear.

Let’s get started.

What Is A Difference Of Cubes?

A difference of cubes is an expression with exactly two terms with opposite signs (one is positive, and the other is negative). Each term has a perfect cube numerical coefficient (such as 1, 8, 27, 64, 125, etc.), and the exponent of every variable is a multiple of 3 (3, 6, 9, 12, etc.)

The formula for factoring a difference of cubes is given by:

  • A3 – B3 = (A – B)(A2 + AB + B2)

The following table summarizes what you should look for to recognize a difference of cubes.

CharacteristicWhat To
Look For
Number
Of Terms
2
Signs
Of Terms
+ and –
(one positive,
one negative)
Numerical
Coefficients
Perfect
Cubes:
1, 8, 27,
64, 125,
216, etc.
Exponents
On Variables
Multiples
of 3: 3, 6,
9, 12, 15,
18, 21 etc.
This table summarizes what you should
look for to recognize a difference of cubes.

Note that we can also write a similar formula for factoring a sum of cubes:

  • A3 + B3 = (A + B)(A2 – AB + B2)

When To Use Difference Of Cubes

We use a difference of cubes to factor certain cubic expressions or as part of the process to factor higher-degree polynomials.

Let’s take a look at some examples that show how to factor a difference of cubes.

Example 1: Factor A Difference Of Cubes

Let’s say we want to factor the expression 8x3 – y6.

We can recognize this as a difference of cubes, since:

  • There are exactly two terms: 8x3 and –y3
  • The two terms have opposite signs (+ and –)
  • The numerical coefficients are perfect cubes: 8 = 23 and 1 = 13
  • The exponents on the variables are multiples of 3: 3 for x3 and 6 for y6

So, we can factor this expression using a difference of cubes.  To find A and B, we solve:

  • A3 = 8x3
  • (A3)1/3 = (8x3)1/3
  • A = 81/3x
  • A = 2x

Similarly:

  • B3 = y6
  • (B3)1/3 = (y6)1/3
  • B = y2

Now, we substitute A = 2x and B = y into the formula for factoring a difference of cubes:

  • A3 – B3 = (A – B)(A2 + AB + B2)
  • (2x)3 – (y2)3 = (2x – y2)((2x)2 + (2x)(y2) + (y2)2)
  • 8x3 – y6 = (2x – y2)(4x2 + 2xy2 + y4)

Example 2: Factor A Difference Of Cubes

Let’s say we want to factor the expression 27x6y9 – 64s3t12

We can recognize this as a difference of cubes, since:

  • There are exactly two terms: 27x6y9 and – 64s3t12
  • The two terms have opposite signs (+ and –)
  • The numerical coefficients are perfect cubes: 27 = 33 and 64 = 43
  • The exponents on the variables are multiples of 3: 6 for x6, 9 for y9, 3 for s3, and 12 for t12.

In this case, we have A = 3x2y3 and B = 4st4.

Now, we substitute A = 3x2y3 and B = 4st4 into the formula for factoring a difference of cubes:

  • A3 – B3 = (A – B)(A2 + AB + B2)
  • (3x2y3)3 – (4st4)3 = (3x2y3 – 4st4)((3x2y3)2 + (3x2y3)(4st4) + (4st4)2)
  • 27x6y9 – 64s3t12 = (3x2y3 – 4st4)(9x4y6 + 12x2y3st4 + 16s2t8)

Example 3: Factor A Difference Of Cubes

Let’s say we want to factor the expression 250x4y8z – 16xy2z10.

This does not look like a difference of cubes.  However, we can factor out a GCF (greatest common factor) of 2xy2z from both terms to get:

  • 250x4y8z – 16xy2z10 = 2xy2z(125x3y6 – 8z9)

Now we can recognize the expression in parentheses as a difference of cubes, since:

  • There are exactly two terms: 125x3y6 and – 8z9
  • The two terms have opposite signs (+ and –)
  • The numerical coefficients are perfect cubes: 125 = 53 and 8 = 23
  • The exponents on the variables are multiples of 3: 3 for x3, 6 for y6, and 9 for z9.

In this case, we have A = 5xy2 and B = 2z3.

Now, we substitute A = 5xy2 and B = 2z3 into the formula for factoring a difference of cubes:

  • A3 – B3 = (A – B)(A2 + AB + B2)
  • (5xy2)3 – (2z3)3 = (5xy2  – 2z3)((5xy2)2 + (5xy2)( 2z3) + (2z3)2)
  • 125x3y6 – 8z9 = (5xy2  – 2z3)(25x2y4 + 10xy2z3 + 4z6)

Don’t forget to include the GCF that we factored out earlier to factor completely:

  • 250x4y8z – 16xy2z10
  • = 2xy2z(125x3y6 – 8z9)  [factor out GCF]
  • = 2xy2z(5xy2  – 2z3)(25x2y4 + 10xy2z3 + 4z6)  [factor difference of cubes]

Example 4: Factor A Sum Of Cubes

Let’s say we want to factor the expression x27 – y27.

We can recognize this as a difference of cubes, since:

  • There are exactly two terms: x27 and –y27.
  • The two terms have opposite signs (+ and –)
  • The numerical coefficients are perfect cubes: 1 = 13 and 1 = 13
  • The exponents on the variables are multiples of 3: 27 for x27 and 27 for y27.

In this case, we have A = x9 and B = y9.

Now, we substitute A = x9 and B = y9 into the formula for factoring a difference of cubes:

  • A3 – B3 = (A – B)(A2 + AB + B2)
  • (x9)3 – (y9)3 = (x9 – y9)((x9)2 + (x9)( y9) + (y9)2)
  • x27 – y27 = (x9 – y9)(x18 + x9y9 + y18)

However, this is not factored completely.  Note that the first factor, x9 – y9, is also a difference of cubes, so we factor it as well:

  • x27 – y27
  • =(x9 – y9)(x18 + x9y9 + y18)
  • =(x3 – y3)(x6 + x3y3 + y6)(x18 + x9y9 + y18)

However, we are still not done, since x3 – y3 is also a difference of cubes:

  • =(x – y)(x2 + xy + y2)(x6 + x3y3 + y6)(x18 + x9y9 + y18)

So, the complete factorization (after using a difference of cubes three times) is:

  • x27 – y27 = (x – y)(x2 + xy + y2)(x6 + x3y3 + y6)(x18 + x9y9 + y18)

Example 5: Factor A Sum Of Cubes

Let’s say we want to factor the expression 125x6 + y9.

We can recognize this as a sum of cubes, since:

  • There are exactly two terms: 125x6 and y9
  • The two terms have the same signs (+ and +)
  • The numerical coefficients are perfect cubes: 125 = 53 and 1 = 13
  • The exponents on the variables are multiples of 3: 6 for x6 and 9 for y9

So, we can factor this expression using a sum of cubes.  In this case, A = 5x2 and B = y3.

Now, we substitute A = 5x2 and B = y3 into the formula for factoring a sum of cubes:

  • A3 + B3 = (A + B)(A2 – AB + B2)
  • (5x2)3 + (y3)3 = (5x2 + y3)((5x2)2 – (5x2)(y3) + (y3)2)
  • (125x6 + y9) = (5x2 + y3)(25x4 – 5x2y3 + y6)

Example 6: Factor A Sum Of Cubes

Let’s say we want to factor the expression 40x8y3z + 135x2z10.

This does not look like a sum of cubes.  However, we can factor out a GCF (greatest common factor) of 5x2z from both terms to get:

  • 40x8y3z + 135x2z10 = 5x2z(8x6y3 + 27z9)

Now we can recognize the expression in parentheses as a sum of cubes, since:

  • There are exactly two terms: 8x6y3 and 27z9
  • The two terms have the same signs (+ and +)
  • The numerical coefficients are perfect cubes: 8 = 23 and 27 = 33
  • The exponents on the variables are multiples of 3: 6 for x6, 3 for y3, and 9 for z9.

In this case, we have A = 2x2y and B = 3z3.

Now, we substitute A = 2x2y and B = 3z3 into the formula for factoring a sum of cubes:

  • A3 + B3 = (A + B)(A2 – AB + B2)
  • (2x2y)3 + (3z3)3 = (2x2y + 3z3)((2x2y)2 – (2x2y)( 3z3) + (3z3)2)
  • 8x6y3 + 27z9 = (2x2y + 3z3)(4x4y2 – 6x2yz3 + 9z6)

How To Derive The Difference Of Cubes Formula

We can derive the sum of cubes formula if we use the Distributive Property and start with the right side of the equation:

  • (A – B)(A2 + AB + B2)
  • =A(A2 + AB + B2) – B(A2 + AB + B2[distribute (A2 + AB + B2) through first set of parentheses]
  • =(A3 + A2B + AB2) – (BA2 + AB2 + B3) [distribute A through 1st parentheses, then distribute B through 2nd parentheses]
  • =(A3 + A2B + AB2) – BA2 – AB2 – B3  [distribute negative sign through 2nd parentheses]
  • =A3 + A2B – BA2 – B3  [AB2 – AB2 = 0]
  • =A3 – B3  [A2B – BA2 = 0]

So, this proves that the formula for a difference of cubes is correct.

We can use similar algebra to prove the formula for a sum of cubes as well.  A shorter approach is to replace “B” with “-B” in the difference of cubes formula to get:

  • (A3 – B3) = (A – B)(A2 + AB + B2[difference of cubes formula]
  • (A3 – (-B)3) = (A – (-B))(A2 + A(-B) + (-B)2[replace B by –B everywhere in the formula]
  • (A3 – (-B3) = (A + B)(A2 – AB + B2[(-B)2 = B2 and (-B)3 = -B3]
  • (A3 + B3) = (A + B)(A2 – AB + B2

So, this proves that the formula for a sum of cubes is correct.

Conclusion

Now you know what a difference of cubes is, when to use it, and how to apply the formula.  You also know how to apply a sum of cubes in the same way.

I hope you found this article helpful.  If so, please share it with someone who can use the information.

Math Tutor Picture

Don’t forget to subscribe to our YouTube channel & get updates on new math videos!


Recent Posts