If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

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, squared, 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 2, x, squared, plus, 8, x, plus, 3, x, plus, 12

First, notice that there is no factor common to all terms in 2, x, squared, 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:
start underbrace, left parenthesis, 2, x, squared, plus, 8, x, right parenthesis, end underbrace, start subscript, start text, f, i, r, s, t, space, g, r, o, u, p, i, n, g, end text, end subscript, plus, start underbrace, left parenthesis, 3, x, plus, 12, right parenthesis, end underbrace, start subscript, start text, s, e, c, o, n, d, space, g, r, o, u, p, i, n, g, end text, end subscript
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
Notice that this reveals yet another common factor between the two terms: start color #a75a05, x, plus, 4, end color #a75a05. We can use the distributive property to factor out this common factor.
2, x, left parenthesis, start color #a75a05, x, plus, 4, end color #a75a05, right parenthesis, plus, 3, left parenthesis, start color #a75a05, x, plus, 4, end color #a75a05, right parenthesis, equals, left parenthesis, start color #a75a05, x, plus, 4, end color #a75a05, right parenthesis, left parenthesis, 2, x, plus, 3, right parenthesis
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.

Example 2: Factoring 3, x, squared, plus, 6, x, plus, 4, x, plus, 8

Let's summarize what was done above by factoring another polynomial.
=3x2+6x+4x+8=(3x2+6x)+(4x+8)Group terms=3x(x+2)+4(x+2)Factor out GCFs=3x(x+2)+4(x+2)Common factor!=(x+2)(3x+4)Factor out x+2\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, squared, plus, 6, x, plus, 12, x, plus, 8.
Choose 1 answer:

2) Factor 5, x, squared, plus, 10, x, plus, 2, x, plus, 4.

3) Factor 8, x, squared, plus, 6, x, plus, 4, x, plus, 3.

Example 3: Factoring 3, x, squared, 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, squared, minus, 6, x, minus, 4, x, plus, 8.
0=3x26x4x+8(1)=(3x26x)+(4x+8)Group terms(2)=3x(x2)+(4)(x2)Factor out GCFs(3)=3x(x2)4(x2)Simplify(4)=3x(x2)4(x2)Common factor!(5)=(x2)(3x4)Factor out x2\begin{aligned}\phantom{0}&&&\phantom{=}3x^2-6x-4x+8\\\\ \small{\blueD{(1)}}&&&=(3x^2-6x)+(-4x+8)&&\small{\gray{\text{Group terms}}}\\\\ \small{\blueD{(2)}}&&&=3x(x-2)+(-4)(x-2)&&\small{\gray{\text{Factor out GCFs}}}\\\\ \small{\blueD{(3)}}&&&=3x(x-2)-4(x-2)&&\small{\gray{\text{Simplify}}}\\\\ \small{\blueD{(4)}}&&&=3x(\goldD{x-2})-4(\goldD{x-2})&&\small{\gray{\text{Common factor!}}}\\\\ \small{\blueD{(5)}}&&&=(\goldD{x-2})(3x-4)&&\small{\gray{\text{Factor out $x-2$}}}\\\\ \end{aligned}
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.
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 #11accd, left parenthesis, 1, right parenthesis, end color #11accd, a "+" sign was added between the groupings left parenthesis, 3, x, squared, 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, squared, minus, 6, x, minus, 4, x, plus, 8 as left parenthesis, 3, x, squared, minus, 6, x, right parenthesis, minus, left parenthesis, 4, x, plus, 8, right parenthesis. This grouping, however, simplifies to 3, x, squared, minus, 6, x, minus, 4, x, start color #ca337c, minus, 8, end color #ca337c, which is not the same as the original expression.
Why factor out minus, 4 instead of 4?
In step start color #11accd, left parenthesis, 2, right parenthesis, end color #11accd, 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:
(3x26x)+(4x+8)=3x(x2)+4(x+2)\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, squared, minus, 3, x, minus, 4, x, plus, 6.
Choose 1 answer:

5) Factor 3, x, squared, plus, 3, x, minus, 10, x, minus, 10.

6) Factor 3, x, squared, plus, 6, x, minus, x, minus, 2.

Challenge problem

7*) Factor 2, x, cubed, plus, 10, x, squared, plus, 3, x, plus, 15.

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, squared, plus, 9, x, plus, 2, x, plus, 6 since it can be written as follows:
(3x2+9x)+(2x+6)=3x(x+3)+2(x+3)\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, squared, plus, 3, x, plus, 4, x, plus, 12 because factoring out the GCF from both groupings does not yield a common factor!
(2x2+3x)+(4x+12)=x(2x+3)+4(x+3)\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, squared, plus, 7, x, plus, 3. This is because we can rewrite the expression as follows:
2, x, squared, plus, start color #11accd, 7, end color #11accd, x, plus, 3, equals, 2, x, squared, plus, start color #11accd, 1, end color #11accd, x, plus, start color #11accd, 6, end color #11accd, x, plus, 3
Then we can use grouping to factor 2, x, squared, plus, start color #11accd, 1, end color #11accd, x, plus, start color #11accd, 6, end color #11accd, 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.

Want to join the conversation?