Paul's Online Notes
Home / Algebra / Preliminaries / Factoring Polynomials
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 1-5 : Factoring Polynomials

Of all the topics covered in this chapter factoring polynomials is probably the most important topic. There are many sections in later chapters where the first step will be to factor a polynomial. So, if you can’t factor the polynomial then you won’t be able to even start the problem let alone finish it.

Let’s start out by talking a little bit about just what factoring is. Factoring is the process by which we go about determining what we multiplied to get the given quantity. We do this all the time with numbers. For instance, here are a variety of ways to factor 12.

\begin{align*}12 & = \left( 2 \right)\left( 6 \right) & \hspace{0.5in} 12 & = \left( 3 \right)\left( 4 \right) & \hspace{0.25in} 12 & = \left( 2 \right)\left( 2 \right)\left( 3 \right)\hspace{0.25in}\\ 12 & = \left( {\frac{1}{2}} \right)\left( {24} \right) & \hspace{0.5in}12 & = \left( { - 2} \right)\left( { - 6} \right)& \hspace{0.5in}12& = \left( { - 2} \right)\left( 2 \right)\left( { - 3} \right)\end{align*}

There are many more possible ways to factor 12, but these are representative of many of them.

A common method of factoring numbers is to completely factor the number into positive prime factors. A prime number is a number whose only positive factors are 1 and itself. For example, 2, 3, 5, and 7 are all examples of prime numbers. Examples of numbers that aren’t prime are 4, 6, and 12 to pick a few.

If we completely factor a number into positive prime factors there will only be one way of doing it. That is the reason for factoring things in this way. For our example above with 12 the complete factorization is,

$12 = \left( 2 \right)\left( 2 \right)\left( 3 \right)$

Factoring polynomials is done in pretty much the same manner. We determine all the terms that were multiplied together to get the given polynomial. We then try to factor each of the terms we found in the first step. This continues until we simply can’t factor anymore. When we can’t do any more factoring we will say that the polynomial is completely factored.

Here are a couple of examples.

${x^2} - 16 = \left( {x + 4} \right)\left( {x - 4} \right)$

This is completely factored since neither of the two factors on the right can be further factored.

Likewise,

${x^4} - 16 = \left( {{x^2} + 4} \right)\left( {{x^2} - 4} \right)$

is not completely factored because the second factor can be further factored. Note that the first factor is completely factored however. Here is the complete factorization of this polynomial.

${x^4} - 16 = \left( {{x^2} + 4} \right)\left( {x + 2} \right)\left( {x - 2} \right)$

The purpose of this section is to familiarize ourselves with many of the techniques for factoring polynomials.

#### Greatest Common Factor

The first method for factoring polynomials will be factoring out the greatest common factor. When factoring in general this will also be the first thing that we should try as it will often simplify the problem.

To use this method all that we do is look at all the terms and determine if there is a factor that is in common to all the terms. If there is, we will factor it out of the polynomial. Also note that in this case we are really only using the distributive law in reverse. Remember that the distributive law states that

$a\left( {b + c} \right) = ab + ac$

In factoring out the greatest common factor we do this in reverse. We notice that each term has an $$a$$ in it and so we “factor” it out using the distributive law in reverse as follows,

$ab + ac = a\left( {b + c} \right)$

Let’s take a look at some examples.

Example 1 Factor out the greatest common factor from each of the following polynomials.
1. $$8{x^4} - 4{x^3} + 10{x^2}$$
2. $${x^3}{y^2} + 3{x^4}y + 5{x^5}{y^3}$$
3. $$3{x^6} - 9{x^2} + 3x$$
4. $$9{x^2}\left( {2x + 7} \right) - 12x\left( {2x + 7} \right)$$
Show All Solutions Hide All Solutions
a $$8{x^4} - 4{x^3} + 10{x^2}$$ Show Solution

