# Factoring by grouping

Learn about a factorization method called "grouping." For example, we can use grouping to write 2x²+8x+3x+12 as (2x+3)(x+4).

#### What you need to know for this lesson

Factoring a polynomial involves writing it as a product of two or more polynomials. It reverses the process of polynomial multiplication.
We have seen several examples of factoring already. However, for this article, you should be especially familiar with taking common factors using the distributive property. For example, 6, x, start superscript, 2, end superscript, plus, 4, x, equals, 2, x, left parenthesis, 3, x, plus, 2, right parenthesis .

#### What you will learn in this lesson

In this article, we will learn how to use a factoring method called grouping.

## Example 1: Factoring $2x^2+8x+3x+12$2, x, start superscript, 2, end superscript, plus, 8, x, plus, 3, x, plus, 12

First, notice that there is no factor common to all terms in 2, x, start superscript, 2, end superscript, plus, 8, x, plus, 3, x, plus, 12. However, if we group the first two terms together and the last two terms together, each group has its own GCF, or greatest common factor:
In particular, there is a GCF of 2, x in the first grouping and a GCF of 3 in the second grouping. We can factor these out to obtain the following expression:
2, x, left parenthesis, x, plus, 4, right parenthesis, plus, 3, left parenthesis, x, plus, 4, right parenthesis
To factor start color tealD, 2, x, end color tealD out of 2, x, start superscript, 2, end superscript, plus, 8, x, we can divide each term by start color tealD, 2, x, end color tealD:
• The first term is: start fraction, 2, x, start superscript, 2, end superscript, divided by, start color tealD, 2, x, end color tealD, end fraction, equals, x
• The second term is: start fraction, 8, x, divided by, start color tealD, 2, x, end color tealD, end fraction, equals, 4
So 2, x, start superscript, 2, end superscript, plus, 8, x, equals, start color tealD, 2, x, end color tealD, left parenthesis, x, plus, 4, right parenthesis.
To factor start color purpleC, 3, end color purpleC out of 3, x, plus, 12, we divide each term by start color purpleC, 3, end color purpleC:
• The first term is: start fraction, 3, x, divided by, start color purpleC, 3, end color purpleC, end fraction, equals, x
• The second term is: start fraction, 12, divided by, start color purpleC, 3, end color purpleC, end fraction, equals, 4
So 3, x, plus, 12, equals, start color purpleC, 3, end color purpleC, left parenthesis, x, plus, 4, right parenthesis.
Therefore, it follows that 2, x, start superscript, 2, end superscript, plus, 8, x, plus, 3, x, plus, 12, equals, 2, x, left parenthesis, x, plus, 4, right parenthesis, plus, 3, left parenthesis, x, plus, 4, right parenthesis. A quick multiplication check can verify that the common factors were taken out correctly.
Notice that this reveals yet another common factor between the two terms: start color goldD, x, plus, 4, end color goldD. We can use the distributive property to factor out this common factor.
Since the polynomial is now expressed as a product of two binomials, it is in factored form. We can check our work by multiplying and comparing it to the original polynomial.
\begin{aligned}(x+4)(2x+3)&=(x+4)(2x)+(x+4)(3)\\ \\ &=2x^2+8x+3x+12 \end{aligned}
This is the same as the original polynomial, and so our factorization is correct!

## Example 2: Factoring $3x^2+6x+4x+8$3, x, start superscript, 2, end superscript, plus, 6, x, plus, 4, x, plus, 8

Let's summarize what was done above by factoring another polynomial.
\begin{aligned}&\phantom{=}3x^2+6x+4x+8\\\\ &=(3x^2+6x)+(4x+8)&&\small{\gray{\text{Group terms}}}\\ \\ &=3x({x+2})+4({x+2})&&\small{\gray{\text{Factor out GCFs}}}\\ \\ &=3x(\goldD{x+2})+4(\goldD{x+2})&&\small{\gray{\text{Common factor!}}}\\\\ &=(\goldD{x+2})(3x+4)&&\small{\gray{\text{Factor out } x+2}} \end{aligned}
The factored form is left parenthesis, x, plus, 2, right parenthesis, left parenthesis, 3, x, plus, 4, right parenthesis.

