A four-term polynomial usually can’t be factored with a single greatest-common-factor step, since no one factor typically divides all four terms. Factoring by grouping solves this by splitting the four terms into two pairs, factoring each pair’s own greatest common factor separately, and checking whether the two resulting binomials happen to match — which, when they do, means one more factoring step finishes the job.
What Is Factoring by Grouping?
$$ ax + ay + bx + by $$
Split into two pairs, factor the GCF out of each pair, and compare what’s left inside the parentheses:
$$ (ax+ay) + (bx+by) = a(x+y) + b(x+y) $$
Both pairs left behind the identical binomial \((x+y)\), which means it can now be factored out one more time, exactly the way a monomial GCF would be:
$$ a(x+y) + b(x+y) = (x+y)(a+b) $$
Grouping a Four-Term Polynomial
$$ x^{3} + 3x^{2} + 4x + 12 $$
Step 1 — split into two pairs and factor the GCF out of each:
$$ (x^{3}+3x^{2}) + (4x+12) = x^{2}(x+3) + 4(x+3) $$
Step 2 — both pairs produced the same binomial, \((x+3)\); factor it out:
$$ x^{2}(x+3) + 4(x+3) = (x+3)(x^{2}+4) $$
Rearranging Terms When the First Grouping Doesn’t Work
Occasionally the terms as written don’t group into matching binomials on the first attempt. Reordering the four terms — most commonly swapping the middle two — often reveals a pairing that does work.
$$ x^{3} + 4x + 3x^{2} + 12 $$
Grouped in this order, \((x^{3}+4x)\) and \((3x^{2}+12)\) factor to \(x(x^{2}+4)\) and \(3(x^{2}+4)\) — a matching binomial appears only after rearranging the middle two terms into the order used in the previous section. Since addition can be reordered freely, this rearrangement never changes the polynomial’s value, only which terms sit next to each other.
Using Grouping to Factor a Trinomial: The AC Method
A trinomial \(ax^{2}+bx+c\) with a leading coefficient other than \(1\) can be factored by grouping too, once its middle term is deliberately split into two pieces.
- Multiply \(a\) and \(c\).
- Find two numbers that multiply to \(ac\) and add to \(b\).
- Rewrite the middle term \(bx\) as the sum of those two numbers’ terms, turning the trinomial into an equivalent four-term polynomial.
- Factor the resulting four-term polynomial by grouping, exactly as above.
$$ 2x^{2} + 7x + 3 \qquad ac = 2\cdot 3 = 6 $$
The two numbers that multiply to \(6\) and add to \(7\) are \(6\) and \(1\). Split the middle term using those numbers, then group:
$$ 2x^{2}+6x+x+3 = (2x^{2}+6x) + (x+3) = 2x(x+3) + 1(x+3) = (x+3)(2x+1) $$
Worked Example A: Grouping in the Order Given
Factor \(x^{3}+5x^{2}+2x+10\) by grouping.
Step 1 — factor the GCF out of each pair:
$$ (x^{3}+5x^{2}) + (2x+10) = x^{2}(x+5) + 2(x+5) $$
Step 2 — factor out the matching binomial:
$$ (x+5)(x^{2}+2) $$
Answer: \((x+5)(x^{2}+2)\)
Worked Example B: Grouping After Rearranging
Factor \(x^{3}+6x+2x^{2}+12\) by grouping, rearranging the terms first if needed.
Step 1 — the terms as given don’t group cleanly; rearrange to put the matching-degree terms together:
$$ x^{3}+2x^{2}+6x+12 $$
Step 2 — factor the GCF out of each pair:
$$ (x^{3}+2x^{2}) + (6x+12) = x^{2}(x+2) + 6(x+2) $$
Step 3 — factor out the matching binomial:
$$ (x+2)(x^{2}+6) $$
Answer: \((x+2)(x^{2}+6)\)
Worked Example C: The AC Method on a Trinomial
Factor \(3x^{2}+11x+6\) using the ac method.
Step 1 — compute \(ac\):
$$ ac = 3\cdot 6 = 18 $$
Step 2 — find two numbers that multiply to \(18\) and add to \(11\):
$$ 9 \text{ and } 2 \qquad (9\cdot 2 = 18, \quad 9+2=11) $$
Step 3 — split the middle term and group:
$$ 3x^{2}+9x+2x+6 = (3x^{2}+9x) + (2x+6) = 3x(x+3) + 2(x+3) $$
Step 4 — factor out the matching binomial:
$$ (x+3)(3x+2) $$
Answer: \((x+3)(3x+2)\)
Worked Example D: The AC Method with a Negative Middle Term
Factor \(4x^{2}-4x-15\) using the ac method.
Step 1 — compute \(ac\):
$$ ac = 4\cdot(-15) = -60 $$
Step 2 — find two numbers that multiply to \(-60\) and add to \(-4\):
$$ -10 \text{ and } 6 \qquad (-10\cdot 6 = -60, \quad -10+6=-4) $$
Step 3 — split the middle term and group:
$$ 4x^{2}-10x+6x-15 = (4x^{2}-10x) + (6x-15) = 2x(2x-5) + 3(2x-5) $$
Step 4 — factor out the matching binomial:
$$ (2x-5)(2x+3) $$
Answer: \((2x-5)(2x+3)\)
Common Mistakes to Avoid
- Giving up after the first pairing fails. If the terms as written don’t group cleanly, rearranging them (usually swapping the middle two) is a normal part of the process, not a sign of a mistake.
- Finding two numbers that add to \(b\) but forgetting they must also multiply to \(ac\). Both conditions are required simultaneously — a pair that only satisfies one of them doesn’t work.
- Factoring out a GCF with the wrong sign from the second pair. If the second pair starts with a negative term, factoring out a negative GCF (matching Worked Example D’s pattern) is usually what makes the two binomials actually match.
- Stopping after factoring each pair separately, without the final step. The matching binomial still needs to be factored out one more time — two partially-factored pairs are not the final answer.
- Assuming every four-term polynomial groups successfully. Some polynomials genuinely don’t factor by grouping (or at all); after trying both reasonable pairings, it’s fine to conclude that grouping doesn’t apply.
- Splitting the middle term with the wrong sign in the ac method. \(bx\) needs to split into two terms whose coefficients literally add to \(b\), including sign — double-check the addition, not just the product.
Where This Shows Up Later
- Factoring Quadratics. The ac method introduced here is one of the two standard techniques for factoring a trinomial with a leading coefficient other than \(1\), covered in full there.
- Factoring Higher-Degree Polynomials. Grouping extends naturally to polynomials with six terms (three pairs) or a four-term structure hiding inside a higher-degree expression.
- Solving quadratic equations by factoring. Factoring \(2x^{2}+7x+3\) into \((x+3)(2x+1)\) is exactly the step that turns a quadratic equation into two simple linear ones via the zero product property.
- Simplifying Rational Expressions. A numerator or denominator that groups into a product is often the key to cancelling a rational expression down to lowest terms.
Practice Problems
Work each problem yourself before opening the answer.
Problem 1. Factor \(x^{3}+2x^{2}+3x+6\) by grouping.
Show answer
$$ (x^{3}+2x^{2}) + (3x+6) = x^{2}(x+2) + 3(x+2) = (x+2)(x^{2}+3) $$
Answer: \((x+2)(x^{2}+3)\)
Problem 2. Factor \(x^{3}-4x^{2}+5x-20\) by grouping.
Show answer
$$ (x^{3}-4x^{2}) + (5x-20) = x^{2}(x-4) + 5(x-4) = (x-4)(x^{2}+5) $$
Answer: \((x-4)(x^{2}+5)\)
Problem 3. Factor \(2x^{3}+6x^{2}+5x+15\) by grouping.
Show answer
$$ (2x^{3}+6x^{2}) + (5x+15) = 2x^{2}(x+3) + 5(x+3) = (x+3)(2x^{2}+5) $$
Answer: \((x+3)(2x^{2}+5)\)
Problem 4. Factor \(xy+3x+2y+6\) by grouping.
Show answer
$$ (xy+3x) + (2y+6) = x(y+3) + 2(y+3) = (y+3)(x+2) $$
Answer: \((y+3)(x+2)\)
Problem 5. Factor \(x^{2}+5x\) using the ac method’s two numbers where \(ac=0\) — actually, factor \(2x^{2}+5x+3\) using the ac method.
Show answer
Step 1 — compute \(ac\):
$$ ac = 2\cdot 3 = 6 $$
Step 2 — find two numbers multiplying to \(6\) and adding to \(5\):
$$ 2 \text{ and } 3 $$
Step 3 — split and group:
$$ 2x^{2}+2x+3x+3 = 2x(x+1)+3(x+1) = (x+1)(2x+3) $$
Answer: \((x+1)(2x+3)\)
Problem 6. Factor \(3x^{2}+13x+4\) using the ac method.
Show answer
Step 1 — compute \(ac\):
$$ ac = 3\cdot 4 = 12 $$
Step 2 — find two numbers multiplying to \(12\) and adding to \(13\):
$$ 12 \text{ and } 1 $$
Step 3 — split and group:
$$ 3x^{2}+12x+x+4 = 3x(x+4)+1(x+4) = (x+4)(3x+1) $$
Answer: \((x+4)(3x+1)\)
Problem 7. Factor \(5x^{2}-14x-3\) using the ac method.
Show answer
Step 1 — compute \(ac\):
$$ ac = 5\cdot(-3) = -15 $$
Step 2 — find two numbers multiplying to \(-15\) and adding to \(-14\):
$$ -15 \text{ and } 1 $$
Step 3 — split and group:
$$ 5x^{2}-15x+x-3 = 5x(x-3)+1(x-3) = (x-3)(5x+1) $$
Answer: \((x-3)(5x+1)\)
Problem 8. Factor \(x^{3}+7x-3x^{2}-21\) by grouping, rearranging the terms first.
Show answer
Step 1 — rearrange so matching-degree terms sit together:
$$ x^{3}-3x^{2}+7x-21 $$
Step 2 — group and factor each pair:
$$ (x^{3}-3x^{2}) + (7x-21) = x^{2}(x-3) + 7(x-3) = (x-3)(x^{2}+7) $$
Answer: \((x-3)(x^{2}+7)\)
Problem 9. Factor \(4x^{2}+4x-15\) using the ac method.
Show answer
Step 1 — compute \(ac\):
$$ ac = 4\cdot(-15) = -60 $$
Step 2 — find two numbers multiplying to \(-60\) and adding to \(4\):
$$ 10 \text{ and } -6 $$
Step 3 — split and group:
$$ 4x^{2}+10x-6x-15 = 2x(2x+5)-3(2x+5) = (2x+5)(2x-3) $$
Answer: \((2x+5)(2x-3)\)
Problem 10. Factor \(x^{3}-2x^{2}-9x+18\) by grouping.
Show answer
$$ (x^{3}-2x^{2}) + (-9x+18) = x^{2}(x-2) - 9(x-2) = (x-2)(x^{2}-9) $$
Answer: \((x-2)(x^{2}-9)\). Notice \(x^{2}-9\) is itself a difference of squares and factors further to \((x-3)(x+3)\), giving the fully factored form \((x-2)(x-3)(x+3)\) — grouping doesn’t always mean the work is completely finished after one pass.
Quick Reference
| Situation | Move |
|---|---|
| Four-term polynomial | Split into two pairs, factor the GCF from each, then factor out the matching binomial |
| First pairing doesn’t match | Rearrange the terms (commonly swapping the middle two) and try again |
| Trinomial with leading coefficient \(\neq 1\) | Compute \(ac\), find two numbers multiplying to \(ac\) and adding to \(b\), split the middle term, then group |
| Second pair starts negative | Factor out a negative GCF from that pair so the binomials match |
| After grouping | Check whether either resulting factor can be factored further (like a difference of squares) |
| Grouping doesn’t work at all | Some polynomials are prime — try both reasonable pairings before concluding this |
Once splitting a trinomial’s middle term feels automatic, Factoring Quadratics covers this ac method alongside the simpler leading-coefficient-of-1 case and the special product patterns. Revisit Greatest Common Factor for the single-pair skill grouping is built from, or Factoring Higher-Degree Polynomials for grouping applied to bigger polynomials. Build speed with the Factoring by Grouping Generator, or browse the rest of the Algebra lessons as new ones publish.