Factoring by grouping is a useful technique for higher-order polynomials or for one that do not factor easily.

So, how do you factor by grouping? **To factor by grouping, look at smaller groups of terms (2 or 3 terms) within a polynomial. Next, factor out the GCF from each group. Then, compare the factored groups to see if there are any common factors. A group of 3 terms may factor easily as a trinomial.**

Of course, you can use the same principles to factor by grouping for any number of terms. However, the work becomes more difficult as you add more terms to the polynomial.

In this article, we’ll take a look at some examples of how to factor by grouping for polynomials with 3, 4, 5, and 6 terms.

Let’s get started.

## How To Factor By Grouping

When you factor by grouping, the first step is to factor out the GCF (greatest common factor) from each term. The terms that remain will be simpler, which makes the later steps much easier.

After factoring out the GCF, the idea is to consider pairs of two terms at a time. For each pair, factor out the GCF (for those two terms).

Then, continue looking at pairs of terms until you factor the expression completely.

You can factor by grouping for polynomials with 3, 4, 5, 6, or even more terms.

Let’s start with the simplest case: 3 terms.

### How To Factor By Grouping With 3 Terms

To factor by grouping with 3 terms, the first step is to factor out the GCF of the entire expression (from all 3 terms). In some cases, there may be no GCF to factor out (that is, the GCF is 1).

Next, choose a pair of terms to consider together (we may need to split a term into two parts). Factor out the GCF of those two terms.

Finally, consider the remaining terms with the factored pair and see what else you can factor out (if anything).

This will make more sense with some examples.

#### Example 1: Factor By Grouping With 3 Terms

Consider the polynomial function f(x) = x^{2} + 3x + 2 (which is a quadratic function).

There is no GCF to factor out.

We can rewrite the middle term, 3x, as x + 2x:

**f(x) = x**^{2}+ (x + 2x) + 2 [since x + 2x = 3x]

This allows us to consider the last two terms as a pair, 2x + 2, which factors as 2(x + 1):

**f(x) = x**^{2}+ x + 2(x + 1) [2x + 2 = 2(x + 1)]

Now we can also consider the first two terms as a pair, x^{2} + x, which factors as x(x + 1):

**f(x) = x(x + 1) + 2(x + 1) [x**^{2}+ x = x(x + 1)]

Now, both of the remaining terms have a factor of (x + 1), so we can factor again as:

**f(x) = (x + 1)(x + 2)**

Note that we could also factor the original function by observing that 1 + 2 = 3 and 1*2 = 2. Another method is to solve using the quadratic formula with a = 1, b = 2, and c = 3 to get x = -1, -2 (and use the negatives of those values, 1 and 2, to factor).

#### Example 2: Factor By Grouping With 3 Terms

Consider the polynomial function g(x) = 7x^{5} + 42x^{3} + 35x.

The GCF is 7x, so we factor that out first:

**g(x) = 7x(x**^{4}+ 6x^{2}+ 5)

Similar to the last example, we can rewrite 6x^{2} as x^{2} + 5x^{2}:

**g(x) = 7x(x**^{4}+ x^{2}+ 5x^{2}+ 5) [since x^{2}+ 5x^{2}= 6x^{2}]

Now if we look at the last two terms in parentheses, we can factor out a 5:

**g(x) = 7x(x**^{4}+ x^{2}+ 5(x^{2}+ 1)) [5x^{2}+ 5 = 5(x^{2}+ 1)]

If we look at the first two terms in the outer parentheses, we can factor out x^{2}:

**g(x) = 7x(x**^{2}(x^{2}+ 1) + 5(x^{2}+ 1)) [x^{4}+ x^{2}= x^{2}(x^{2}+ 1)]

Now both of the terms inside the outer parentheses have a factor of x^{2} + 1, so we can factor that out:

**g(x) = 7x((x**^{2}+ 1)(x^{2}+ 5))

This is the complete factorization of the polynomial function over the real numbers (we could factor further if we consider complex numbers).

### How To Factor By Grouping With 4 Terms

To factor by grouping with 4 terms, the first step is to factor out the GCF of the entire expression (from all 4 terms). In some cases, there may be no GCF to factor out (that is, the GCF is 1).

Next, choose a pair of terms to consider together. Factor out the GCF of those two terms.

Finally, consider the other pair of terms together. Factor out the GCF of those two terms.

Now, you should have two terms remaining, both of which are a product of two factors. Look at them together and see if there is anything else you can factor out (often, they will now have a shared factor).

This will make more sense with some examples.

#### Example 1: Factor By Grouping With 4 Terms

Consider the polynomial function f(x) = 30x^{5} – 40x^{3} + 15x^{2} – 20x.

The GCF is 5x, so we factor that out first:

**f(x) = 5x(6x**^{3}– 8x^{2}+ 3x – 4) [factor out 5x]

