Skip to main content
\(\require{cancel}\newcommand\degree[0]{^{\circ}} \newcommand\Ccancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}} \newcommand{\alert}[1]{\boldsymbol{\color{magenta}{#1}}} \newcommand{\blert}[1]{\boldsymbol{\color{blue}{#1}}} \newcommand{\bluetext}[1]{\color{blue}{#1}} \delimitershortfall-1sp \newcommand\abs[1]{\left|#1\right|} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

SectionFactoring Polynomials

In the previous section, we defined polynomials and practiced multiplying two polynomials together. Given a polynomial, it is often useful to "go backwards" by writing it as a product of two polynomials.

In this section, you will...
  • learn what it means to factor a polynomial

  • learn three factoring techniques, namely

    • factoring out the greatest common factor

    • factoring by grouping

    • factoring the different of squares

The process of writing a number or expression as a product is called factoring. If we write the monomial \(8x^7=2x^5\cdot 4x^2\text{,}\) we say that the product \(2x^5\cdot 4x^2\) is a factorization of \(8x^7\) and that \(2x^5\) and \(4x^2\) are factors. Typically there are many ways to factor a monomial. Some factorizations of \(8x^7\) are

\begin{align*} 8x^7 \amp =2x^5\cdot 4x^2\text{,}\\ 8x^7 \amp =8x^6\cdot x \text{, and}\\ 8x^7 \amp =2x\cdot 2x^2\cdot 2x^4\ \text{.} \end{align*}

Given two or more monomials, it will be useful to find the greatest common factor (GCF) of each. The GCF of the monomials is the product of the common variable factors and the GCF of the coefficients.

Example142

Find the GCF of \(25x^7y^2z\) and \(15x^3y^4z^2\text{.}\)

Solution

We begin by finding the GCF of the coefficients. In this case, \(25=5\cdot 5\) and \(15=3\cdot 5\text{.}\) It should be clear that GCF\((25,15)=5\text{.}\)

Next we determine the common variable factors with the smallest exponents.

\begin{equation*} 25x^7\alert{y^2z}\, \, \text{ and }\, \, 15\alert{x^3}y^4z^2 \end{equation*}

The common variable factors are \(x^3\text{,}\) \(y^2\) and \(z\text{.}\) Therefore, given the two monomials,

\begin{equation*} \text{GCF}(25x^7y^2z,\, 15x^3y^4z^2)=5x^3y^2z. \end{equation*}

It is worth pointing out that the GCF divides both expressions evenly.

\begin{equation*} \frac{25x^7y^2z}{\alert{5x^3y^2z}}=5x^4 \text{ and }\frac{15x^3y^4z^2}{\alert{5x^3y^2z}}=3y^2z \end{equation*}

Furthermore, we can write the following:

\begin{equation*} 25x^7y^2z=\alert{5x^3y^2z}\cdot 5x^4 \text{ and }15x^3y^4z^2=\alert{5x^3y^2z}\cdot 3y^2z\text{.} \end{equation*}

The factors \(5x^4\) and \(3y^2z\) share no common factors other than 1; they are relatively prime.

Example143

Determine the GCF of the following three expressions: \(12a^5b^2(a+b)^5,\, 60a^4b^3c(a+b)^3\text{,}\) and \(24a^2b^7c^3(a+b)^2\text{.}\)

Solution

We begin by finding the GCF of the coefficients. To do this, determine the prime factorization of each and then multiply the common factors with the smallest exponents.

\begin{equation*} \begin{aligned} 12\amp = 2^2\cdot 3\\ 60\amp = 2^2\cdot 3\cdot 5\\ 24\amp = 2^3\cdot 3 \end{aligned} \end{equation*}

Therefore, the GCF of the coefficients of the three monomials is

\begin{equation*} \text{GCF}(12,\, 60\, 24)=2^2\cdot 3=12\text{.} \end{equation*}

Next, we determine the common factors of the variables.

\begin{equation*} 12a^5\alert{b^2}(a+b)^5 \, \text{ and }\, 60a^4b^3c(a+b)^3\, \text{ and }\, 24\alert{a^2}b^7c^3\alert{(a+b)^2} \end{equation*}

The variable factors in common are \(a^2\, b^2\) and \((a+b)^2\text{.}\) Therefore,

\begin{equation*} \text{GCF}(12a^5b^2(a+b)^5,\, 60a^4b^3c(a+b)^3, \, 24a^2b^7c^3(a+b)^2)=12a^2b^2(a+b)^2\text{.} \end{equation*}

SubsectionFactoring Out the GCF

The application of the distributive property is the key to multiplying polynomials. For example,

\begin{equation*} \begin{aligned} \alert{6xy^2}(2xy+1)\amp = \alert{6xy^2}\cdot 2xy +\alert{6xy^2}\cdot 1\\ \amp = 12x^2y^3+6xy^2\text{.} \end{aligned} \end{equation*}

The process of factoring a polynomial involves applying the distributive property in reverse to write each polynomial as a product of polynomial factors.

\begin{equation*} \begin{aligned} \alert{a}(b+c)\amp =\alert{a}b+\alert{a}c\\ \alert{a}b+\alert{a}c\amp =\alert{a}(b+c) \end{aligned} \end{equation*}
Consider factoring the result of the opening example:
\begin{equation*} \begin{aligned} 12x^2 y^3+6xy^2\amp =\alert{6xy^2}\cdot 2xy+\alert{6xy^2}\cdot 1\\ \amp = \alert{6xy^2}(\text{ ? })\\ \amp =\alert{6xy^2}(2xy+1)\text{.} \end{aligned} \end{equation*}

We see that the distributive property allows us to write the polynomial \(12x^2y^3+6xy^2\) as a product of two factors \(6xy^2\) and \((2xy+1)\text{.}\) Note that in this case, \(6xy^2\) is the GCF of the terms of the polynomial: GCF\((12x^2y^3,6xy^2)=6xy^2\text{.}\)

Factoring out the greatest common factor (GCF) of a polynomial involves rewriting it as a product where a factor is the GCF of all of its terms.

\begin{equation*} \begin{aligned} 8x^3+4x^2-16x \amp = \alert{4x}(2x^2+x-4)\\ 9ab^2-18a^2b-3ab \amp= \alert{3ab}(3b-6a-1) \end{aligned} \end{equation*}

To factor out the GCF of a polynomial, we first determine the GCF of all of its terms. Then we can divide each term of the polynomial by this factor as a means to determine the remaining factor after applying the distributive property in reverse.

Example144

Factor out the GCF of the polynomial \(18x^7-30x^5+6x^3\text{.}\)

Solution

In this case, the GCF\((18,\, 30,\, 6) = 6\text{,}\) and the common variable factor with the smallest exponent is \(x^3\text{.}\) The GCF of the polynomial is \(6x^3\text{.}\)

\begin{equation*} 18x^7-30x^5+6x^3=\alert{6x^3}(\: \: \: ? \: \: \: ) \end{equation*}

The missing factor can be found by dividing each term of the original expression by the GCF.

\begin{equation*} \begin{aligned} \frac{18x^7}{\alert{6x^3}}\amp =3x^4\\ \frac{-30x^5}{\alert{6x^3}}\amp =-5x^2\\ \frac{6x^3}{\alert{6x^3}}\amp =1 \end{aligned} \end{equation*}

Now we apply the distributive property (in reverse) using the terms found in the previous step.

\begin{equation*} 18x^7-30x^5+6x^3=\alert{6x^3}(3x^4-5x^2+1) \end{equation*}

If the GCF is the same as one of the terms, then, after the GCF is factored out, a constant term 1 will remain. The importance of remembering the constant term becomes clear when performing the check using the distributive property.

\begin{equation*} \begin{aligned} \alert{6x^3}(3x^4-5x^2+1)\amp = \alert{6x^3}\cdot 3x^4-\alert{6x^3}\cdot 5x^2+\alert{6x^3}\cdot 1\\ \amp = 18x^7-30x^5+6x^3 \end{aligned} \end{equation*}

Factoring out the GCF results in \(6x^3(3x^4-5x^2+1)\text{.}\)

Example145

Factor out the GCF of the polynomial \(27^5y^5z+54x^5yz-63x^3y^4\text{.}\)

Solution

The GCF of the terms is \(9x^3y\text{.}\) The last term does not have a variable factor of \(z\text{,}\) and thus \(z\) cannot be a part of the greatest common factor. If we divide each term by \(9x^3y\text{,}\) we obtain

\begin{equation*} \begin{aligned} \frac{27x^5y^5z}{\alert{9x^3y}}\amp = 3x^2y^4z\\ \frac{54x^5yz}{\alert{9x^3y}}\amp = 6x^2z\\ \frac{-63x^3y^4}{\alert{9x^3y}}\amp = -7y^3\text{.}\\ \end{aligned} \end{equation*}
\begin{equation*} \begin{aligned} 27^5y^5z+54x^5yz-63x^3y^4\amp =\alert{9x^3y}(\: \: \: ? \: \: \: )\\ \amp = 9x^3y(3x^2y^4z+6x^2z-7y^3) \end{aligned} \end{equation*}

Factoring out the GCF results in \(9x^3y(3x^2y^4z+6x^2z-7y^3)\text{.}\)

Example146

Factor out the GCF of the polynomial \(12x^3y^4-6x^2y^3-3xy^2\text{.}\)

Solution

The GCF of the terms is \(3xy^2\text{.}\) Pulling \(3xy^2\) out of each term, we obtain

\begin{equation*} \begin{aligned} 12x^3y^4-6x^2y^3-3xy^2 \amp= 3xy^2(4x^2y^2-2xy-1) \end{aligned} \end{equation*}

SubsectionFactoring by Grouping

In this section, we outline a technique for factoring polynomials with four terms. First, review a preliminary example where the terms have a common binomial factor.

Example147

Factor \(7x(3x-2)-(3x-2)\text{.}\)

Solution

We begin by rewriting the second term \(-(3x-2)\) as \(-1(3x-2)\text{.}\) Next, consider \((3x-2)\) as a common binomial factor and factor it out as follows:

\begin{equation*} \begin{aligned} 7x(3x-2)-(3x-2)\amp = 7x\alert{(3x-2)}-1\alert{(3x-2)}\\ \amp = \alert{(3x-2)}(\, ?\, )\\ \amp =(3x-2)(7x-1). \end{aligned} \end{equation*}

Factoring results in \(7x(3x-2)-(3x-2)=(3x-2)(7x-1)\text{.}\)

Factoring by grouping is a technique that enables us to factor polynomials with four terms into a product of binomials. This involves an intermediate step where a common binomial factor will be factored out. For example, suppose we wish to factor

\begin{equation*} 3x^3-12x^2+2x-8\text{.} \end{equation*}

We begin by grouping the first two terms and the last two terms. Then factor out the GCF of each grouping:

\begin{equation*} \underbrace{3x^3-12x^2}+\underbrace{2x-8}=\alert{3x^2}(x-4)+\alert{2}(x-4) \end{equation*}

In this form, the polynomial is a binomial with a common binomial factor, \((x-4)\text{.}\)

\begin{equation*} \begin{aligned} 3x^3-12x^2+2x-8 \amp = (x-4)(\text{ ? })\\ \amp = (x-4)(\alert{3x^2+2}) \end{aligned} \end{equation*}

We can check our answer by multiplying:

\begin{equation*} \begin{aligned} (x-4)(3x^2+2)\amp = 3x^3+2x-12x^2-8\\ \amp = 3x^3-12x^2+2x-8\text{.} \end{aligned} \end{equation*}
Example148

Factor the polynomial \(24a^4-18a^3-20a+15\) by grouping.

Solution

The GCF for the first group, \(24a^4-18a^3\text{,}\) is \(6a^3\text{.}\) We have to choose \(5\) or \(-5\) to factor out of the second group.

Factoring out \(+5\) does not result in a common binomial factor. If we choose to factor out \(-5\text{,}\) then we obtain a common binomial factor and can proceed. Note that when factoring out a negative number, we change the signs of the factored terms.

\begin{equation*} \begin{aligned} 24a^4-18a^3-20a+15\amp = 6a^3(\, ?\, )-5(\, ?\, )\\ \amp = 6a^3(4a-3)-5(4a-3)\\ \amp = (4a-3)(\, ?\, )\\ \amp =(4a-3)(6a^3-5) \end{aligned} \end{equation*}

Factoring \(24a^4-18a^3-20a+15\) results in \(24a^4-18a^3-20a+15=(4a-3)(6a^3-5)\text{.}\)

Sometimes we must first rearrange the terms in order to obtain a common factor.

Example149

Factor \(ab-2a^2b+a^3-2b^2\text{.}\)

Solution

If we simply factor the GCF out of the first group and last group, we do not get a common binomial factor.

We must rearrange the terms, searching for a grouping that produces a common factor. In this example, we have a workable grouping if we switch the terms \(a^3\) and \(ab\text{.}\)

\begin{equation*} \begin{aligned} ab-2a^2b+a^3-2b^2\amp = a^3-2a^2b+ab-2b^2\\ \amp = a^2(a-2b)+b(a-2b)\\ \amp = (a-2b)(a^2+b) \end{aligned} \end{equation*}

Factoring \(ab-2a^2b+a^3-2b^2\) results in \(ab-2a^2b+a^3-2b^2= (a-2b)(a^2+b)\text{.}\)

Factor \(x^3-x^2y-xy+y^2\text{.}\)

Solution
\begin{equation*} \begin{aligned} x^3-x^2y-xy+y^2 \amp= x^2(x-y)-y(x-y) \\ \amp= (x-y)(x^2-y) \end{aligned} \end{equation*}

Some polynomials cannot be factored, such polynomials are called prime. However, just because a polynomial cannot be factored with the above technique does not mean that it is necessarily prime. For example,

\begin{equation*} 3x^3+5x^2-x+2. \end{equation*}

This four-term polynomial cannot be grouped in any way to produce a common binomial factor. Despite this, the polynomial is not prime and can be written as a product of polynomials. It can be factored as follows:

\begin{equation*} 3x^3+5x^2-x+2=(x+2)(3x^2-x+1)\text{.} \end{equation*}

Factoring such polynomials is a topic for a more advanced algebra course. For now, we will limit our attempt to factor four-term polynomials to using the factor by grouping technique.

SubsectionFactoring the Difference of Squares

We end this section with the special binomial called difference of squares, which is factored as follows:

\begin{equation*} a^2-b^2=(a+b)(a-b)\text{.} \end{equation*}

To verify the above formula, multiply.

\begin{equation*} \begin{aligned} (a+b)(a-b)\amp =a^2-ab+ba-b^2\\ \amp = a^2 \alert{-ab+ab}-b^2\\ \amp = a^2-b^2 \end{aligned} \end{equation*}

We use this formula to factor certain special binomials.

Example151

Factor \(x^2-9y^2\text{.}\)

Solution

Identify the binomial as difference of squares and determine the square factors of each term.

Here we can write

\begin{equation*} \begin{aligned} x^2-9y^2=(\alert{x})^2-(\alert{3y})^2\text{.} \end{aligned} \end{equation*}

Substitute \(a=x\) and \(b=3y\) into the difference of squares formula.

\begin{equation*} \begin{aligned} a^2-b^2\amp=(a+b)(a-b)\\ x^2-9y^2\amp = (x+3y)(x-3y) \end{aligned} \end{equation*}

We can multiply to check.

\begin{equation*} \begin{aligned} (x+3y)(x-3y)\amp = x^2-3xy+3xy-9y^2\\ \amp = x^2-9y^2 \end{aligned} \end{equation*}

Factoring \(x^2-9y^2\) results in \(x^2-9y^2=(x+3y)(x-3y)\text{.}\)

Example152

Factor \(x^2-(2x-1)^2\text{.}\)

Solution

First, we identify this expression as a difference of squares.

\begin{equation*} \begin{aligned} x^2-(2x-1)^2=(\alert{x})^2-(\alert{2x-1})^2 \end{aligned} \end{equation*}

Substitute \(a=x\) and \(b=2x-1\) into the difference of squares formula.

\begin{equation*} \begin{aligned} a^2-b^2\amp=(a+b)(a-b)\\ x^2-(2x-1)^2\amp = (x+(2x-1))(x-(2x-1))\\ \amp=(x+2x-1)(x-2x+1)\\ \amp = (3x-1)(-x+1) \end{aligned} \end{equation*}

Factoring \(x^2-(2x-1)^2\) results in \(x^2-(2x-1)^2=(3x-1)(-x+1)\text{.}\)

The sum of squares \(a^2+b^2\) does not have a general factored equivalent over the real numbers. Care should be taken not to confuse this with the difference of squares.

\begin{equation*} \begin{aligned} (a+b)^2\amp = (a+b)(a+b)\\ \amp = a^2+ab+ba+b^2\\ \amp = a^2+2ab+b^2 \end{aligned} \end{equation*}

Therefore,

\begin{equation*} (a+b)^2\neq a^2+b^2\text{.} \end{equation*}

It may be the case that the terms of a binomial have a common factor. If so, it will be difficult to identify it as a special binomial until we first factor out the GCF.

When the degree of the special binomial is greater than two, we may need to apply the formulas multiple times to obtain a complete factorization. A polynomial is completely factored when it is prime or is written as a product of prime polynomials.

SubsubsectionExercises