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.

The strategy for factoring we developed in the last section will guide you as you factor most binomials, trinomials, and polynomials with more than three terms. 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. You can square a binomial by using FOIL, but using the Binomial Squares pattern you saw in a previous chapter saves you a step. Let’s review by squaring a binomial using FOIL:

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

The first term is the square of the first term of the binomial and the last term is the square of the last term. The middle term is twice the product of the two terms of the binomial:

(3x)2+2(3x4)+42=9x2+24x+16(3x)^2 + 2(3x \cdot 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.

When you square a binomial, the product is a perfect square trinomial. In this chapter you are learning to factor — now you will start with a perfect square trinomial and factor it into its prime factors. You could factor this trinomial using the methods of 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)2a22ab+b2=(ab)2 \begin{array}{rcl} a^2 + 2ab + b^2 &=& (a+b)^2 \\ a^2 - 2ab + b^2 &=& (a-b)^2 \end{array}

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 that the last term is a perfect square, b2b^2. Then check the middle term — is it twice the product, 2ab2ab? If everything checks, you can easily write the factors.

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

Does the trinomial fit the perfect square trinomials pattern, a2+2ab+b2a^2 + 2ab + b^2? The first term 9x29x^2 is a perfect square, (3x)2(3x)^2, and the last term 44 is a perfect square, (2)2(2)^2. The middle term 12x12x is twice the product of 3x3x and 22, so it matches 2ab2ab. Write it as the square of a binomial:

9x2+12x+4=(3x)2+23x2+22=(3x+2)29x^2 + 12x + 4 = (3x)^2 + 2 \cdot 3x \cdot 2 + 2^2 = (3x+2)^2

Check by multiplying: (3x+2)2=(3x)2+23x2+22=9x2+12x+4(3x+2)^2 = (3x)^2 + 2 \cdot 3x \cdot 2 + 2^2 = 9x^2 + 12x + 4. ✓

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. The steps are summarized here.

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?
    • Is the first term a perfect square? Write it as a square, (a)2(a)^2.
    • Is the last term a perfect square? Write it as a square, (b)2(b)^2.
    • Check the middle term. Is it 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 first term as (9y)2(9y)^2 and the last term as (4)2(4)^2; the middle term 72y72y is 29y42 \cdot 9y \cdot 4, so the pattern matches:

81y272y+16=(9y)229y4+42=(9y4)281y^2 - 72y + 16 = (9y)^2 - 2 \cdot 9y \cdot 4 + 4^2 = (9y-4)^2

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. The first term is (6x)2(6x)^2 and the last term is (7y)2(7y)^2; the middle term 84xy84xy is 26x7y2 \cdot 6x \cdot 7y. It fits, so we write the square of the binomial:

36x2+84xy+49y2=(6x)2+26x7y+(7y)2=(6x+7y)236x^2 + 84xy + 49y^2 = (6x)^2 + 2 \cdot 6x \cdot 7y + (7y)^2 = (6x+7y)^2

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

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

Remember the very first step in our strategy for factoring polynomials — ask “is there a greatest common factor?” and, if there is, factor the GCF out before going any further. 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: 36x2y48xy+16y36x^2y - 48xy + 16y.

There is a GCF of 4y4y, so factor it out first:

36x2y48xy+16y=4y ⁣(9x212x+4)36x^2y - 48xy + 16y = 4y\!\left(9x^2 - 12x + 4\right)

The trinomial in parentheses is a perfect square: 9x2=(3x)29x^2 = (3x)^2, 4=224 = 2^2, and 12x=23x212x = 2 \cdot 3x \cdot 2. Factor it, keeping the factor 4y4y:

4y ⁣(9x212x+4)=4y(3x2)24y\!\left(9x^2 - 12x + 4\right) = 4y(3x-2)^2

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)=9x216(3x-4)(3x+4) = 9x^2 - 16

When you multiply conjugate binomials, the middle terms of the product add to 00. All you have left is a binomial, the difference of squares. Multiplying conjugates is the only way to get a binomial from the product of two binomials.

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

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

The first and last terms are squares and they are subtracted; the factors are a pair of conjugates.

To factor, we use the product pattern “in reverse” to factor the difference of squares. 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.

Factor differences of squares.

  1. Does the binomial fit the pattern a2b2a^2 - b^2?
    • Is this a difference?
    • Are the first and last terms 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.

Example. Factor: x24x^2 - 4.

Does the binomial fit the pattern? It is a difference, and both terms are perfect squares: x2=(x)2x^2 = (x)^2 and 4=224 = 2^2. Write them as squares, then write the product of conjugates:

