Skip to content
Factor Special Products

Factor Special Products

By the end of this section, you will be able to: factor perfect square trinomials, factor differences of squares, and factor sums and differences of cubes.

We have seen that some binomials and trinomials result from special products—squaring binomials and multiplying conjugates. If you learn to recognize these kinds of polynomials, you can use the special products patterns to factor them much more quickly.

Factor perfect square trinomials

Some trinomials are perfect squares. They result from multiplying a binomial times itself. We squared a binomial using the Binomial Squares pattern in a previous chapter. For example,

(3x+4)2=(3x)2+2(3x)(4)+42=9x2+24x+16. (3x+4)^2=(3x)^2+2(3x)(4)+4^2=9x^2+24x+16.

The trinomial 9x2+24x+169x^2+24x+16 is called a perfect square trinomial. It is the square of the binomial 3x+43x+4. In this chapter, you will start with a perfect square trinomial and factor it into its prime factors.

You could factor this trinomial using the methods described in the last section, since it is of the form ax2+bx+cax^2+bx+c. But if you recognize that the first and last terms are squares and the trinomial fits the perfect square trinomials pattern, you will save yourself a lot of work. Here is the pattern—the reverse of the binomial squares pattern.

Perfect Square Trinomials Pattern. If aa and bb are real numbers,

a2+2ab+b2=(a+b)2a^2+2ab+b^2=(a+b)^2

a22ab+b2=(ab)2a^2-2ab+b^2=(a-b)^2

To make use of this pattern, you have to recognize that a given trinomial fits it. Check first to see if the leading coefficient is a perfect square, a2a^2. Next check to see if the last term is a perfect square, b2b^2. Then check the middle term—is it the product, 2ab2ab? If everything checks, you can easily write the factors.

How to factor perfect square trinomials

Example. Factor 9x2+12x+49x^2+12x+4.

The first term is a perfect square, (3x)2(3x)^2, and the last term is a perfect square, 222^2. The middle term is twice the product of 3x3x and 22:

2(3x)(2)=12x.2(3x)(2)=12x.

The trinomial fits the pattern a2+2ab+b2a^2+2ab+b^2, so

9x2+12x+4=(3x+2)2.9x^2+12x+4=(3x+2)^2.

Check by multiplying:

(3x+2)2=(3x)2+2(3x)(2)+22=9x2+12x+4checkmark (3x+2)^2=(3x)^2+2(3x)(2)+2^2=9x^2+12x+4 checkmark

Factor: 4x2+12x+94x^2+12x+9.

Factor: 9y2+24y+169y^2+24y+16.

The sign of the middle term determines which pattern we will use. When the middle term is negative, we use the pattern a22ab+b2a^2-2ab+b^2, which factors to (ab)2(a-b)^2.

Factor perfect square trinomials.

  1. Does the trinomial fit the pattern a2+2ab+b2a^2+2ab+b^2 or a22ab+b2a^2-2ab+b^2? Write the first and last terms as squares and check whether the middle term is 2ab2ab.
  2. Write the square of the binomial, (a+b)2(a+b)^2 or (ab)2(a-b)^2.
  3. Check by multiplying.

Example. Factor 81y272y+1681y^2-72y+16.

The first and last terms are squares. The middle term is negative, so the binomial square would be (ab)2(a-b)^2.

Write the squares.81y272y+16=(9y)272y+42Check the middle term.2(9y)(4)=72yFactor.81y272y+16=(9y4)2 \begin{array}{lrcl} \text{Write the squares.} & 81y^2-72y+16 &=& (9y)^2-72y+4^2 \\[4pt] \text{Check the middle term.} & 2(9y)(4) &=& 72y \\[4pt] \text{Factor.} & 81y^2-72y+16 &=& (9y-4)^2 \end{array}

Check:

(9y4)2=(9y)22(9y)(4)+42=81y272y+16checkmark (9y-4)^2=(9y)^2-2(9y)(4)+4^2=81y^2-72y+16 checkmark

Factor: 64y280y+2564y^2-80y+25.

Factor: 16z272z+8116z^2-72z+81.

The next example is a perfect square trinomial with two variables.

Example. Factor 36x2+84xy+49y236x^2+84xy+49y^2.

Test each term to verify the pattern:

36x2+84xy+49y2=(6x)2+2(6x)(7y)+(7y)2=(6x+7y)2. 36x^2+84xy+49y^2=(6x)^2+2(6x)(7y)+(7y)^2=(6x+7y)^2.

Check by multiplying:

(6x+7y)2=(6x)2+2(6x)(7y)+(7y)2=36x2+84xy+49y2checkmark (6x+7y)^2=(6x)^2+2(6x)(7y)+(7y)^2=36x^2+84xy+49y^2 checkmark

Factor: 49x2+84xy+36y249x^2+84xy+36y^2.

Factor: 64m2+112mn+49n264m^2+112mn+49n^2.

