
## Section7.2Factoring by Grouping

###### ObjectivesPCC Course Content and Outcome Guide

This section covers a technique for factoring polynomials like $x^3+3x^2+2x+6\text{,}$ which factors as $\left(x^2+2\right)(x+3)\text{.}$ If there are four terms, the technique in this section might help you to factor the polynomial. Additionally, this technique is a stepping stone to a factoring technique in Section 7.3 and Section 7.4.

### Subsection7.2.1Factoring out Common Polynomials

Recall that to factor $3x+6\text{,}$ we factor out the common factor $3\text{:}$

\begin{align*} 3x+6\amp=\attention{3}x+\attention{3}\cdot2\\ \amp=3(x+2) \end{align*}

The “$3$” here could have been something more abstract, and it still would be valid to factor it out:

\begin{align*} xA+2A\amp=x\attention{A}+2\attention{A}\amp x\apple+2\apple\amp=x\attention{\apple}+2\attention{\apple}\\ \amp=A(x+2)\amp\amp=\apple(x+2) \end{align*}

In fact, even “larger” things can be factored out, as in this example:

\begin{align*} x(a+b)+2(a+b)\amp=x\attention{\overbrace{(a+b)}}+2\attention{\overbrace{(a+b)}}\\ \amp=(a+b)(x+2) \end{align*}

In this last example, we factored out the binomial factor $(a+b)\text{.}$ Factoring out binomials is the essence of this section, so let's see that a few more times:

\begin{align*} x(x+2)+3(x+2)\amp=x\attention{\overbrace{(x+2)}}+3\attention{\overbrace{(x+2)}}\\ \amp=(x+2)(x+3) \end{align*}
\begin{align*} z^2(2y+5)+3(2y+5)\amp=z^2\attention{\overbrace{(2y+5)}}+3\attention{\overbrace{(2y+5)}}\\ \amp=(2y+5)(z^2+3) \end{align*}

And even with an expression like $Q^2(Q-3)+Q-3\text{,}$ if we re-write it in the right way using a $1$ and some parentheses, then it too can be factored:

\begin{align*} Q^2(Q-3)+Q-3\amp=Q^2(Q-3)+1(Q-3)\\ \amp=Q^2\attention{\overbrace{(Q-3)}}+1\attention{\overbrace{(Q-3)}}\\ \amp=(Q-3)(Q^2+1) \end{align*}

The truth is you are unlikely to come upon an expression like $x(x+2)+3(x+2)\text{,}$ as in these examples. Why wouldn't someone have multiplied that out already? Or factored it all the way? So far in this section, we have only been looking at a stepping stone to a real factoring technique called factoring by grouping.

### Subsection7.2.2Factoring by Grouping

Factoring by grouping is a factoring technique that sometimes works on polynomials with four terms. Here is an example.

###### Example7.2.2

Suppose we must factor $x^3-3x^2+5x-15\text{.}$ Note that there are four terms, and they are written in descending order of the powers of $x\text{.}$ “Grouping” means to group the first two terms and the last two terms together:

\begin{align*} x^3-3x^2+5x-15\amp=\left(x^3-3x^2\right)+(5x-15)\\ \end{align*}

Now, each of these two groups has its own greatest common factor we can factor out:

\begin{align*} \amp=\highlight{x^2}(x-3)\highlight{{}+5}(x-3)\\ \end{align*}

In a sense, we are “lucky” because we now see matching binomials that can themselves be factored out:

\begin{align*} \amp=\highlight{x^2}\attention{\overbrace{(x-3)}}\highlight{{}+5}\attention{\overbrace{(x-3)}}\\ \amp=(x-3)\highlight{\left(x^2+5\right)} \end{align*}

And so we have factored $x^3-3x^2+5x-15$ as $(x-3)\left(x^2+5\right)\text{.}$ But to be sure, if we multiply this back out, it should recover the original $x^3-3x^2+5x-15\text{.}$ To confirm your answers are correct, you should always make checks like this.

###### Example7.2.4

Factor $t^3-5t^2-3t+15\text{.}$ This example has a complication with negative signs. If we try to break up this polynomial into two groups as $\left(t^3-5t^2\right)-(3t+15)\text{,}$ then we've made an error! In that last expression, we are subtracting a group with the term $15\text{,}$ so overall it subtracts $15\text{.}$ The original polynomial added $15\text{,}$ so we are off course.

One way to handle this is to treat subtraction as addition of a negative:

\begin{align*} t^3-5t^2-3t+15\amp=t^3-5t^2+(-3t)+15\\ \amp=\left(t^3-5t^2\right)+\left(-3t+15\right)\\ \end{align*}

Now we can proceed to factor out common factors from each group. Since the second group leads with a negative coefficient, we'll factor out $-3\text{.}$ This will result in the “${}+15$” becoming “${}-5$”.

\begin{align*} \amp=\highlight{t^2}(t-5)+\highlight{(-3)}(t-5)\\ \amp=\highlight{t^2}\attention{\overbrace{(t-5)}}\highlight{{}-3}\attention{\overbrace{(t-5)}}\\ \amp=(t-5)\highlight{\left(t^2-3\right)} \end{align*}

And remember that we can confirm this is correct by multiplying it out. If we made no mistakes, it should result in the original $t^3-5t^2-3t+15\text{.}$

###### Example7.2.6

Factor $x^3-3x^2+x-3\text{.}$ To succeed with this example, we will need to “factor out” a trivial number $1$ that isn't apparent until we make it so.

