This site is a work in progress. New lessons are added regularly. Contact us

Factoring by Grouping

Learning goals

  • Split four terms into pairs and factor each
  • Pull out the shared binomial that both pairs leave
  • Factor out a negative when the second pair leads with one
  • Reorder the terms when the first pairing stalls
  • Run the AC method to group a harder trinomial

Grouping a four-term polynomial

Factoring has always been the distributive property run backward. To factor 6x+96x + 9 you spot the common factor 33 and write 3(2x+3)3(2x + 3). The rule ka+kb=k(a+b)ka + kb = k(a + b) does the work, and it never cared what kk stood for. If kk happens to be a whole binomial like x+2x + 2 instead of a number, the rule still holds. That single fact is the engine of the whole lesson.

Why a shared binomial factors out#

The distributive property ka+kb=k(a+b)ka + kb = k(a + b) holds for any expressions kk, aa, and bb, not just for numbers. Let the common factor kk be the binomial x+2x + 2, and let aa and bb be whatever multiplies it in each term. Then

a(x+2)+b(x+2)=(x+2)a+(x+2)b=(x+2)(a+b).a(x + 2) + b(x + 2) = (x + 2)a + (x + 2)b = (x + 2)(a + b).

Read from left to right, two terms that both carry the factor x+2x + 2 collapse into x+2x + 2 times the sum of what was left beside it. A binomial common factor pulls out in front of a sum exactly the way a numerical one does. Factoring by grouping is nothing more than rewriting a polynomial so that a shared binomial like this becomes visible, after which the distributive property finishes the job.

For a four-term polynomial the plan follows directly: split it into two pairs, and factor the greatest common factor out of each pair. Then check whether the two pairs leave behind the same binomial. If they do, factor that binomial out.

Worked example 1 Factor x3+2x2+3x+6x^3 + 2x^2 + 3x + 6

Split the polynomial into the first two terms and the last two terms, then factor each pair on its own. The first pair shares x2x^2, and the second pair shares 33:

x3+2x2+3x+6=(x3+2x2)+(3x+6)=x2(x+2)+3(x+2).x^3 + 2x^2 + 3x + 6 = (x^3 + 2x^2) + (3x + 6) = x^2(x + 2) + 3(x + 2).

Both pieces now carry the same binomial x+2x + 2. By the rule just proved, factor it out:

x2(x+2)+3(x+2)=(x+2)(x2+3).x^2(x + 2) + 3(x + 2) = (x + 2)(x^2 + 3).

Check by expanding: (x+2)(x2+3)=x3+3x+2x2+6=x3+2x2+3x+6(x + 2)(x^2 + 3) = x^3 + 3x + 2x^2 + 6 = x^3 + 2x^2 + 3x + 6, the original polynomial. The remaining factor x2+3x^2 + 3 is a sum that stays positive for every real xx, so it does not factor over the real numbers. That makes (x+2)(x2+3)(x + 2)(x^2 + 3) the complete factorization.

The pairing is not the only route. Grouping the first and third terms and the second and fourth terms works just as well, since x3+3x=x(x2+3)x^3 + 3x = x(x^2 + 3) and 2x2+6=2(x2+3)2x^2 + 6 = 2(x^2 + 3) share the same binomial:

(x3+3x)+(2x2+6)=x(x2+3)+2(x2+3)=(x2+3)(x+2).(x^3 + 3x) + (2x^2 + 6) = x(x^2 + 3) + 2(x^2 + 3) = (x^2 + 3)(x + 2).

Any pairing that leaves matching binomials leads to the same answer.

Watch the sign in the second group

The single most common grouping error is a sign slip in the second pair. When that pair leads with a negative term, factoring out the plain positive GCF leaves a binomial with its signs flipped, and the two pieces no longer match. The fix is to factor out a negative on purpose.

Worked example 2 Factor x32x23x+6x^3 - 2x^2 - 3x + 6

Group the first two and last two terms. The first pair gives x2(x2)x^2(x - 2) with no trouble:

x32x23x+6=(x32x2)+(3x+6).x^3 - 2x^2 - 3x + 6 = (x^3 - 2x^2) + (-3x + 6).

Now look hard at the second pair, 3x+6-3x + 6. Its terms share 33, but factoring out +3+3 gives 3(x+2)=3(2x)3(-x + 2) = 3(2 - x), whose binomial 2x2 - x does not match the x2x - 2 from the first pair. Factor out 3-3 instead, so the binomial comes out as x2x - 2:

3x+6=3(x2).-3x + 6 = -3(x - 2).

With both pairs carrying x2x - 2, the shared binomial factors out:

x2(x2)3(x2)=(x2)(x23).x^2(x - 2) - 3(x - 2) = (x - 2)(x^2 - 3).

Check: (x2)(x23)=x33x2x2+6=x32x23x+6(x - 2)(x^2 - 3) = x^3 - 3x - 2x^2 + 6 = x^3 - 2x^2 - 3x + 6. The factor x23x^2 - 3 has no factorization with integer coefficients, because a difference of squares needs a perfect square and 33 is not one. So this is as far as grouping takes it. The rule to remember: when the second pair starts with a negative, factor a negative out so its binomial matches the first pair.