x24=(x)2(2)2=(x2)(x+2)x^2 - 4 = (x)^2 - (2)^2 = (x-2)(x+2)

Check by multiplying: (x2)(x+2)=x24(x-2)(x+2) = x^2 - 4. ✓

Factor: h281h^2 - 81

Factor: k2121k^2 - 121

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!

Example. Factor: 64y2164y^2 - 1.

This is a difference, and both terms are perfect squares — don’t forget that 11 is a perfect square. Write 64y264y^2 as (8y)2(8y)^2 and 11 as 121^2, then factor as the product of conjugates:

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

Factor: m21m^2 - 1

Factor: 81y2181y^2 - 1

Example. Factor: 121x249y2121x^2 - 49y^2.

Is this a difference of squares? Yes — 121x2=(11x)2121x^2 = (11x)^2 and 49y2=(7y)249y^2 = (7y)^2. Factor as the product of conjugates:

121x249y2=(11x)2(7y)2=(11x7y)(11x+7y)121x^2 - 49y^2 = (11x)^2 - (7y)^2 = (11x-7y)(11x+7y)

Factor: 196m225n2196m^2 - 25n^2

Factor: 144p29q2144p^2 - 9q^2

The binomial in the next example may look “backwards,” but it is still the difference of squares.

Example. Factor: 100h2100 - h^2.

Is this a difference of squares? Yes — 100=102100 = 10^2 and h2=(h)2h^2 = (h)^2. Factor as the product of conjugates:

100h2=(10)2(h)2=(10h)(10+h)100 - h^2 = (10)^2 - (h)^2 = (10-h)(10+h)

Be careful not to rewrite the original expression as h2100h^2 - 100.

Factor: 144x2144 - x^2

Factor: 169p2169 - p^2

To completely factor the binomial in the next example, we factor a difference of squares twice!

Example. Factor: x4y4x^4 - y^4.

Is this a difference of squares? Yes — x4=(x2)2x^4 = (x^2)^2 and y4=(y2)2y^4 = (y^2)^2. Factor it as the product of conjugates. Notice the first binomial is also a difference of squares! The last factor, the sum of squares, cannot be factored:

x4y4=(x2)2(y2)2=(x2y2) ⁣(x2+y2)=(xy)(x+y) ⁣(x2+y2)x^4 - y^4 = \left(x^2\right)^2 - \left(y^2\right)^2 = \left(x^2-y^2\right)\!\left(x^2+y^2\right) = (x-y)(x+y)\!\left(x^2+y^2\right)

Factor completely: a4b4a^4 - b^4

Factor completely: x416x^4 - 16

As always, you should look for a common factor first whenever you have an expression to factor. Sometimes a common factor may “disguise” the difference of squares and you won’t recognize the perfect squares until you factor the GCF.

Example. Factor: 8x2y98y8x^2y - 98y.

Is there a GCF? Yes, 2y2y — factor it out. The binomial that remains is a difference of squares. Factor it as a product of conjugates:

8x2y98y=2y ⁣(4x249)=2y ⁣((2x)2(7)2)=2y(2x7)(2x+7)8x^2y - 98y = 2y\!\left(4x^2 - 49\right) = 2y\!\left((2x)^2 - (7)^2\right) = 2y(2x-7)(2x+7)

Factor completely: 7xy2175x7xy^2 - 175x

Factor completely: 45a2b80b45a^2b - 80b

Remember, a sum of squares does not factor. After removing the GCF, if what remains is a sum of squares, it is prime.

Example. Factor: 6x2+966x^2 + 96.

Is there a GCF? Yes, 66 — factor it out:

6x2+96=6 ⁣(x2+16)6x^2 + 96 = 6\!\left(x^2 + 16\right)

Is the binomial in parentheses a difference of squares? No — it is a sum of squares. Sums of squares do not factor, so x2+16x^2 + 16 is prime and 6(x2+16)6(x^2+16) is the complete factorization.

Factor completely: 8a2+2008a^2 + 200

Factor completely: 36y2+8136y^2 + 81

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 can check these formulas by multiplication; for the sum of cubes, distributing (a+b)(a+b) over (a2ab+b2)\left(a^2 - ab + b^2\right) gives a3a2b+ab2+a2bab2+b3=a3+b3a^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)a3b3=(ab) ⁣(a2+ab+b2) \begin{array}{rcl} a^3 + b^3 &=& (a+b)\!\left(a^2 - ab + b^2\right) \\ a^3 - b^3 &=& (a-b)\!\left(a^2 + ab + b^2\right) \end{array}

The two patterns look very similar. 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. The trinomial factor in the sum and difference of cubes pattern cannot be factored.

It can be very helpful if you learn to recognize the cubes of the integers from 11 to 1010, just like you have learned to recognize squares:

