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 is the distributive property run backward. To factor 6x+96x + 9 you spot the common factor 33 and write 3(2x+3)3(2x + 3). In x2(x+2)+3(x+2)x^2(x + 2) + 3(x + 2), both terms carry the binomial x+2x + 2, the way 6x6x and 99 both carried 33, so it factors out the same way. For a four-term polynomial, split it into two pairs and factor the greatest common factor out of each pair. If both pairs leave the same binomial, factor that binomial out.

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

Factor each pair on its own. The first two terms share x2x^2, and the last two share 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 carry x+2x + 2, so 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 factor x2+3x^2 + 3 does not factor further with integer coefficients, so this is the complete factorization.

Other pairings can work too. Grouping the first and third terms with the second and fourth leaves the matching binomial x2+3x^2 + 3 and gives the same answer.

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
For positive x, both rectangles have width x plus 2. Stack their heights x squared and 3 to make one rectangle with area (x squared plus 3)(x plus 2). The algebra works for every real x.

Why a shared binomial factors out#

At x=4x = 4, the binomial x+2x + 2 is the number 66, so x2(x+2)+3(x+2)x^2(x + 2) + 3(x + 2) is 16⋅6+3⋅6=96+18=11416 \cdot 6 + 3 \cdot 6 = 96 + 18 = 114. Pulling out the common 66 gives (16+3)⋅6=114(16 + 3) \cdot 6 = 114, which is (x2+3)(x+2)(x^2 + 3)(x + 2) at x=4x = 4. That step is the distributive property, ak+bk=(a+b)kak + bk = (a + b)k for any numbers aa, bb, and kk. The same step works for any other value of xx: the values of x2x^2 and x+2x + 2 are numbers, so x2x^2 plays aa, 33 plays bb, and x+2x + 2 plays kk, and the two expressions agree for every xx. Grouping just rewrites the polynomial so you can see the shared binomial, and then the distributive property lets you factor it out.

Watch the sign in the second group

Sometimes the binomials left by the two pairs are opposites, such as x−2x-2 and 2−x2-x. Since 2−x=−(x−2)2 - x = -(x - 2), factoring a negative out of one pair turns its binomial into the other.

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

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

The second pair shares 33, but factoring out +3+3 gives 3(2−x)3(2 - x), and 2−x2 - x does not match x−2x - 2. Factor out −3-3 instead:

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

Check your understanding

Factor x3−4x2−2x+8x^3 - 4x^2 - 2x + 8 by grouping.

Answer choices

Reordering, and when grouping fails

If the first pairing gives no shared binomial, try a different pairing. Writing the terms in descending order of degree often makes a useful pair easier to see.

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. In descending order the polynomial is x3+2x2+3x+6x^3 + 2x^2 + 3x + 6, and the neighboring pairs now group 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).

Check your understanding

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

Answer choices

Some four-term polynomials do not factor by this two-pair method. 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)

So this two-pair method stops here. That does not prove that no other factoring method could work.

The AC method: grouping the harder trinomials

In the previous chapter, you factored trinomials such as 2x2+7x+32x^2+7x+3 by checking possible binomial products, and met the clue now called the AC method: find two numbers with product acac and sum bb. Now you can use that clue with grouping: split bxbx using those numbers, then group the four terms.

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 becomes the +1+1 in 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. To see why that pair fits, multiply out the factorization and look at 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 3⋅2x3 \cdot 2x and xx is x⋅1x \cdot 1. Collecting them gives the middle term: the terms add to 7x7x, so their coefficients, 66 and 11, add to b=7b = 7. The product of those coefficients is 6⋅1=(3⋅2)(1⋅1)6 \cdot 1 = (3 \cdot 2)(1 \cdot 1), while a⋅c=(1⋅2)(3⋅1)a \cdot c = (1 \cdot 2)(3 \cdot 1), because aa is the product of the binomials’ xx-coefficients and cc the product of their constants. Both use the same four numbers, 11, 22, 33, 11, grouped differently, so the products match. The same regrouping works for any four coefficients, as the previous chapter showed with letters. So any binomial factorization supplies a pair with sum bb and product acac.

The method needs the reverse direction too: finding such a pair must give a factorization. First allow fractions in the same example:

2x2+6x+x+3=x(2x+6)+12(2x+6)=(2x+6)(x+12).\begin{aligned} &2x^2+6x+x+3\\ &\quad=x(2x+6)+\tfrac12(2x+6)\\ &\quad=(2x+6)(x+\tfrac12). \end{aligned}

The second pair works because 12(2x+6)=x+3\tfrac12(2x+6)=x+3. To return to integer coefficients, move the 22 out of 2x+62x+6 and into the other factor:

(2x+6)(x+12)=(x+3)(2(x+12))=(x+3)(2x+1).\begin{aligned} (2x+6)(x+\tfrac12)&=(x+3)\bigl(2(x+\tfrac12)\bigr)\\ &=(x+3)(2x+1). \end{aligned}

The same grouping works with letters. Suppose a≠0a\ne0, r+s=br+s=b, and rs=acrs=ac. Then c=rs/ac=rs/a, so

ax2+bx+c=ax2+rx+sx+rsa=x(ax+r)+sa(ax+r)=(ax+r)(x+sa).\begin{aligned} ax^2+bx+c &= ax^2+rx+sx+\frac{rs}{a} \\ &= x(ax+r)+\frac{s}{a}(ax+r) \\ &= (ax+r)\left(x+\frac{s}{a}\right). \end{aligned}

Both pairs leave ax+rax+r, just as both numerical pairs left 2x+62x+6. This also explains why integer greatest common factors work. If c=0c=0, simply factor out xx: ax2+bx=x(ax+b)ax^2+bx=x(ax+b). Otherwise sx+c=(s/a)(ax+r)sx+c=(s/a)(ax+r), so the coefficient pairs (s,c)(s, c) and (a,r)(a, r) are proportional. Removing each pair’s greatest common factor reduces both to the same ratio in lowest terms; with signs chosen to match, both pairs leave the same binomial.

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. Taking out +1+1 from the second pair would leave −2x−3-2x-3, the opposite of 2x+32x+3, so take out −1-1 instead:

(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. Writing the split as −2x+9x-2x + 9x instead 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. Pulling it out first shrinks the numbers 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 first:

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

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). That is correct but not complete, since 4x2+64x^2 + 6 still hides a factor of 22. Pull the common factor out first, or check for one at the end.

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)

If subtraction means taking objects away, what should 3−53-5 mean? You cannot take five objects from a pile of three. Yet algebra uses negative results without stopping at that boundary. In the early nineteenth century, mathematicians were still working out how to justify that extension.

George Peacock, an English mathematician, examined that question in his 18301830 Treatise on Algebra. He pointed out a tension: algebra borrowed the names and signs of arithmetic, then used them beyond their original meanings. If a letter could stand for any quantity, a−ba-b might ask to subtract a larger quantity from a smaller one, and merely writing letters did not explain why that new use should obey the old rules.

Peacock distinguished arithmetical algebra, tied to those original meanings, from symbolical algebra, whose operations followed stated laws. Arithmetic suggested the laws but did not set their limits, and his work helped turn the rules themselves into something mathematicians studied and justified. Grouping uses one such law, the distributive property, with a whole binomial where a single number might have appeared. Peacock did not invent grouping; his question was why algebra’s rules remained valid as the meanings of its symbols widened.

Your progress

See all your progress →