Check your understanding

Factor x34x22x+8x^3 - 4x^2 - 2x + 8 by grouping.

Answer choices

Reordering, and when grouping fails

The first pairing you write down is not sacred. If the two pairs do not leave the same binomial, reorder the terms and try again, or pair them differently. Putting the polynomial in descending order by degree is almost always the first thing to try.

Worked example 3 Reorder before grouping

Take x3+6+2x2+3xx^3 + 6 + 2x^2 + 3x, with its terms out of the usual order. Pairing them as they stand gives

(x3+6)+(2x2+3x)=(x3+6)+x(2x+3),(x^3 + 6) + (2x^2 + 3x) = (x^3 + 6) + x(2x + 3),

and this stalls: x3+6x^3 + 6 has no common factor beyond 11, so no shared binomial can appear. Rewrite the polynomial in descending order first:

x3+6+2x2+3x=x3+2x2+3x+6.x^3 + 6 + 2x^2 + 3x = x^3 + 2x^2 + 3x + 6.

Now the neighboring pairs cooperate, exactly as in Worked Example 1:

(x3+2x2)+(3x+6)=x2(x+2)+3(x+2)=(x+2)(x2+3).(x^3 + 2x^2) + (3x + 6) = x^2(x + 2) + 3(x + 2) = (x + 2)(x^2 + 3).

A grouping that stalls is often just a signal to reorder the terms, not a dead end.

Some four-term polynomials genuinely do not group, and it is worth being able to recognize one. Consider x3+x2+2x+6x^3 + x^2 + 2x + 6. Pairing the first two and last two terms gives x2(x+1)+2(x+3)x^2(x + 1) + 2(x + 3), and the binomials x+1x + 1 and x+3x + 3 are different. Every other pairing runs into the same wall: (x3+2x)+(x2+6)(x^3 + 2x) + (x^2 + 6) leaves x(x2+2)x(x^2 + 2) beside a group with no common factor, and (x3+6)+(x2+2x)(x^3 + 6) + (x^2 + 2x) does the same. No ordering makes the pairs share a binomial, so this polynomial does not factor by grouping. That is information, not a personal failure. Grouping factors a four-term polynomial precisely when some pairing leaves a shared binomial, and it reports nothing useful when none does.

The AC method: grouping the harder trinomials

In the last chapter you factored a non-monic trinomial such as 2x2+7x+32x^2 + 7x + 3 by reverse FOIL. That method asks you to choose factor pairs, build a candidate, expand to check the middle term, and adjust until it fits. You also met the clue that steers the search, that the middle coefficient splits into two numbers whose product is aca \cdot c and whose sum is bb. Grouping turns that clue into a method that never guesses. Split the middle term into those two pieces, and the trinomial becomes a four-term polynomial you already know how to group.

Why the split with product acac and sum bb lets you group#

Suppose ax2+bx+cax^2 + bx + c factors as (px+r)(qx+s)(px + r)(qx + s). Expanding once shows how each coefficient is built:

(px+r)(qx+s)=pqx2+(ps+qr)x+rs,(px + r)(qx + s) = pq\,x^2 + (ps + qr)\,x + rs,

so a=pqa = pq,  b=ps+qr\ b = ps + qr, and c=rsc = rs. Focus on the two cross products psps and qrqr. They add up to the middle coefficient, ps+qr=bps + qr = b, and they multiply to

(ps)(qr)=(pq)(rs)=ac.(ps)(qr) = (pq)(rs) = a \cdot c.

So the two numbers you are hunting for, call them m=psm = ps and n=qrn = qr, form a pair with product aca \cdot c and sum bb. Writing the middle term as bx=mx+nxbx = mx + nx turns ax2+bx+cax^2 + bx + c into the four terms ax2+mx+nx+cax^2 + mx + nx + c, whose first pair and second pair are built to share a binomial. Grouping those four terms rebuilds (px+r)(qx+s)(px + r)(qx + s). Finding the pair with product aca \cdot c and sum bb is the same sum-and-product search as before; grouping just carries it the rest of the way to the factors.

Worked example 4 Factor 2x2+7x+32x^2 + 7x + 3 by grouping

Here a=2a = 2, b=7b = 7, and c=3c = 3, so the product to aim for is ac=23=6a \cdot c = 2 \cdot 3 = 6. Find two numbers with product 66 and sum 77, namely 66 and 11. Split the middle term 7x7x into 6x+1x6x + 1x:

2x2+7x+3=2x2+6x+x+3.2x^2 + 7x + 3 = 2x^2 + 6x + x + 3.

Now group the four terms and factor each pair:

(2x2+6x)+(x+3)=2x(x+3)+1(x+3)=(x+3)(2x+1).(2x^2 + 6x) + (x + 3) = 2x(x + 3) + 1(x + 3) = (x + 3)(2x + 1).