Remember, the first step in factoring is to look for a greatest common factor. Perfect square trinomials may have a GCF in all three terms and it should be factored out first. Sometimes, once the GCF has been factored, you will recognize a perfect square trinomial.

Example. Factor 100x2y80xy+16y100x^2y-80xy+16y.

Factor out the GCF 4y.100x2y80xy+16y=4y(25x220x+4)Verify the pattern.4y(25x220x+4)=4y[(5x)22(5x)(2)+22]Factor.100x2y80xy+16y=4y(5x2)2 \begin{array}{lrcl} \text{Factor out the GCF }4y. & 100x^2y-80xy+16y &=& 4y(25x^2-20x+4) \\[4pt] \text{Verify the pattern.} & 4y(25x^2-20x+4) &=& 4y[(5x)^2-2(5x)(2)+2^2] \\[4pt] \text{Factor.} & 100x^2y-80xy+16y &=& 4y(5x-2)^2 \end{array}

Remember: keep the factor 4y4y in the final product. Multiplying verifies that 4y(5x2)2=100x2y80xy+16y4y(5x-2)^2=100x^2y-80xy+16y.

Factor completely: 8x2y24xy+18y8x^2y-24xy+18y.

Factor completely: 27p2q+90pq+75q27p^2q+90pq+75q.

Factor differences of squares

The other special product you saw in the previous chapter was the Product of Conjugates pattern. You used this to multiply two binomials that were conjugates. For example,

(3x4)(3x+4)=(3x)242=9x216. (3x-4)(3x+4)=(3x)^2-4^2=9x^2-16.

A difference of squares factors to a product of conjugates.

Difference of Squares Pattern. If aa and bb are real numbers,

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

Remember, “difference” refers to subtraction. So, to use this pattern you must make sure you have a binomial in which two squares are being subtracted.

How to factor a binomial using the difference of squares

Example. Factor 64y2164y^2-1.

The binomial is a difference and both terms are perfect squares. Write them as squares, then write the product of conjugates:

64y21=(8y)212=(8y1)(8y+1).64y^2-1=(8y)^2-1^2=(8y-1)(8y+1).

Multiplying the conjugates gives 64y2164y^2-1, which checks the result.

Factor: 121m21121m^2-1.

Factor: 81y2181y^2-1.

Factor differences of squares.

  1. Does the binomial fit the pattern a2b2a^2-b^2? It must be a difference, and the first and last terms must be perfect squares.
  2. Write them as squares, (a)2(b)2(a)^2-(b)^2.
  3. Write the product of conjugates, (ab)(a+b)(a-b)(a+b).
  4. Check by multiplying.

It is important to remember that sums of squares do not factor into a product of binomials. There are no binomial factors that multiply together to get a sum of squares. After removing any GCF, the expression a2+b2a^2+b^2 is prime. The next example shows variables in both terms.

Example. Factor 144x249y2144x^2-49y^2.

144x249y2=(12x)2(7y)2=(12x7y)(12x+7y).144x^2-49y^2=(12x)^2-(7y)^2=(12x-7y)(12x+7y).

Check by multiplying the conjugates.

Factor: 196m225n2196m^2-25n^2.

Factor: 121p29q2121p^2-9q^2.

As always, you should look for a common factor first. Sometimes a common factor may “disguise” the difference of squares and you won’t recognize the perfect squares until you factor the GCF. Also, to completely factor the binomial in the next example, we’ll factor a difference of squares twice!

Example. Factor 48x4y2243y248x^4y^2-243y^2.

Factor out the GCF.48x4y2243y2=3y2(16x481)Factor a difference of squares.3y2(16x481)=3y2(4x29)(4x2+9)Factor the remaining difference.=3y2(2x3)(2x+3)(4x2+9) \begin{array}{lrcl} \text{Factor out the GCF.} & 48x^4y^2-243y^2 &=& 3y^2(16x^4-81) \\[4pt] \text{Factor a difference of squares.} & 3y^2(16x^4-81) &=& 3y^2(4x^2-9)(4x^2+9) \\[4pt] \text{Factor the remaining difference.} &&=& 3y^2(2x-3)(2x+3)(4x^2+9) \end{array}

The last factor, the sum of squares, cannot be factored. Multiplication checks that the result is 48x4y2243y248x^4y^2-243y^2.

Factor completely: 2x4y232y22x^4y^2-32y^2.

Factor completely: 7a4c27b4c27a^4c^2-7b^4c^2.

The next example has a polynomial with four terms. So far, when this occurred we grouped the terms in twos and factored from there. Here we will notice that the first three terms form a perfect square trinomial.

Example. Factor x26x+9y2x^2-6x+9-y^2.

Factor the first three terms using the perfect square trinomial pattern, then factor the resulting difference of squares:

x26x+9y2=(x3)2y2=(x3y)(x3+y).x^2-6x+9-y^2=(x-3)^2-y^2=(x-3-y)(x-3+y).

You may want to rewrite the solution as (xy3)(x+y3)(x-y-3)(x+y-3).

Factor: x210x+25y2x^2-10x+25-y^2.