### Check your understanding

1) Factor 9, x, start superscript, 2, end superscript, plus, 6, x, plus, 12, x, plus, 8.

The factored form is left parenthesis, 3, x, plus, 2, right parenthesis, left parenthesis, 3, x, plus, 4, right parenthesis.
2) Factor 5, x, start superscript, 2, end superscript, plus, 10, x, plus, 2, x, plus, 4.

\begin{aligned}&\phantom{=}5x^2+10x+2x+4\\\\ &=(5x^2+10x)+(2x+4)&&\small{\gray{\text{Group terms}}}\\ \\ &=5x({x+2})+2({x+2})&&\small{\gray{\text{Factor out GCFs}}}\\ \\ &=5x(\goldD{x+2})+2(\goldD{x+2})&&\small{\gray{\text{Common factor!}}}\\\\ &=(\goldD{x+2})(5x+2)&&\small{\gray{\text{Factor out } x+2}} \end{aligned}
The factored form is left parenthesis, x, plus, 2, right parenthesis, left parenthesis, 5, x, plus, 2, right parenthesis.
3) Factor 8, x, start superscript, 2, end superscript, plus, 6, x, plus, 4, x, plus, 3.

\begin{aligned}&\phantom{=}8x^2+6x+4x+3\\\\ &=(8x^2+6x)+(4x+3)&&\small{\gray{\text{Group terms}}}\\ \\ &=2x({4x+3})+\maroonD1({4x+3})&&\small{\gray{\text{Factor out GCFs}}}\\ \\ &\phantom{=}\small{\gray{\text{GCF of }4x \text{ and } 3 \text{ is }}\maroonD1}.\\ \\ &=2x(\goldD{4x+3})+1(\goldD{4x+3})&&\small{\gray{\text{Common factor!}}}\\\\ &=(\goldD{4x+3})(2x+1)&&\small{\gray{\text{Factor out } 4x+3}} \end{aligned}
The factored form is left parenthesis, 4, x, plus, 3, right parenthesis, left parenthesis, 2, x, plus, 1, right parenthesis.

## Example 3: Factoring $3x^2-6x-4x+8$3, x, start superscript, 2, end superscript, minus, 6, x, minus, 4, x, plus, 8

Extra care should be taken when using the grouping method to factor a polynomial with negative coefficients.
For example, the steps below can be used to factor 3, x, start superscript, 2, end superscript, minus, 6, x, minus, 4, x, plus, 8.
The factored form of the polynomial is left parenthesis, x, minus, 2, right parenthesis, left parenthesis, 3, x, minus, 4, right parenthesis. We can multiply the binomials to check our work.
\begin{aligned}(x-2)(3x-4)&=(x-2)(3x)+(x-2)(-4)\\ \\ &=3x^2-6x-4x+8 \end{aligned}
This is the same as the original polynomial, and so our factorization is correct!
A few of the steps above may seem different than what you saw in the first example, so you may have a few questions.
Where did the "+" sign between the groupings come from?
In step start color blueD, left parenthesis, 1, right parenthesis, end color blueD, a "+" sign was added between the groupings left parenthesis, 3, x, start superscript, 2, end superscript, minus, 6, x, right parenthesis and left parenthesis, minus, 4, x, plus, 8, right parenthesis. This is because the third term left parenthesis, minus, 4, x, right parenthesis is negative, and the sign of the term must be included within the grouping.
Keeping the minus sign outside the second grouping is tricky. For example, a common error is to group 3, x, start superscript, 2, end superscript, minus, 6, x, minus, 4, x, plus, 8 as left parenthesis, 3, x, start superscript, 2, end superscript, minus, 6, x, right parenthesis, minus, left parenthesis, 4, x, plus, 8, right parenthesis. This grouping, however, simplifies to 3, x, start superscript, 2, end superscript, minus, 6, x, minus, 4, x, start color maroonD, minus, 8, end color maroonD, which is not the same as the original expression.
Sure!
\begin{aligned}(3x^2-6x)-(4x+8)&=(3x^2-6x)\tealD{-1}(4x+8)\\ \\ &=3x^2-6x\tealD{-1}(4x)\tealD{-1}(8)\\ \\ &=3x^2-6x-4x-8 \end{aligned}
Remember that the original expression is 3, x, start superscript, 2, end superscript, minus, 6, x, minus, 4, x, start color maroonD, plus, 8, end color maroonD.
Why factor out minus, 4 instead of 4?
In step start color blueD, left parenthesis, 2, right parenthesis, end color blueD, we factored out a minus, 4 to reveal a common factor of left parenthesis, x, minus, 2, right parenthesis between the terms. If we instead factored out a positive 4, we would not obtain that common binomial factor seen above:
\begin{aligned}(3x^2-6x)+(-4x+8)&=3x(\goldD{x-2})+4(\purpleC{-x+2})\\ \end{aligned}
When the leading term in a group is negative, we will often need to factor out a negative common factor.