Keep the 11 in front of the second x+3x + 3: it is the coefficient that becomes the 2x+12x + 1. Check by expanding: (x+3)(2x+1)=2x2+x+6x+3=2x2+7x+3(x + 3)(2x + 1) = 2x^2 + x + 6x + 3 = 2x^2 + 7x + 3. This is the same factorization reverse FOIL produced last chapter, reached here without trying a single arrangement.

Worked example 5 A negative constant, factor 6x2+7x36x^2 + 7x - 3

Now a=6a = 6, b=7b = 7, and c=3c = -3, so ac=6(3)=18a \cdot c = 6 \cdot (-3) = -18. Two numbers with product 18-18 and sum 77 must have opposite signs, and 99 and 2-2 fit, since 9+(2)=79 + (-2) = 7 and 9(2)=189 \cdot (-2) = -18. Split 7x7x into 9x2x9x - 2x:

6x2+7x3=6x2+9x2x3.6x^2 + 7x - 3 = 6x^2 + 9x - 2x - 3.

Group, and mind the sign in the second pair. Its leading term 2x-2x is negative, so factor out 1-1:

(6x2+9x)+(2x3)=3x(2x+3)1(2x+3)=(2x+3)(3x1).(6x^2 + 9x) + (-2x - 3) = 3x(2x + 3) - 1(2x + 3) = (2x + 3)(3x - 1).

Check: (2x+3)(3x1)=6x22x+9x3=6x2+7x3(2x + 3)(3x - 1) = 6x^2 - 2x + 9x - 3 = 6x^2 + 7x - 3. The order of the split does not matter; writing 6x22x+9x36x^2 - 2x + 9x - 3 instead groups to 2x(3x1)+3(3x1)=(3x1)(2x+3)2x(3x - 1) + 3(3x - 1) = (3x - 1)(2x + 3), the same factors. In the previous chapter this trinomial was factored by reverse-FOIL trial, and grouping reaches the identical answer straight down the middle.

Check your understanding

For 3x2+10x+83x^2 + 10x + 8, which split of the middle term 10x10x sets up a working grouping?

Answer choices

Pull out a common factor first

Before splitting a middle term or pairing anything up, check whether every term shares a common factor. If so, pull it out in front. It shrinks the numbers you have to work with and keeps the final answer completely factored.

Worked example 6 Factor 4x3+8x2+6x+124x^3 + 8x^2 + 6x + 12 completely

Every coefficient is even, so factor out 22 before doing anything else:

4x3+8x2+6x+12=2(2x3+4x2+3x+6).4x^3 + 8x^2 + 6x + 12 = 2(2x^3 + 4x^2 + 3x + 6).

Now group inside the parentheses. The first pair shares 2x22x^2 and the second shares 33:

2x3+4x2+3x+6=(2x3+4x2)+(3x+6)=2x2(x+2)+3(x+2)=(x+2)(2x2+3).\begin{aligned} 2x^3 + 4x^2 + 3x + 6 &= (2x^3 + 4x^2) + (3x + 6) \\ &= 2x^2(x + 2) + 3(x + 2) = (x + 2)(2x^2 + 3). \end{aligned}

Carry the 22 back out front for the complete factorization:

4x3+8x2+6x+12=2(x+2)(2x2+3).4x^3 + 8x^2 + 6x + 12 = 2(x + 2)(2x^2 + 3).

Skipping the common factor and grouping the original directly gives 4x2(x+2)+6(x+2)=(x+2)(4x2+6)4x^2(x + 2) + 6(x + 2) = (x + 2)(4x^2 + 6). The result (x+2)(4x2+6)(x + 2)(4x^2 + 6) is a correct factorization but not a complete one, since 4x2+64x^2 + 6 still hides a factor of 22. Pulling the common factor out first, or at the very end, makes sure nothing is left behind.

Check your understanding

Factor 12x2+10x1212x^2 + 10x - 12 completely.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

You did something in this lesson that you were never quite allowed to do. The rule for pulling out a common factor was proved about numbers. Then you let the common factor be a whole binomial, and pulled it out anyway.

For most of algebra’s history that move looked shaky. A symbol was shorthand for a quantity, and a quantity meant a number. So a rule about numbers seemed to say nothing about a bracket. Everyone used the shortcut all the same. Nobody could say why it was allowed.

George Peacock, an English scholar, met the question head on. His book of 18301830 gave the answer. The answer had a heavy name and a light meaning. Once a rule of arithmetic is settled for numbers, it carries over unchanged to symbols. It does not matter what those symbols later stand for. Algebra on this view is not arithmetic with letters filling in for missing numbers. It is a body of rules that plain arithmetic happens to obey.

That sounds like word games until you group a polynomial. Factoring x+2x + 2 out of x2(x+2)+3(x+2)x^2(x + 2) + 3(x + 2) treats a binomial exactly as though it were a number. The distributive rule never asked what its parts were. Peacock’s ruling is what allows the step. Later mathematics leaned on it hard. It handed the same rules to objects that are not numbers at all.