Some polynomials with four terms have no common factor in all four terms, but they do in pairs. Factoring by grouping takes out a GCF from each pair and then a common binomial. It is the reverse of multiplying two binomials that do not combine.
Why it works
Multiply $(x^2 + 3)(x + 2) = x^3 + 2x^2 + 3x + 6$. No term combines, so all four survive. Reading it backward: the first pair, $x^3 + 2x^2$, is $x^2(x + 2)$; the second pair, $3x + 6$, is $3(x + 2)$. Now $(x + 2)$ is a common factor of the two pieces, just like a common number, so it comes out: $(x + 2)(x^2 + 3)$.
Key idea
Group the terms in pairs, factor the GCF out of each pair so that the same binomial appears in both, then factor that binomial out. If the binomials do not match, try a different sign or a different pairing.
Worked examples
Worked example: A cubic
Factor $x^3 + 2x^2 + 3x + 6$.
- Pairs: $(x^3 + 2x^2) + (3x + 6)$.
- Factor each: $x^2(x + 2) + 3(x + 2)$.
- Common binomial: $(x + 2)(x^2 + 3)$.
Answer: $(x + 2)(x^2 + 3)$
Worked example: A negative second pair
Factor $2x^3 - 6x^2 - 5x + 15$.
- Pairs: $(2x^3 - 6x^2) + (-5x + 15)$.
- First pair: $2x^2(x - 3)$. For the second, take out $-5$, not $5$: $-5(x - 3)$.
- Common binomial: $(x - 3)(2x^2 - 5)$.
Answer: $(x - 3)(2x^2 - 5)$
Worked example: Two variables
Factor $xy + 4x + 3y + 12$.
- $x(y + 4) + 3(y + 4) = (x + 3)(y + 4)$.
Answer: $(x + 3)(y + 4)$
Common mistake
Factoring $-5$ out of $-5x + 15$ as $+5$, or as $-5(x + 3)$. Dividing $15$ by $-5$ gives $-3$, so $-5x + 15 = -5(x - 3)$. If your two binomials do not match, recheck the sign you took out of the second pair, and check by distributing.