### Check your understanding

4) Factor 2, x, start superscript, 2, end superscript, minus, 3, x, minus, 4, x, plus, 6.

The factored form is left parenthesis, 2, x, minus, 3, right parenthesis, left parenthesis, x, minus, 2, right parenthesis.
5) Factor 3, x, start superscript, 2, end superscript, plus, 3, x, minus, 10, x, minus, 10.

The factored form is left parenthesis, x, plus, 1, right parenthesis, left parenthesis, 3, x, minus, 10, right parenthesis.
6) Factor 3, x, start superscript, 2, end superscript, plus, 6, x, minus, x, minus, 2.

\begin{aligned}&\phantom{=}3x^2+6x-x-2\\\\ &=(3x^2+6x)+(-x-2)&&\small{\gray{\text{Group terms}}}\\ \\ &=3x({x+2})+(-1)({x+2})&&\small{\gray{\text{Factor out GCFs}}}\\ \\ &=3x({x+2})-1({x+2})&&\small{\gray{\text{Simplify}}}\\ \\ &=3x(\goldD{x+2})-1(\goldD{x+2})&&\small{\gray{\text{Common factor!}}}\\\\ &=(\goldD{x+2})(3x-1)&&\small{\gray{\text{Factor out } x+2}} \end{aligned}
The factored form is left parenthesis, x, plus, 2, right parenthesis, left parenthesis, 3, x, minus, 1, right parenthesis.

## Challenge problem

7*) Factor 2, x, start superscript, 3, end superscript, plus, 10, x, start superscript, 2, end superscript, plus, 3, x, plus, 15.

The factored form is left parenthesis, x, plus, 5, right parenthesis, left parenthesis, 2, x, start superscript, 2, end superscript, plus, 3, right parenthesis.

### When can we use the grouping method?

The grouping method can be used to factor polynomials whenever a common factor exists between the groupings.
For example, we can use the grouping method to factor 3, x, start superscript, 2, end superscript, plus, 9, x, plus, 2, x, plus, 6 since it can be written as follows:
\begin{aligned}(3x^2+9x)+(2x+6)&=3x(\goldD{x+3})+2(\goldD{x+3})\\ \end{aligned}
We cannot, however, use the grouping method to factor 2, x, start superscript, 2, end superscript, plus, 3, x, plus, 4, x, plus, 12 because factoring out the GCF from both groupings does not yield a common factor!
\begin{aligned}(2x^2+3x)+(4x+12)&=x(\goldD{2x+3})+4(\purpleC{x+3})\\ \end{aligned}

#### Using grouping to factor trinomials

You can also use grouping to factor certain three termed quadratics (i.e. trinomials) like 2, x, start superscript, 2, end superscript, plus, 7, x, plus, 3. This is because we can rewrite the expression as follows:
2, x, start superscript, 2, end superscript, plus, start color blueD, 7, end color blueD, x, plus, 3, equals, 2, x, start superscript, 2, end superscript, plus, start color blueD, 1, end color blueD, x, plus, start color blueD, 6, end color blueD, x, plus, 3
Then we can use grouping to factor 2, x, start superscript, 2, end superscript, plus, start color blueD, 1, end color blueD, x, plus, start color blueD, 6, end color blueD, x, plus, 3 as left parenthesis, x, plus, 3, right parenthesis, left parenthesis, 2, x, plus, 1, right parenthesis.
For more on factoring quadratic trinomials like these using the grouping method, check out our next article.