Consider the first two terms in parentheses as a pair. 6x^{3} – 8x^{2} factors as 2x^{2}(3x – 4):

**f(x) = 5x(2x**^{2}(3x – 4) + 3x – 4) [factor out 5x]

Now consider the last two terms in parentheses as a pair. It has nothing to factor out, and it already has the form 3x – 4:

**f(x) = 5x(2x**^{2}(3x – 4) + 1(3x – 4))

Now both of the terms inside the outer parentheses have the term (3x – 4), so we can factor that out:

**f(x) = 5x(2x**^{2}+ 1)(3x – 4)

This is the complete factorization of the polynomial function over the real numbers (we could factor further if we consider complex numbers).

#### Example 2: Factor By Grouping With 4 Terms

Consider the polynomial function f(x) = x^{7} + x^{4} – x^{3} – 1.

There is no GCF to factor out.

So, we consider the first two terms as a pair to factor: in this case, we can factor out x^{4}:

**f(x) = x**^{4}(x^{3}+ 1) – x^{3}– 1 [factor out x^{4}from the first two terms]

Looking at the last two terms, we can factor out a -1:

**f(x) = x**^{4}(x^{3}+ 1) – (x^{3}+ 1) [factor out -1 from the last two terms]

Now we can factor out an (x^{3} + 1) from the two remaining terms:

**f(x) = (x**^{4}– 1)(x^{3}+ 1)

We are not done yet though! The first factor is a difference of squares:

**f(x) = (x**^{2}+ 1)(x^{2}– 1)(x^{3}+ 1) [factor the difference of squares x^{4}– 1 = (x^{2}+ 1)(x^{2}– 1)]

We are still not done factoring! The middle factor is another difference of squares:

**f(x) = (x**^{2}+ 1)(x + 1)(x – 1)(x^{3}+ 1) [factor the difference of squares x^{2}– 1 = (x + 1)(x – 1)]

Believe it or not, we are still not done! The fourth factor is a sum of cubes:

**f(x) = (x**^{2}+ 1)(x + 1)(x – 1)(x + 1)(x^{2}– x + 1) [factor the sum of cubes x^{3}+ 1 = (x + 1)(x^{2}– x + 1)]

Finally, this polynomial function is factored completely, unless we want to consider complex numbers.

### How To Factor By Grouping With 5 Terms

To factor by grouping with 5 terms, the first step is to factor out the GCF of the entire expression (from all 5 terms). In some cases, there may be no GCF to factor out (that is, the GCF is 1).

After that, it can be tricky to factor. One method is to look for a group of 3 terms that you can factor as above (a trinomial, such as a quadratic, would not be too difficult to factor).

After that, look at the other two terms as a pair to consider together. Factor out the GCF of those two terms.

Finally, factor out the GCF of the two remaining expressions.

This will make more sense with some examples.

#### Example 1: Factor By Grouping With 5 Terms

Consider the polynomial function f(x) = x^{5} + x^{4} + x^{2} + 3x + 2.

There is no GCF to factor out.

We will consider the last 3 terms as a group. We need a product of 2 and a sum of 3 to factor, so we use 1 and 2. So, those last 3 terms factor as: x^{2} + 3x + 2 = (x + 1)(x + 2):

**f(x) = x**^{5}+ x^{4}+ x^{2}+ 3x + 2 [original function]**f(x) = x**^{5}+ x^{4}+ (x + 1)(x + 2) [factor x^{2}+ 3x + 2 = (x + 1)(x + 2)]

Now we consider the first two terms as a pair. We can factor out a GCF of x^{4}:

**f(x) = x**=^{4}(x+ 1) + (x + 1)(x + 2) [factor x^{5}+ x^{4}**x**^{4}(x+ 1)]

Now we can see that the two remaining expression share a common term of (x + 1), which we can factor out:

**f(x) = (x**^{4}+ x + 2)(x+ 1) [factor out GCF of x + 1]

This polynomial function is factored completely, unless we want to consider complex numbers.

#### Example 2: Factor By Grouping With 5 Terms

Consider the polynomial function g(x) = x^{10} + 5x^{9} + 6x^{8} + x^{7} – 4x^{5}.

We can factor out a GCF of x^{5} as the first step:

**g(x) = x**^{10}+ 5x^{9}+ 6x^{8}+ x^{7}– 4x^{5}[original function]**g(x) = x**^{5}(x^{5}+ 5x^{4}+ 6x^{3}+ x^{2}– 4) [factor out GCF of x^{5}]

Next, we look at the first 3 terms in parentheses as one group. We can factor out x^{3} from those three:

**g(x) = x**^{5}(x^{3}(x^{2}+ 5x + 6) + x^{2}– 4) [factor out x^{3}from the first 3 terms in parentheses]

The trinomialx^{2} + 5x + 6 factors as (x + 2)(x + 3):

