## Section7.2Factoring by Grouping

¶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.

###### Exercise7.2.3

###### 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{.}\)

###### Exercise7.2.5

###### 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.

###### Exercise7.2.7

###### 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:

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.

### Subsection7.2.3Exercises

Factoring out Common Polynomials

###### 1

Factor the given polynomial

\({t\!\left(t-5\right)+10\!\left(t-5\right)}=\)

###### 2

Factor the given polynomial

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

###### 3

Factor the given polynomial

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

###### 4

Factor the given polynomial

\({x\!\left(y-3\right)-6\!\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

\({4r^{6}\!\left(8r+9\right)+8r+9}=\)

###### 8

Factor the given polynomial

\({10r^{4}\!\left(3r+2\right)+3r+2}=\)

###### 9

Factor the given polynomial

\({54r^{4}\!\left(r+12\right)+18r^{3}\!\left(r+12\right)+45r^{2}\!\left(r+12\right)}=\)

###### 10

Factor the given polynomial

\({15t^{4}\!\left(t+2\right)+12t^{3}\!\left(t+2\right)+24t^{2}\!\left(t+2\right)}=\)

Factoring by Grouping

###### 11

Factor the given polynomial

\({t^{2}-9t+3t-27}=\)

###### 12

Factor the given polynomial

\({x^{2}+6x+10x+60}=\)

###### 13

Factor the given polynomial

\({x^{2}-3x+7x-21}=\)

###### 14

Factor the given polynomial

\({y^{2}+9y+5y+45}=\)

###### 15

Factor the given polynomial

\({y^{3}-6y^{2}+2y-12}=\)

###### 16

Factor the given polynomial

\({y^{3}+2y^{2}+8y+16}=\)

###### 17

Factor the given polynomial

\({r^{3}+8r^{2}+6r+48}=\)

###### 18

Factor the given polynomial

\({r^{3}-5r^{2}+3r-15}=\)

###### 19

Factor the given polynomial

\({xy-9x+8y-72}=\)

###### 20

Factor the given polynomial

\({xy+10x+3y+30}=\)

###### 21

Factor the given polynomial

\({xy-2x-7y+14}=\)

###### 22

Factor the given polynomial

\({xy-3x-2y+6}=\)

###### 23

Factor the given polynomial

\({4x^{2}-16xy+9xy-36y^{2}}=\)

###### 24

Factor the given polynomial

\({5x^{2}-15xy+7xy-21y^{2}}=\)

###### 25

Factor the given polynomial

\({6x^{2}-60xy+7xy-70y^{2}}=\)

###### 26

Factor the given polynomial

\({7x^{2}+21xy+2xy+6y^{2}}=\)

###### 27

Factor the given polynomial

\({x^{3}+2+7x^{3}y+14y}=\)

###### 28

Factor the given polynomial

\({x^{3}+9-6x^{3}y-54y}=\)

###### 29

Factor the given polynomial

\({x^{3}+10+6x^{3}y+60y}=\)

###### 30

Factor the given polynomial

\({x^{3}-2+5x^{3}y-10y}=\)

###### 31

Factor the given polynomial

\({30x^{5}+90x^{4}+18x^{4}+54x^{3}+12x^{3}+36x^{2}}=\)

Factor each pair of terms first.

###### 32

Factor the given polynomial

\({10y^{5}+20y^{4}+15y^{4}+30y^{3}+10y^{3}+20y^{2}}=\)

Factor each pair of terms first.