Factor: x2+6x+94y2x^2+6x+9-4y^2.

Factor sums and differences of cubes

There is another special pattern for factoring, one that we did not use when we multiplied polynomials. This is the pattern for the sum and difference of cubes. We will write these formulas first and then check them by multiplication.

a3+b3=(a+b)(a2ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2)a3b3=(ab)(a2+ab+b2)a^3-b^3=(a-b)(a^2+ab+b^2)

We’ll check the first pattern and leave the second to you. Distributing and combining like terms gives

(a+b)(a2ab+b2)=a3a2b+ab2+a2bab2+b3=a3+b3. (a+b)(a^2-ab+b^2)=a^3-a^2b+ab^2+a^2b-ab^2+b^3=a^3+b^3.

Sum and Difference of Cubes Pattern.

a3+b3=(a+b)(a2ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2)

a3b3=(ab)(a2+ab+b2)a^3-b^3=(a-b)(a^2+ab+b^2)

The two patterns look very similar, don’t they? But notice the signs in the factors. The sign of the binomial factor matches the sign in the original binomial. And the sign of the middle term of the trinomial factor is the opposite of the sign in the original binomial. If you recognize the pattern of the signs, it may help you memorize the patterns. The trinomial factor in the sum and difference of cubes pattern cannot be factored.

It will be very helpful if you learn to recognize the cubes of the integers from 1 to 10, just like you have learned to recognize squares.

nn12345678910
n3n^31827641252163435127291000

How to factor the sum or difference of cubes

Example. Factor x3+64x^3+64.

This is a sum, and both terms are perfect cubes. Write 64=4364=4^3 and use the sum of cubes pattern:

x3+64=x3+43=(x+4)(x24x+16).x^3+64=x^3+4^3=(x+4)(x^2-4x+16).

The expression inside the parentheses is already simplified. Multiplying the factors checks the result.

Factor: x3+27x^3+27.

Factor: y3+8y^3+8.

Factor the sum or difference of cubes.

  1. Does the binomial fit the sum or difference of cubes pattern? It must be a sum or difference, and the first and last terms must be perfect cubes.
  2. Write the terms as cubes.
  3. Use either the sum or difference of cubes pattern.
  4. Simplify inside the parentheses.
  5. Check by multiplying the factors.

Example. Factor 27u3125v327u^3-125v^3.

This binomial is a difference. The first and last terms are perfect cubes:

27u3125v3=(3u)3(5v)3=(3u5v)(9u2+15uv+25v2). 27u^3-125v^3=(3u)^3-(5v)^3=(3u-5v)(9u^2+15uv+25v^2).

Factor: 8x327y38x^3-27y^3.

Factor: 1000m3125n31000m^3-125n^3.

In the next example, we first factor out the GCF. Then we can recognize the sum of cubes.

Example. Factor 6x3y+48y46x^3y+48y^4.

Factor the common factor.6x3y+48y4=6y(x3+8y3)Write the terms as cubes.=6y[x3+(2y)3]Use the sum of cubes pattern.=6y(x+2y)(x22xy+4y2) \begin{array}{lrcl} \text{Factor the common factor.} & 6x^3y+48y^4 &=& 6y(x^3+8y^3) \\[4pt] \text{Write the terms as cubes.} &&=& 6y[x^3+(2y)^3] \\[4pt] \text{Use the sum of cubes pattern.} &&=& 6y(x+2y)(x^2-2xy+4y^2) \end{array}

To check, you may find it easier to multiply the sum of cubes factors first, then multiply that product by 6y6y. We’ll leave the multiplication for you.

Factor: 500p3+4q3500p^3+4q^3.

Factor: 432c3+686d3432c^3+686d^3.

The first term in the next example is a binomial cubed.

Example. Factor (x+5)364x3(x+5)^3-64x^3.

This binomial is a difference. The first and last terms are perfect cubes:

(x+5)364x3=(x+5)3(4x)3=(x+54x)((x+5)2+4x(x+5)+16x2)=(3x+5)(21x2+30x+25). \begin{aligned} (x+5)^3-64x^3 &=(x+5)^3-(4x)^3 \\ &=(x+5-4x)\bigl((x+5)^2+4x(x+5)+16x^2\bigr) \\ &=(-3x+5)(21x^2+30x+25). \end{aligned}

We’ll leave the check by multiplying to you.

Factor: (y+1)327y3(y+1)^3-27y^3.

Factor: (n+3)3125n3(n+3)^3-125n^3.

Key terms

perfect square trinomial — a trinomial that is the square of a binomial. difference of squares — a binomial of the form a2b2a^2-b^2, which factors as a product of conjugates. sum of cubes — a binomial of the form a3+b3a^3+b^3. difference of cubes — a binomial of the form a3b3a^3-b^3.


This section is adapted from Intermediate Algebra 2e, Section 6.3: Factor Special Products by Lynn Marecek and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: reformatted the worked-example tables as accessible aligned math, omitted the Be Prepared quiz, media links, and end-of-section exercises, and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.