Algebra

Factoring by Grouping

Last updated: March 2026 · Intermediate
Before you start

You should be comfortable with:

Real-world applications
📐
Carpentry

Measurements, material estimation, cutting calculations

Factoring by grouping is a technique for factoring polynomials with four or more terms. The idea is to split the polynomial into groups (usually pairs), factor the GCF out of each group, and then factor out the common binomial that emerges. It is also the engine behind the AC method for factoring trinomials — understanding grouping deepens your grasp of that technique as well.

How Factoring by Grouping Works

The strategy has four steps:

  1. Group the terms into two pairs (for a four-term polynomial)
  2. Factor out the GCF from each pair
  3. Identify the common binomial factor that appears in both groups
  4. Factor out the common binomial

If the two groups produce the same binomial factor, you are done. If they do not, try rearranging the terms into different pairs.

Basic Examples

Example 1: Factor x3+3x2+2x+6x^3 + 3x^2 + 2x + 6

Step 1 — Group into pairs:

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

Step 2 — Factor the GCF from each pair:

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

Step 3 — Both groups contain (x+3)(x + 3). Factor it out:

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

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

Example 2: Factor 2x3+4x2+3x+62x^3 + 4x^2 + 3x + 6

Step 1 — Group:

(2x3+4x2)+(3x+6)(2x^3 + 4x^2) + (3x + 6)

Step 2 — Factor each group:

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

Step 3 — Factor out (x+2)(x + 2):

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

Check: (x+2)(2x2+3)=2x3+3x+4x2+6=2x3+4x2+3x+6(x + 2)(2x^2 + 3) = 2x^3 + 3x + 4x^2 + 6 = 2x^3 + 4x^2 + 3x + 6 . Correct.

Handling Negative Terms

When the third term is negative, be careful with signs. You may need to factor out a negative GCF from the second group.

Example 3: Factor x3+5x24x20x^3 + 5x^2 - 4x - 20

Step 1 — Group:

(x3+5x2)+(4x20)(x^3 + 5x^2) + (-4x - 20)

Step 2 — Factor each group:

From the first group: x2(x+5)x^2(x + 5)

From the second group: factor out 4-4 (not +4+4, because we need the binomial to match):

4(x+5)-4(x + 5)

Step 3 — Factor out (x+5)(x + 5):

(x+5)(x24)(x + 5)(x^2 - 4)

Step 4 — Factor completely! Notice that x24x^2 - 4 is a difference of squares:

(x+5)(x+2)(x2)(x + 5)(x + 2)(x - 2)

Check: (x+5)(x+2)(x2)=(x+5)(x24)=x34x+5x220=x3+5x24x20(x + 5)(x + 2)(x - 2) = (x + 5)(x^2 - 4) = x^3 - 4x + 5x^2 - 20 = x^3 + 5x^2 - 4x - 20 . Correct.

Example 4: Factor 6x39x22x+36x^3 - 9x^2 - 2x + 3

Step 1 — Group:

(6x39x2)+(2x+3)(6x^3 - 9x^2) + (-2x + 3)

Step 2 — Factor each group:

3x2(2x3)+(1)(2x3)3x^2(2x - 3) + (-1)(2x - 3)

We factor out 1-1 from the second group so the binomial matches: 2x+3=1(2x3)-2x + 3 = -1(2x - 3).

Step 3 — Factor out (2x3)(2x - 3):

(2x3)(3x21)(2x - 3)(3x^2 - 1)

Check: (2x3)(3x21)=6x32x9x2+3=6x39x22x+3(2x - 3)(3x^2 - 1) = 6x^3 - 2x - 9x^2 + 3 = 6x^3 - 9x^2 - 2x + 3 . Correct.

When the Initial Grouping Does Not Work

Sometimes the first grouping you try does not produce a common binomial. In that case, rearrange the terms and try a different pairing.

Example 5: Factor x2+3y+xy+3xx^2 + 3y + xy + 3x

First attempt — group as written:

(x2+3y)+(xy+3x)(x^2 + 3y) + (xy + 3x)

Factor each group: x2+3yx^2 + 3y has no common factor. This grouping fails.

Second attempt — rearrange terms:

x2+xy+3x+3yx^2 + xy + 3x + 3y

Now group:

(x2+xy)+(3x+3y)(x^2 + xy) + (3x + 3y)