**g(x) = x**^{5}(x^{3}(x + 2)(x + 3)) + x^{2}– 4) [factor x^{2}+ 5x + 6 = (x + 2)(x + 3)]

We can also factor the last two terms in the outer parentheses as a difference of squares:

**g(x) = x**^{5}(x^{3}(x + 2)(x + 3)) + (x + 2)(x – 2)) [factor x^{2}– 4 = (x + 2)(x – 2)]

Now we can factor out the common term (x + 2) from the two expressions added in parentheses:

**g(x) = x**^{5}(x + 2)(x^{3}(x + 3) + x – 2) [factor out x + 2]

We can rewrite the factored polynomial as:

**g(x) = x**^{5}(x + 2)(x^{4}+ 3x^{3}+ x – 2)

The quartic in the last parentheses has 2 real and 2 complex roots.

### How To Factor By Grouping With 6 Terms

To factor by grouping with 6 terms, the first step is to factor out the GCF of the entire expression (from all 6 terms). In some cases, there may be no GCF to factor out (that is, the GCF is 1).

After that, it can be tricky to factor. There are two basic approaches you can take:

**1. Split the 6 terms into two groups of 3 terms each. See if any of these trinomials can be factored easily.****2. Split the 6 terms into three groups of 2 terms each. Factor out the GCF from each group of two terms and see if you can go any further.**

This will make more sense with some examples.

#### Example 1: Factor By Grouping With 6 Terms

Consider the polynomial f(x) = x^{5} + 7x^{4} + 6x^{3} – x^{2} – 7x – 6.

There is no GCF to factor out.

Let’s break this into two groups of 3 terms each: the first 3 and the last 3:

**f(x) = (x**^{5}+ 7x^{4}+ 6x^{3}) + ( – x^{2}– 7x – 6) [break into two groups of 3 terms each]

We can factor out x^{3 }from the first set of parentheses:

**f(x) = x**^{3}(x^{2}+ 7x + 6) + ( – x^{2}– 7x – 6) [factor out x^{3}from the first set of parentheses]

We can also factor out -1 from the second set of parentheses:

**f(x) = x**^{3}(x^{2}+ 7x + 6) -1(x^{2}+ 7x + 6) [factor out -1 from the second set of parentheses]

Now we have the common term (x^{2} + 7x + 6) in both expressions, so we factor it out:

**f(x) = (x**^{3}– 1)(x^{2}+ 7x + 6) [factor out x^{2}+ 7x + 6]

We are not even close to done yet! First, we can factor the second set of parentheses as a trinomial:

**f(x) = (x**^{3}– 1)(x + 1)(x + 6) [factor x^{2}+ 7x + 6 = (x + 1)(x + 6)]

We also have a difference of cubes in the first set of parentheses, which we can also factor:

**f(x) = (x – 1)(x**^{2}+ x + 1)(x + 1)(x + 6) [factor x^{3}– 1 = (x – 1)(x^{2}+ x + 1)]

This polynomial is now completely factored, unless we want to consider complex numbers.

#### Example 2: Factor By Grouping With 6 Terms

Consider the polynomial g(x) = 3x^{7} + 3x^{6} + x^{4} + x^{3} + x^{2} – 1.

There is no GCF to factor out.

Let’s consider this as three sets of two terms each: the first two, the middle two, and the last two:

**g(x) = (3x**^{7}+ 3x^{6}) + (x^{4}+ x^{3}) + (x^{2}– 1)

We can factor out 3x^{6} from the first pair:

**g(x) = 3x**^{6}(x + 1) + (x^{4}+ x^{3}) + (x^{2}– 1) [factor out 3x^{6}from the first pair]

We can also factor out x^{3 }from the second pair:

**g(x) = 3x**^{6}(x + 1) + x^{3}(x + 1) + (x^{2}– 1) [factor out x^{3}from the second pair]

We can also factor the third pair as a difference of squares:

**g(x) = 3x**^{6}(x + 1) + x^{3}(x + 1) + (x+ 1)(x – 1) [factor x^{2}– 1 = (x+ 1)(x – 1)]

Now all three expressions share a common term of (x + 1), which we can factor out:

**g(x) = (3x**^{6}+ x^{3}+ x – 1)(x+ 1) [factor out x + 1]

The polynomial 3x^{6} + x^{3} + x – 1 also has a solution of x = -1. So, we know that x + 1 is a factor.

Going a bit further, we get:

**g(x) = (3x ^{5} – 3x^{4} + 3x^{3} – 2x^{2} + 2x – 1)(x+ 1)^{2} [factor out x + 1]**

## Conclusion

Now you have an idea of how to factor by grouping for 3, 4, 5, or 6 terms. The idea is the same no matter how many terms there are.

I hope you found this article helpful. If so, please share it with someone who can use the information.

Don’t forget to subscribe to my YouTube channel & get updates on new math videos!

~Jonathon