First, we will notice that we can factor a 2 out of every term. Also note that we can factor an $$x^{2}$$ out of every term. Here then is the factoring for this problem.

$8{x^4} - 4{x^3} + 10{x^2} = 2{x^2}\left( {4{x^2} - 2x + 5} \right)$

Note that we can always check our factoring by multiplying the terms back out to make sure we get the original polynomial.

b $${x^3}{y^2} + 3{x^4}y + 5{x^5}{y^3}$$ Show Solution

In this case we have both $$x$$’s and $$y$$’s in the terms but that doesn’t change how the process works. Each term contains and $$x^{3}$$ and a $$y$$ so we can factor both of those out. Doing this gives,

${x^3}{y^2} + 3{x^4}y + 5{x^5}{y^3} = {x^3}y\left( {y + 3x + 5{x^2}{y^2}} \right)$

c $$3{x^6} - 9{x^2} + 3x$$ Show Solution

In this case we can factor a 3$$x$$ out of every term. Here is the work for this one.

$3{x^6} - 9{x^2} + 3x = 3x\left( {{x^5} - 3x + 1} \right)$

Notice the “+1” where the 3$$x$$ originally was in the final term, since the final term was the term we factored out we needed to remind ourselves that there was a term there originally. To do this we need the “+1” and notice that it is “+1” instead of “-1” because the term was originally a positive term. If it had been a negative term originally we would have had to use “-1”.

One of the more common mistakes with these types of factoring problems is to forget this “1”. Remember that we can always check by multiplying the two back out to make sure we get the original. To check that the “+1” is required, let’s drop it and then multiply out to see what we get.

$3x\left( {{x^5} - 3x} \right) = 3{x^6} - 9{x^2} \ne 3{x^6} - 9{x^2} + 3x$

So, without the “+1” we don’t get the original polynomial! Be careful with this. It is easy to get in a hurry and forget to add a “+1” or “-1” as required when factoring out a complete term.

d $$9{x^2}\left( {2x + 7} \right) - 12x\left( {2x + 7} \right)$$ Show Solution

This one looks a little odd in comparison to the others. However, it works the same way. There is a 3$$x$$ in each term and there is also a $$2x + 7$$ in each term and so that can also be factored out. Doing the factoring for this problem gives,

$9{x^2}\left( {2x + 7} \right) - 12x\left( {2x + 7} \right) = 3x\left( {2x + 7} \right)\left( {3x - 4} \right)$

#### Factoring By Grouping

This is a method that isn’t used all that often, but when it can be used it can be somewhat useful. This method is best illustrated with an example or two.

Example 2 Factor by grouping each of the following.
1. $$3{x^2} - 2x + 12x - 8$$
2. $${x^5} + x - 2{x^4} - 2$$
3. $${x^5} - 3{x^3} - 2{x^2} + 6$$
Show All Solutions Hide All Solutions
a $$3{x^2} - 2x + 12x - 8$$ Show Solution

In this case we group the first two terms and the final two terms as shown here,

$\left( {3{x^2} - 2x} \right) + \left( {12x - 8} \right)$

Now, notice that we can factor an $$x$$ out of the first grouping and a 4 out of the second grouping. Doing this gives,

$3{x^2} - 2x + 12x - 8 = x\left( {3x - 2} \right) + 4\left( {3x - 2} \right)$

We can now see that we can factor out a common factor of $$3x - 2$$ so let’s do that to the final factored form.

$3{x^2} - 2x + 12x - 8 = \left( {3x - 2} \right)\left( {x + 4} \right)$

And we’re done. That’s all that there is to factoring by grouping. Note again that this will not always work and sometimes the only way to know if it will work or not is to try it and see what you get.

b $${x^5} + x - 2{x^4} - 2$$ Show Solution

In this case we will do the same initial step, but this time notice that both of the final two terms are negative so we’ll factor out a “-” as well when we group them. Doing this gives,