Factor each group:

x(x+y)+3(x+y)x(x + y) + 3(x + y)

Factor out (x+y)(x + y):

(x+y)(x+3)(x + y)(x + 3)

Check: (x+y)(x+3)=x2+3x+xy+3y(x + y)(x + 3) = x^2 + 3x + xy + 3y . Correct.

Tip: If your first grouping does not work, swap the second and third terms and try again.

Connection to the AC Method

The AC method for factoring trinomials actually uses grouping as its final step. Here is why understanding grouping matters for trinomials too.

When you factor 6x2+13x+66x^2 + 13x + 6 using the AC method:

Step 1 — Compute AC: 6×6=366 \times 6 = 36

Step 2 — Find two numbers that add to 13 and multiply to 36: The pair is 4 and 9.

Step 3 — Split the middle term:

6x2+4x+9x+66x^2 + 4x + 9x + 6

Step 4 — This is now a four-term polynomial. Factor by grouping:

(6x2+4x)+(9x+6)(6x^2 + 4x) + (9x + 6)

2x(3x+2)+3(3x+2)2x(3x + 2) + 3(3x + 2)

(3x+2)(2x+3)(3x + 2)(2x + 3)

So the AC method converts a trinomial into a four-term polynomial that you factor by grouping. The two techniques are deeply connected.

Factoring by Grouping with a GCF

Always check for a GCF across all four terms before grouping.

Example 6: Factor 4x3+8x2+12x+244x^3 + 8x^2 + 12x + 24

Step 1 — Factor out the GCF: The GCF of 4, 8, 12, and 24 is 4.

4(x3+2x2+3x+6)4(x^3 + 2x^2 + 3x + 6)

Step 2 — Factor by grouping inside the parentheses:

4[(x3+2x2)+(3x+6)]4\bigl[(x^3 + 2x^2) + (3x + 6)\bigr]

4[x2(x+2)+3(x+2)]4\bigl[x^2(x + 2) + 3(x + 2)\bigr]

4(x+2)(x2+3)4(x + 2)(x^2 + 3)

Three-Group Factoring (Six Terms)

Occasionally you will encounter a six-term polynomial. Group it into three pairs.

Example 7: Factor x3+x2+x2y+xy+2x+2x^3 + x^2 + x^2y + xy + 2x + 2

Group into three pairs:

(x3+x2)+(x2y+xy)+(2x+2)(x^3 + x^2) + (x^2y + xy) + (2x + 2)

Factor each group: x2(x+1)+xy(x+1)+2(x+1)x^2(x + 1) + xy(x + 1) + 2(x + 1)

Factor out (x+1)(x + 1):

(x+1)(x2+xy+2)(x + 1)(x^2 + xy + 2)

This approach extends the same logic — look for a common factor across all groups.

Real-World Application: Carpentry — Optimizing Material Cuts

A carpenter is building a storage unit and determines that the total surface area of two adjoining panels (in square inches) follows the expression:

Lh+Lw+2h+2wLh + Lw + 2h + 2w

where LL is the length of the first panel, hh is the height, and ww is the depth. The carpenter wants to factor this to see the structure of the formula.

Group the terms:

(Lh+Lw)+(2h+2w)(Lh + Lw) + (2h + 2w)

Factor each group:

L(h+w)+2(h+w)L(h + w) + 2(h + w)

Factor out (h+w)(h + w):

Lh+Lw+2h+2w=(h+w)(L+2)Lh + Lw + 2h + 2w = (h + w)(L + 2)

If h=36h = 36 inches, w=18w = 18 inches, and L=48L = 48 inches:

(36+18)(48+2)=54×50=2,700 square inches(36 + 18)(48 + 2) = 54 \times 50 = 2{,}700 \text{ square inches}

The factored form makes mental math much easier — 54×5054 \times 50 is simpler to compute than adding four separate products. It also reveals the geometric meaning: the total area is the sum of height and depth, multiplied by 2 more than the length (accounting for the side panels).