nn1122334455667788991010
n3n^311882727646412512521621634334351251272972910001000

Factor the sum or difference of cubes.

  1. Does the binomial fit the sum or difference of cubes pattern?
    • Is it a sum or difference?
    • Are the first and last terms perfect cubes?
  2. Write them 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: x3+64x^3 + 64.

Does the binomial fit the pattern? It is a sum, and both terms are perfect cubes: x3=(x)3x^3 = (x)^3 and 64=4364 = 4^3. Write the terms as cubes, use the sum of cubes pattern, and simplify inside the parentheses:

x3+64=x3+43=(x+4) ⁣(x24x+42)=(x+4) ⁣(x24x+16)x^3 + 64 = x^3 + 4^3 = (x+4)\!\left(x^2 - 4x + 4^2\right) = (x+4)\!\left(x^2 - 4x + 16\right)

Factor: x3+27x^3 + 27

Factor: y3+8y^3 + 8

Be careful to use the correct signs in the factors of the sum and difference of cubes.

Example. Factor: x31000x^3 - 1000.

This binomial is a difference. The first and last terms are perfect cubes: x3=(x)3x^3 = (x)^3 and 1000=1031000 = 10^3. Use the difference of cubes pattern and simplify:

x31000=x3103=(x10) ⁣(x2+10x+102)=(x10) ⁣(x2+10x+100)x^3 - 1000 = x^3 - 10^3 = (x-10)\!\left(x^2 + 10x + 10^2\right) = (x-10)\!\left(x^2 + 10x + 100\right)

Factor: u3125u^3 - 125

Factor: v3343v^3 - 343

Example. Factor: 512125p3512 - 125p^3.

This binomial is a difference. The first and last terms are perfect cubes: 512=83512 = 8^3 and 125p3=(5p)3125p^3 = (5p)^3. Use the difference of cubes pattern and simplify:

512125p3=83(5p)3=(85p) ⁣(82+85p+(5p)2)=(85p) ⁣(64+40p+25p2)512 - 125p^3 = 8^3 - (5p)^3 = (8-5p)\!\left(8^2 + 8 \cdot 5p + (5p)^2\right) = (8-5p)\!\left(64 + 40p + 25p^2\right)

Factor: 6427x364 - 27x^3

Factor: 278y327 - 8y^3

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

This binomial is a difference. Both terms are perfect cubes: 27u3=(3u)327u^3 = (3u)^3 and 125v3=(5v)3125v^3 = (5v)^3. Use the difference of cubes pattern and simplify:

27u3125v3=(3u)3(5v)3=(3u5v) ⁣((3u)2+3u5v+(5v)2)=(3u5v) ⁣(9u2+15uv+25v2)27u^3 - 125v^3 = (3u)^3 - (5v)^3 = (3u-5v)\!\left((3u)^2 + 3u \cdot 5v + (5v)^2\right) = (3u-5v)\!\left(9u^2 + 15uv + 25v^2\right)

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: 5m3+40n35m^3 + 40n^3.

Factor the common factor 55 first. The binomial that remains is a sum, and its terms are perfect cubes: m3=(m)3m^3 = (m)^3 and 8n3=(2n)38n^3 = (2n)^3. Use the sum of cubes pattern and simplify:

5m3+40n3=5 ⁣(m3+8n3)=5(m+2n) ⁣(m2m2n+(2n)2)=5(m+2n) ⁣(m22mn+4n2)5m^3 + 40n^3 = 5\!\left(m^3 + 8n^3\right) = 5(m+2n)\!\left(m^2 - m \cdot 2n + (2n)^2\right) = 5(m+2n)\!\left(m^2 - 2mn + 4n^2\right)

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

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

Key terms

perfect square trinomial — a trinomial of the form a2+2ab+b2a^2 + 2ab + b^2 or a22ab+b2a^2 - 2ab + b^2; it factors to (a+b)2(a+b)^2 or (ab)2(a-b)^2. difference of squares — a binomial of the form a2b2a^2 - b^2; it factors to the conjugate pair (ab)(a+b)(a-b)(a+b). sum of squares — a binomial of the form a2+b2a^2 + b^2; it does not factor and is prime. sum of cubesa3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2). difference of cubesa3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2).


This section is adapted from Elementary Algebra 2e, Section 7.4: Factor Special Products by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recast the pattern-derivation walkthroughs and worked-example step tables as typeset display equations, kept the Perfect Square Trinomials, Difference of Squares, and Sum and Difference of Cubes patterns and How To procedures as callouts, recreated the cubes reference table as a markdown table; omitted the Be Prepared quiz, Self Check checklist, media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.