\begin{align*} x^3-3x^2+x-3\amp=\left(x^3-3x^2\right)+(x-3)\\ \amp=\highlight{x^2}(x-3)\highlight{{}+1}(x-3)\\ \amp=\highlight{x^2}\attention{\overbrace{(x-3)}}\highlight{{}+1}\attention{\overbrace{(x-3)}}\\ \amp=(x-3)\highlight{\left(x^2+1\right)} \end{align*}

Notice how we changed $x-3$ to $+1(x-3)\text{,}$ so we wouldn't forget the $+1$ in the final factored form. As always, we should check this is correct by multiplying it out.

###### Example7.2.8

Factor $xy^2-10y^2-2x+20\text{.}$ The technique can work when there are multiple variables too.

\begin{align*} xy^2-10y^2-2x+20\amp=\left(xy^2-10y^2\right)+(-2x+20)\\ \amp=\highlight{y^2}(x-10)+\highlight{(-2)}(x-10)\\ \amp=\highlight{y^2}\attention{\overbrace{(x-10)}}\highlight{-2}\attention{\overbrace{(x-10)}}\\ \amp=(x-10)\highlight{\left(y^2-2\right)}\text{.} \end{align*}

Unfortunately, this technique is not guaranteed to work on every polynomial with four terms. In fact, most randomly selected four-term polynomials will not factor using this method and those selected here should be considered “nice.” Here is an example that will not factor with grouping:

\begin{align*} x^3+6x^2+11x+6\amp= \left(x^3+6x^2\right)+(11x+6)\\ \amp= x^2\underbrace{\left(x+6\right)}_{\mathord{?}}+1\underbrace{(11x+6)}_{\mathord{?}} \end{align*}

In this example, at the step where we hope to see the same binomial appearing twice, we see two different binomials. It doesn't mean that this kind of polynomial can't be factored, but it does mean that “factoring by grouping” is not going to help. This polynomial actually factors as $(x+1)(x+2)(x+3)\text{.}$ So the fact that grouping fails to factor the polynomial doesn't tell us whether or not it is prime.

### SubsectionExercises

Factoring out Common Polynomials

###### 1

Factor the given polynomial

${t\!\left(t+2\right)+10\!\left(t+2\right)}=$

###### 2

Factor the given polynomial

${t\!\left(t-8\right)-4\!\left(t-8\right)}=$

###### 3

Factor the given polynomial

${x\!\left(y-2\right)-7\!\left(y-2\right)}=$

###### 4

Factor the given polynomial

${x\!\left(y-3\right)-2\!\left(y-3\right)}=$

###### 5

Factor the given polynomial

${4x\!\left(x+y\right)+9\!\left(x+y\right)}=$

###### 6

Factor the given polynomial

${5x\!\left(x+y\right)+7\!\left(x+y\right)}=$

###### 7

Factor the given polynomial

${10y^{3}\!\left(4y-9\right)+4y-9}=$

###### 8

Factor the given polynomial

${7r^{4}\!\left(8r+7\right)+8r+7}=$

###### 9

Factor the given polynomial

${49r^{4}\!\left(r+16\right)+35r^{3}\!\left(r+16\right)+35r^{2}\!\left(r+16\right)}=$

###### 10

Factor the given polynomial

${30t^{4}\!\left(t+6\right)-24t^{3}\!\left(t+6\right)+21t^{2}\!\left(t+6\right)}=$

Factoring by Grouping

###### 11

Factor the given polynomial

${t^{2}+7t+3t+21}=$

###### 12

Factor the given polynomial

${x^{2}-4x+10x-40}=$

###### 13

Factor the given polynomial

${x^{2}+10x+7x+70}=$

###### 14

Factor the given polynomial

${y^{2}-7y-5y+35}=$

###### 15

Factor the given polynomial

${y^{3}+3y^{2}-2y-6}=$

###### 16

Factor the given polynomial

${y^{3}-10y^{2}-8y+80}=$

###### 17

Factor the given polynomial

${r^{3}-6r^{2}-8r+48}=$

###### 18

Factor the given polynomial

${r^{3}+3r^{2}+5r+15}=$

###### 19

Factor the given polynomial

${xy+9x+4y+36}=$

###### 20

Factor the given polynomial

${xy-10x+8y-80}=$

###### 21

Factor the given polynomial

${xy-2x+5y-10}=$

###### 22

Factor the given polynomial

${xy+3x-6y-18}=$

###### 23

Factor the given polynomial

${4x^{2}-4xy+9xy-9y^{2}}=$

###### 24

Factor the given polynomial

${5x^{2}+45xy+7xy+63y^{2}}=$

###### 25

Factor the given polynomial

${6x^{2}+30xy+5xy+25y^{2}}=$

###### 26

Factor the given polynomial

${7x^{2}+14xy+2xy+4y^{2}}=$

###### 27

Factor the given polynomial

${x^{3}+7+4x^{3}y+28y}=$

###### 28

Factor the given polynomial

${x^{3}+9-2x^{3}y-18y}=$

###### 29

Factor the given polynomial

${x^{3}-10-5x^{3}y+50y}=$

###### 30

Factor the given polynomial

${x^{3}+2+9x^{3}y+18y}=$

###### 31

Factor the given polynomial

${16x^{5}+48x^{4}-12x^{4}-36x^{3}+8x^{3}+24x^{2}}=$

###### 32

Factor the given polynomial

${6y^{5}+18y^{4}-8y^{4}-24y^{3}+6y^{3}+18y^{2}}=$