Common Mistakes to Avoid

  1. Sign errors when factoring out a negative. When the second group starts with a minus sign, factor out the negative so the binomial matches the first group. For example, 2x6=2(x+3)-2x - 6 = -2(x + 3), not 2(x3)2(-x - 3).
  2. Giving up after one grouping fails. If the first pairing does not produce a common binomial, rearrange the terms and try again. Most four-term polynomials that are factorable will work with some grouping.
  3. Forgetting to factor out the GCF first. A common factor across all four terms should be removed before grouping.
  4. Not factoring completely. After grouping, check whether any resulting factor can be factored further (like a difference of squares inside a factor).
  5. Assuming all four-term polynomials factor by grouping. Some four-term polynomials are prime (unfactorable over the integers). If no rearrangement produces a common binomial, the polynomial may not factor.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Factor x3+4x2+5x+20x^3 + 4x^2 + 5x + 20

Group: (x3+4x2)+(5x+20)(x^3 + 4x^2) + (5x + 20)

Factor: x2(x+4)+5(x+4)x^2(x + 4) + 5(x + 4)

=(x+4)(x2+5)= (x + 4)(x^2 + 5)

Answer: (x+4)(x2+5)(x + 4)(x^2 + 5)

Problem 2: Factor 3x3+6x2+x+23x^3 + 6x^2 + x + 2

Group: (3x3+6x2)+(x+2)(3x^3 + 6x^2) + (x + 2)

Factor: 3x2(x+2)+1(x+2)3x^2(x + 2) + 1(x + 2)

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

Answer: (x+2)(3x2+1)(x + 2)(3x^2 + 1)

Problem 3: Factor x37x2+2x14x^3 - 7x^2 + 2x - 14

Group: (x37x2)+(2x14)(x^3 - 7x^2) + (2x - 14)

Factor: x2(x7)+2(x7)x^2(x - 7) + 2(x - 7)

=(x7)(x2+2)= (x - 7)(x^2 + 2)

Answer: (x7)(x2+2)(x - 7)(x^2 + 2)

Problem 4: Factor 2x33x210x+152x^3 - 3x^2 - 10x + 15

Group: (2x33x2)+(10x+15)(2x^3 - 3x^2) + (-10x + 15)

Factor: x2(2x3)5(2x3)x^2(2x - 3) - 5(2x - 3)

=(2x3)(x25)= (2x - 3)(x^2 - 5)

Answer: (2x3)(x25)(2x - 3)(x^2 - 5)

Problem 5: Factor x3+2x29x18x^3 + 2x^2 - 9x - 18

Group: (x3+2x2)+(9x18)(x^3 + 2x^2) + (-9x - 18)

Factor: x2(x+2)9(x+2)x^2(x + 2) - 9(x + 2)

=(x+2)(x29)= (x + 2)(x^2 - 9)

Factor completely — x29x^2 - 9 is a difference of squares:

=(x+2)(x+3)(x3)= (x + 2)(x + 3)(x - 3)

Answer: (x+2)(x+3)(x3)(x + 2)(x + 3)(x - 3)

Problem 6: Factor 6x3+9x2+4x+66x^3 + 9x^2 + 4x + 6

Group: (6x3+9x2)+(4x+6)(6x^3 + 9x^2) + (4x + 6)

Factor: 3x2(2x+3)+2(2x+3)3x^2(2x + 3) + 2(2x + 3)

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

Answer: (2x+3)(3x2+2)(2x + 3)(3x^2 + 2)

Problem 7: A carpenter calculates the combined area of two wall panels as wh+3w+5h+15wh + 3w + 5h + 15 square feet. Factor this expression and find the area if w=8w = 8 and h=10h = 10.

Group: (wh+3w)+(5h+15)(wh + 3w) + (5h + 15)

Factor: w(h+3)+5(h+3)w(h + 3) + 5(h + 3)

=(h+3)(w+5)= (h + 3)(w + 5)

Substitute: (10+3)(8+5)=13×13=169(10 + 3)(8 + 5) = 13 \times 13 = 169 square feet.

Answer: (h+3)(w+5)=169(h + 3)(w + 5) = 169 square feet

Key Takeaways

  • Factoring by grouping works on four-term polynomials — split into two pairs, factor each, then factor out the common binomial
  • If the first grouping does not produce a matching binomial, rearrange the terms and try a different pairing
  • Factor out a negative from the second group when needed to make the binomials match
  • The AC method for trinomials is really just grouping in disguise — it converts three terms into four, then groups
  • Always factor out the GCF across all terms before grouping
  • Always check whether your result can be factored further (difference of squares, another trinomial, etc.)

Return to Algebra for more topics in this section.

Last updated: March 29, 2026