$\left( {{x^5} + x} \right) - \left( {2{x^4} + 2} \right)$

Again, we can always distribute the “-” back through the parenthesis to make sure we get the original polynomial.

At this point we can see that we can factor an $$x$$ out of the first term and a 2 out of the second term. This gives,

${x^5} + x - 2{x^4} - 2 = x\left( {{x^4} + 1} \right) - 2\left( {{x^4} + 1} \right)$

We now have a common factor that we can factor out to complete the problem.

${x^5} + x - 2{x^4} - 2 = \left( {{x^4} + 1} \right)\left( {x - 2} \right)$

c $${x^5} - 3{x^3} - 2{x^2} + 6$$ Show Solution

This one also has a “-” in front of the third term as we saw in the last part. However, this time the fourth term has a “+” in front of it unlike the last part. We will still factor a “-” out when we group however to make sure that we don’t lose track of it. When we factor the “-” out notice that we needed to change the “+” on the fourth term to a “-”. Again, you can always check that this was done correctly by multiplying the “-” back through the parenthesis.

$\left( {{x^5} - 3{x^3}} \right) - \left( {2{x^2} - 6} \right)$

Now that we’ve done a couple of these we won’t put the remaining details in and we’ll go straight to the final factoring.

${x^5} - 3{x^3} - 2{x^2} + 6 = {x^3}\left( {{x^2} - 3} \right) - 2\left( {{x^2} - 3} \right) = \left( {{x^2} - 3} \right)\left( {{x^3} - 2} \right)$

Factoring by grouping can be nice, but it doesn’t work all that often. Notice that as we saw in the last two parts of this example if there is a “-” in front of the third term we will often also factor that out of the third and fourth terms when we group them.

First, let’s note that quadratic is another term for second degree polynomial. So we know that the largest exponent in a quadratic polynomial will be a 2. In these problems we will be attempting to factor quadratic polynomials into two first degree (hence forth linear) polynomials. Until you become good at these, we usually end up doing these by trial and error although there are a couple of processes that can make them somewhat easier.

Let’s take a look at some examples.

Example 3 Factor each of the following polynomials.
1. $${x^2} + 2x - 15$$
2. $${x^2} - 10x + 24$$
3. $${x^2} + 6x + 9$$
4. $${x^2} + 5x + 1$$
5. $$3{x^2} + 2x - 8$$
6. $$5{x^2} - 17x + 6$$
7. $$4{x^2} + 10x - 6$$
Show All Solutions Hide All Solutions
a $${x^2} + 2x - 15$$ Show Solution

Okay since the first term is $${x^2}$$ we know that the factoring must take the form.

