Factoring by Grouping

Learning goals

  • Split four terms into pairs and factor each
  • Pull out the shared binomial that both pairs leave
  • Factor a negative out of a pair whose leftover binomial is the opposite of the other pair's
  • 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). Now look at x2(x+2)+3(x+2)x^2(x + 2) + 3(x + 2): both terms carry the same binomial, x+2x + 2, the way 6x6x and 99 both carried 33. Treat x+2x + 2 as the common factor and pull it out the same way:

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

The rule behind both moves is ka+kb=k(a+b)ka + kb = k(a + b), and it never cared whether kk was a number or a whole binomial. That single fact, that a binomial can be a common factor just like a number, is the engine of the whole lesson.

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, the pattern from the opening. Factor it out the same way:

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 factor x2+3x^2 + 3 does not factor further with integer coefficients, so (x+2)(x2+3)(x + 2)(x^2 + 3) is the complete factorization.

This is not the only pairing that works. Grouping the first and third terms with the second and fourth also leaves a matching binomial, x2+3x^2 + 3, and factors to the same answer. Any pairing that leaves matching binomials leads to the same result.

Area model for factoring x cubed plus 2x squared plus 3x plus 6 by groupingTwo stacked rectangles share the same width x plus 2: one of height x squared and area x squared times x plus 2, and one of height 3 and area 3 times x plus 2, together forming a rectangle of area the quantity x squared plus 3 times x plus 2.x²(x + 2)3(x + 2)x²3x + 2
Grouping seen as area: both pieces of x cubed plus 2x squared plus 3x plus 6 share the same width, x plus 2, so stacking them makes one rectangle of area (x squared plus 3)(x plus 2).

Why a shared binomial factors out#

This is the same rule from the opening, ka+kb=k(a+b)ka + kb = k(a + b), applied with k=x+2k = x + 2 as Worked Example 1 just did. Factoring by grouping is nothing more than rewriting a polynomial so that a shared binomial like this becomes visible; that rule does the rest.

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 x3−2x2−3x+6x^3 - 2x^2 - 3x + 6

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

x3−2x2−3x+6=(x3−2x2)+(−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(2−x)3(-x + 2) = 3(2 - x), whose binomial 2−x2 - x does not match the x−2x - 2 from the first pair. Factor out −3-3 instead, so the binomial comes out as x−2x - 2:

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

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

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

Check: (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 factor x2−3x^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: if a pair’s leftover binomial is the opposite of the other pair’s, like 2−x2 - x is the opposite of x−2x - 2, factor a negative out of that pair so the two binomials match.

Check your understanding

Factor x3−4x2−2x+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.

Check your understanding

Factor 3x3+28+7x2+12x3x^3 + 28 + 7x^2 + 12x completely by grouping.

Answer choices

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. There are only three ways to split four terms into two pairs, and none of them leaves a shared binomial:

PairingFirst pair factors asSecond pair factors as
1st & 2nd, 3rd & 4thx2(x+1)x^2(x + 1)2(x+3)2(x + 3)
1st & 3rd, 2nd & 4thx(x2+2)x(x^2 + 2)no common factor beyond 11
1st & 4th, 2nd & 3rdno common factor beyond 11x(x+2)x(x + 2)

No pairing leaves matching binomials, so this polynomial does not factor by grouping, and that is a fact about the polynomial, not a mistake in your work. Grouping factors a four-term polynomial precisely when some pairing leaves a shared binomial.

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 a⋅ca \cdot c and whose sum is bb. Grouping turns that clue into a targeted search: hunt for the two numbers that satisfy both conditions at once, split the middle term into those two pieces, and the trinomial becomes a four-term polynomial you already know how to group.

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 a⋅c=2⋅3=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.

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

Worked Example 4 split 7x7x into 6x+x6x + x because 66 and 11 multiply to a⋅c=6a \cdot c = 6 and add to b=7b = 7. That match is not luck. 2x2+7x+32x^2 + 7x + 3 factors as (x+3)(2x+1)(x + 3)(2x + 1), and multiplying those two binomials back out shows exactly where 6x6x and xx come from:

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

6x6x is the 33 from the first binomial times the 2x2x from the second, and xx is the xx from the first binomial times the 11 from the second. Adding those two pieces is exactly what collecting terms after multiplying out does, so of course they add to the middle term, 7x7x.

Multiplying the two pieces’ coefficients, 6⋅1=66 \cdot 1 = 6, also equals a⋅ca \cdot c. The trinomial’s a=2a = 2 is itself the product of the binomials’ two xx-coefficients, 11 and 22, and c=3c = 3 is the product of their two constants, 33 and 11. So a⋅c=(1⋅2)(3⋅1)a \cdot c = (1 \cdot 2)(3 \cdot 1), the same four numbers, 11, 22, 33, 11, as 6⋅1=(3⋅2)(1⋅1)6 \cdot 1 = (3 \cdot 2)(1 \cdot 1), just grouped differently, and multiplication does not care how numbers are grouped, so the two products match.

This is not special to 2x2+7x+32x^2 + 7x + 3: whenever a trinomial factors into two binomials at all, expanding them the same way always builds the middle term from two pieces made this same way, so they always add to bb and multiply to a⋅ca \cdot c. That is exactly why the search for a pair with product a⋅ca \cdot c and sum bb works, and why splitting the middle term with that pair and grouping always rebuilds the factored form.

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

Now a=6a = 6, b=7b = 7, and c=−3c = -3, so a⋅c=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 9x−2x9x - 2x:

6x2+7x−3=6x2+9x−2x−3.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)+(−2x−3)=3x(2x+3)−1(2x+3)=(2x+3)(3x−1).(6x^2 + 9x) + (-2x - 3) = 3x(2x + 3) - 1(2x + 3) = (2x + 3)(3x - 1).

Check: (2x+3)(3x−1)=6x2−2x+9x−3=6x2+7x−3(2x + 3)(3x - 1) = 6x^2 - 2x + 9x - 3 = 6x^2 + 7x - 3. The order of the split does not matter: writing the two pieces as −2x+9x-2x + 9x instead still groups to the same factors.

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+10x−1212x^2 + 10x - 12 completely.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

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

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems 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 took mathematicians a long time to state plainly: pulling a whole binomial out of a sum, the same way you would pull out a number. The proof earlier in this lesson, that ka+kb=k(a+b)ka + kb = k(a + b) holds for any expressions kk, aa, and bb, not just numbers, is exactly what allows that move. For most of algebra’s history, though, that move rested more on habit than on a stated principle. A symbol was shorthand for a quantity, and a quantity meant a number, so a rule proved about numbers seemed to say nothing about a bracket. Mathematicians used the shortcut anyway, well before the general principle behind it was written down.

George Peacock, an English scholar, gave that principle an influential statement in a book of 18301830, as part of a broader move toward treating algebra as its own system of symbols rather than arithmetic in disguise. His idea: a rule of arithmetic, once settled for numbers, carries over to symbols, whatever those symbols go on to stand for, as long as the new system’s operations still obey that same rule, not merely that the operations are defined for it. Algebra on this view is not just arithmetic with letters filling in for missing numbers. It is a body of rules that plain arithmetic happens to obey.

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 way the proof above allows. Peacock’s principle is part of how mathematicians came to state clearly why that kind of move is safe, not merely convenient. Later mathematics leaned on the same idea hard: it handed the same rules to objects that are not numbers at all.