${x^2} + 2x - 15 = \left( {x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

We know that it will take this form because when we multiply the two linear terms the first term must be $$x^{2}$$ and the only way to get that to show up is to multiply $$x$$ by $$x$$. Therefore, the first term in each factor must be an $$x$$. To finish this we just need to determine the two numbers that need to go in the blank spots.

We can narrow down the possibilities considerably. Upon multiplying the two factors out these two numbers will need to multiply out to get -15. In other words, these two numbers must be factors of -15. Here are all the possible ways to factor -15 using only integers.

$\left( { - 1} \right)\left( {15} \right)\hspace{0.25in}\left( 1 \right)\left( { - 15} \right)\hspace{0.25in}\left( { - 3} \right)\left( 5 \right)\hspace{0.25in}\left( 3 \right)\left( { - 5} \right)$

Now, we can just plug these in one after another and multiply out until we get the correct pair. However, there is another trick that we can use here to help us out. The correct pair of numbers must add to get the coefficient of the $$x$$ term. So, in this case the third pair of factors will add to “+2” and so that is the pair we are after.

Here is the factored form of the polynomial.

${x^2} + 2x - 15 = \left( {x - 3} \right)\left( {x + 5} \right)$

Again, we can always check that we got the correct answer by doing a quick multiplication.

Note that the method we used here will only work if the coefficient of the $$x^{2}$$ term is one. If it is anything else this won’t work and we really will be back to trial and error to get the correct factoring form.

b $${x^2} - 10x + 24$$ Show Solution

Let’s write down the initial form again,

${x^2} - 10x + 24 = \left( {x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

Now, we need two numbers that multiply to get 24 and add to get -10. It looks like -6 and -4 will do the trick and so the factored form of this polynomial is,

${x^2} - 10x + 24 = \left( {x - 4} \right)\left( {x - 6} \right)$

c $${x^2} + 6x + 9$$ Show Solution

${x^2} + 6x + 9 = \left( {x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

This time we need two numbers that multiply to get 9 and add to get 6. In this case 3 and 3 will be the correct pair of numbers. Don’t forget that the two numbers can be the same number on occasion as they are here.

Here is the factored form for this polynomial.

${x^2} + 6x + 9 = \left( {x + 3} \right)\left( {x + 3} \right) = {\left( {x + 3} \right)^2}$

Note as well that we further simplified the factoring to acknowledge that it is a perfect square. You should always do this when it happens.

d $${x^2} + 5x + 1$$ Show Solution

Once again, here is the initial form,

${x^2} + 5x + 1 = \left( {x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

Okay, this time we need two numbers that multiply to get 1 and add to get 5. There aren’t two integers that will do this and so this quadratic doesn’t factor.

This will happen on occasion so don’t get excited about it when it does.

e $$3{x^2} + 2x - 8$$ Show Solution

Okay, we no longer have a coefficient of 1 on the $${x^2}$$ term. However, we can still make a guess as to the initial form of the factoring. Since the coefficient of the $$x^{2}$$ term is a 3 and there are only two positive factors of 3 there is really only one possibility for the initial form of the factoring.

$3{x^2} + 2x - 8 = \left( {3x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

Since the only way to get a $$3{x^2}$$ is to multiply a 3$$x$$ and an $$x$$ these must be the first two terms. However, finding the numbers for the two blanks will not be as easy as the previous examples. We will need to start off with all the factors of -8.

$\left( { - 1} \right)\left( 8 \right)\hspace{0.5in}\left( 1 \right)\left( { - 8} \right)\hspace{0.25in}\left( { - 2} \right)\left( 4 \right)\hspace{0.25in}\left( 2 \right)\left( { - 4} \right)$

At this point the only option is to pick a pair plug them in and see what happens when we multiply the terms out. Let’s start with the fourth pair. Let’s plug the numbers in and see what we get.

$\left( {3x + 2} \right)\left( {x - 4} \right) = 3{x^2} - 10x - 8$

Well the first and last terms are correct, but then they should be since we’ve picked numbers to make sure those work out correctly. However, since the middle term isn’t correct this isn’t the correct factoring of the polynomial.

That doesn’t mean that we guessed wrong however. With the previous parts of this example it didn’t matter which blank got which number. This time it does. Let’s flip the order and see what we get.

$\left( {3x - 4} \right)\left( {x + 2} \right) = 3{x^2} + 2x - 8$

So, we got it. We did guess correctly the first time we just put them into the wrong spot.

So, in these problems don’t forget to check both places for each pair to see if either will work.

f $$5{x^2} - 17x + 6$$ Show Solution

Again, the coefficient of the $${x^2}$$ term has only two positive factors so we’ve only got one possible initial form.

$5{x^2} - 17x + 6 = \left( {5x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)$

Next, we need all the factors of 6. Here they are.

$\left( 1 \right)\left( 6 \right)\hspace{0.5in}\left( { - 1} \right)\left( { - 6} \right)\hspace{0.25in}\left( 2 \right)\left( 3 \right)\hspace{0.5in}\left( { - 2} \right)\left( { - 3} \right)$

Don’t forget the negative factors. They are often the ones that we want. In fact, upon noticing that the coefficient of the $$x$$ is negative we can be assured that we will need one of the two pairs of negative factors since that will be the only way we will get negative coefficient there. With some trial and error we can get that the factoring of this polynomial is,

$5{x^2} - 17x + 6 = \left( {5x - 2} \right)\left( {x - 3} \right)$

g $$4{x^2} + 10x - 6$$ Show Solution

In this final step we’ve got a harder problem here. The coefficient of the $${x^2}$$ term now has more than one pair of positive factors. This means that the initial form must be one of the following possibilities.

\begin{align*}4{x^2} + 10x - 6 & = \left( {4x + \underline {\,\,\,\,} } \right)\left( {x + \underline {\,\,\,\,} } \right)\\ 4{x^2} + 10x - 6 & = \left( {2x + \underline {\,\,\,\,} } \right)\left( {2x + \underline {\,\,\,\,} } \right)\end{align*}

To fill in the blanks we will need all the factors of -6. Here they are,

$\left( { - 1} \right)\left( 6 \right)\hspace{0.25in}\left( 1 \right)\left( { - 6} \right)\hspace{0.25in}\left( { - 2} \right)\left( 3 \right)\hspace{0.25in}\left( 2 \right)\left( { - 3} \right)$

With some trial and error we can find that the correct factoring of this polynomial is,

$4{x^2} + 10x - 6 = \left( {2x - 1} \right)\left( {2x + 6} \right)$

Note as well that in the trial and error phase we need to make sure and plug each pair into both possible forms and in both possible orderings to correctly determine if it is the correct pair of factors or not.

We can actually go one more step here and factor a 2 out of the second term if we’d like to. This gives,

$4{x^2} + 10x - 6 = 2\left( {2x - 1} \right)\left( {x + 3} \right)$

This is important because we could also have factored this as,

$4{x^2} + 10x - 6 = \left( {4x - 2} \right)\left( {x + 3} \right)$

which, on the surface, appears to be different from the first form given above. However, in this case we can factor a 2 out of the first term to get,

$4{x^2} + 10x - 6 = 2\left( {2x - 1} \right)\left( {x + 3} \right)$

This is exactly what we got the first time and so we really do have the same factored form of this polynomial.

#### Special Forms

There are some nice special forms of some polynomials that can make factoring easier for us on occasion. Here are the special forms.

\begin{align*}{a^2} + 2ab + {b^2} & = {\left( {a + b} \right)^2}\\ {a^2} - 2ab + {b^2} & = {\left( {a - b} \right)^2}\\ {a^2} - {b^2} & = \left( {a + b} \right)\left( {a - b} \right)\\ {a^3} + {b^3} & = \left( {a + b} \right)\left( {{a^2} - ab + {b^2}} \right)\\ {a^3} - {b^3} & = \left( {a - b} \right)\left( {{a^2} + ab + {b^2}} \right)\end{align*}

Let’s work some examples with these.

Example 4 Factor each of the following.
1. $${x^2} - 20x + 100$$
2. $$25{x^2} - 9$$
3. $$8{x^3} + 1$$
Show All Solutions Hide All Solutions
a $${x^2} - 20x + 100$$ Show Solution

In this case we’ve got three terms and it’s a quadratic polynomial. Notice as well that the constant is a perfect square and its square root is 10. Notice as well that 2(10)=20 and this is the coefficient of the $$x$$ term. So, it looks like we’ve got the second special form above. The correct factoring of this polynomial is,

${x^2} - 20x + 100 = {\left( {x - 10} \right)^2}$

To be honest, it might have been easier to just use the general process for factoring quadratic polynomials in this case rather than checking that it was one of the special forms, but we did need to see one of them worked.

b $$25{x^2} - 9$$ Show Solution

In this case all that we need to notice is that we’ve got a difference of perfect squares,

$25{x^2} - 9 = {\left( {5x} \right)^2} - {\left( 3 \right)^2}$

So, this must be the third special form above. Here is the correct factoring for this polynomial.

$25{x^2} - 9 = \left( {5x + 3} \right)\left( {5x - 3} \right)$

c $$8{x^3} + 1$$ Show Solution

This problem is the sum of two perfect cubes,

$8{x^3} + 1 = {\left( {2x} \right)^3} + {\left( 1 \right)^3}$

and so we know that it is the fourth special form from above. Here is the factoring for this polynomial.

$8{x^3} + 1 = \left( {2x + 1} \right)\left( {4{x^2} - 2x + 1} \right)$

Do not make the following factoring mistake!

${a^2} + {b^2} \ne {\left( {a + b} \right)^2}$

This just simply isn’t true for the vast majority of sums of squares, so be careful not to make this very common mistake. There are rare cases where this can be done, but none of those special cases will be seen here.

#### Factoring Polynomials with Degree Greater than 2

There is no one method for doing these in general. However, there are some that we can do so let’s take a look at a couple of examples.

Example 5 Factor each of the following.
1. $$3{x^4} - 3{x^3} - 36{x^2}$$
2. $${x^4} - 25$$
3. $${x^4} + {x^2} - 20$$
Show All Solutions Hide All Solutions
a $$3{x^4} - 3{x^3} - 36{x^2}$$ Show Solution

In this case let’s notice that we can factor out a common factor of $$3{x^2}$$ from all the terms so let’s do that first.

$3{x^4} - 3{x^3} - 36{x^2} = 3{x^2}\left( {{x^2} - x - 12} \right)$

What is left is a quadratic that we can use the techniques from above to factor. Doing this gives us,

$3{x^4} - 3{x^3} - 36{x^2} = 3{x^2}\left( {x - 4} \right)\left( {x + 3} \right)$

Don’t forget that the FIRST step to factoring should always be to factor out the greatest common factor. This can only help the process.

b $${x^4} - 25$$ Show Solution

There is no greatest common factor here. However, notice that this is the difference of two perfect squares.

${x^4} - 25 = {\left( {{x^2}} \right)^2} - {\left( 5 \right)^2}$

So, we can use the third special form from above.

${x^4} - 25 = \left( {{x^2} + 5} \right)\left( {{x^2} - 5} \right)$

Neither of these can be further factored and so we are done. Note however, that often we will need to do some further factoring at this stage.

c $${x^4} + {x^2} - 20$$ Show Solution

Let’s start this off by working a factoring a different polynomial.

${u^2} + u - 20 = \left( {u - 4} \right)\left( {u + 5} \right)$

We used a different variable here since we’d already used $$x$$’s for the original polynomial.

So, why did we work this? Well notice that if we let $$u = {x^2}$$ then $${u^2} = {\left( {{x^2}} \right)^2} = {x^4}$$. We can then rewrite the original polynomial in terms of $$u$$’s as follows,

${x^4} + {x^2} - 20 = {u^2} + u - 20$

and we know how to factor this! So factor the polynomial in $$u$$’s then back substitute using the fact that we know $$u = {x^2}$$.

\begin{align*}{x^4} + {x^2} - 20 & = {u^2} + u - 20\\ & = \left( {u - 4} \right)\left( {u + 5} \right)\\ & = \left( {{x^2} - 4} \right)\left( {{x^2} + 5} \right)\end{align*}

Finally, notice that the first term will also factor since it is the difference of two perfect squares. The correct factoring of this polynomial is then,

${x^4} + {x^2} - 20 = \left( {x - 2} \right)\left( {x + 2} \right)\left( {{x^2} + 5} \right)$

Note that this converting to $$u$$ first can be useful on occasion, however once you get used to these this is usually done in our heads.

We did not do a lot of problems here and we didn’t cover all the possibilities. However, we did cover some of the most common techniques that we are liable to run into in the other chapters of this work.