# Lesson Explainer: Factoring by Grouping Mathematics

In this explainer, we will learn how to factor expressions by grouping.

Let us begin by revisiting the idea of factoring an expression by identifying its highest common factor. Suppose we have

Since each term is divisible by 3, we can say that it is a common factor of the expression. Thus, we can factor the expression to get

Since no longer has any common factors, we can conclude that 3 is the highest common factor, and that this expression is now in its most simplified form. Identifying common factors is a useful skill for factoring, but it may not always be the case that the entire expression has a common factor. Suppose, for instance, we have

We can see that this expression has no common factor (other than 1). Suppose, however, we were to group up the terms in the expression as follows:

We can see that the first two terms share a common factor of 2 and the last two terms share a common factor of . If we factored these terms separately, we would get

Notice that we now have two terms with a common factor of . If we factor these terms, we get

So, even though it was not obvious at first, this expression can be factored into two parentheses. It is important to note, however, that this not the only way to group the terms. Alternatively, by swapping the second and third terms around, we can group them as follows:

Here, we note that even though the first two terms do no not have a common factor greater than 1, the last two terms have a common factor of and so we have grouped them as shown. Factoring these terms, we get

Factoring to make in this way is not strictly necessary, but it allows us to identify the common factor more easily. In particular, we can see that we now have two terms with a common factor of (whereas before, was the factor). Factoring these terms, we obtain

This is the same as since multiplication is commutative. This approach is something we can apply generally as we will now describe.

### How To: Factoring by Grouping

Suppose we have an expression with an even number of terms that do not all share a common factor. Then, in certain situations, we can apply the following approach to fully factor the expression.

• Group the terms into pairs that each share a common factor between them.
• Factor out the common factor from each pair.
• Completely factor the expression by identifying a common factor in the factored terms.

Let us consider another example where we can apply this method.

### Example 1: Factoring an Expression by Grouping

Factorize fully .

### Answer

This expression does not have a common factor greater than 1, so we cannot directly factor all of it. However, we can group pairs of terms that share common factors and factor them individually.

Inspecting the first and third terms, we see that they both have a factor of . Likewise, the second and fourth terms have a factor of . We highlight this below:

Taking and out as factors, we have

Now, we can see that we have two terms that each have a factor of . Since is multiplying in the first term and is multiplying in the second term, we can factor out to get

As this expression cannot be factored any further, it is in the fully factored form.

An alternate way to get the same result is to group up the first and second terms along with the third and fourth terms as shown:

Although the second pair cannot be meaningfully factored, we can factor out from the first two terms to get

Finally, by taking as a common factor, we obtain the same expression we previously calculated:

Before moving on, let us first address a complication that may occur in the solving of this example. When identifying common factors, we may have found instead

In other words, we might not have immediately realized that has a factor of . If we had continued with the factoring, we would get

At this stage, it might seem like it is not possible to continue since the terms do not have the same factor. However, with a little more factoring we can still fix things. In particular, if we make use of the fact that , we get

So, we can still get to the same answer.

Our first example included fairly simple factors, but let us recall that it is possible to factor out more than one variable or number from an expression. For instance, we have where we have factored out the common factor from both terms. In the following example, we must keep in mind that the factors we choose may contain more than just one variable.

### Example 2: Factoring a Multivariable Expression by Grouping

Factorize fully .

### Answer

We have been asked to fully factorize the given expression, but, as we can see, there is no common factor among the terms. This shows us that we need to factor by grouping the terms separately.

In order to identify terms that share common factors, in this instance, we can consider the numbers in front of the variables. Specifically, we highlight the ones that match:

Let us consider these pairs of terms one by one. and have common factors of 9 and , so their greatest common factor is . Meanwhile, and have common factors of 4 and , so they have a greatest common factor of . We can rearrange the terms so that the pairs are together by using the commutativity of addition and subtraction. This gives us

Then, we can factor the expression as follows:

Having factored this expression into two terms, we now see that each term has as a factor. Hence, we can factor them again, giving us the fully factored form

So far, we have considered expressions where no variable has been raised to a power. Sometimes, we may also be able to factor quadratic or cubic expressions by grouping terms that we can factor. For instance, suppose we have

Like previous examples, this expression has no common factor. Ordinarily, since this is a cubic expression, it would be difficult for us to factor it. However, there is something about the coefficients of this expression that suggests it can be factored by grouping terms. In particular, we can see that the ratio between the coefficients of the first two terms and the last two terms is the same:

It may not be immediately clear why this is significant, so let us first continue by applying the approach from before and grouping terms together that can be factored. If we do this, we find that

Thus, factoring out from the first two terms and 2 from the second two terms, we get

Now, we see that we have two terms that both have a factor of . Note that has the same ratio between the coefficients of the terms that we noticed earlier: . This is because the ratio between the pairs of terms was preserved when we factored them. Continuing onward, we can factor out to get

The term cannot be factored further; therefore, we have managed to fully factor this expression.

It is important to realise that we cannot always use this approach to factor cubic expressions. For instance, suppose that our expression was

However, let us consider the ratios between the coefficients of the terms in this expression:

Since the ratios are not the same, this implies we cannot use factoring by grouping to factor the expression. Indeed, if we applied the above approach and factored the groups of terms, we would get

However, since does not share a factor with , we cannot proceed further.

Despite the fact that factoring by grouping is not always an option for cubic expressions, it is very beneficial to use in specific situations. Let us see another example where we can use this technique.

### Example 3: Factoring a Cubic Expression by Grouping

Factorize fully .

### Answer

The first thing we notice is that the expression is cubic since the largest exponent of a variable in any nonzero term is 3. Ordinarily, there would be no easy way to factor this expression fully, but we notice that there is a common ratio between the coefficients of the first two terms and the last two terms:

This suggests that we can factor the expression by grouping the first two and the last two terms together. If we group them in this way, we have

Since we have a factor of in the first two terms and 5 in the last two terms, we can factor them to get

Notice that we now have two terms with a common factor of . Thus, we factor this out to get the fully factored form:

In the previous example, we showed one way to factor a cubic expression by grouping pairs of terms and factoring them. One other way of factoring a cubic expression is identifying when it is a difference or sum of two cubes. Recall that the difference of two cubes can be written as

Similarly, the sum of two cubes can be written as

In some cases, we can group terms so that parts of an expression can be factored using the above formulas. Let us see an example of this.

### Example 4: Factoring an Expression by Grouping Terms and Using the Sum of Cubes Formula

Factorize fully .

### Answer

Let us consider how we can go about factoring this expression. The first thing we might notice is that the first two terms are the sum of two cubes. Recall that we have a formula for factoring the sum of two cubes:

The given expression has more terms than just the first two, but if we group the terms, then we can factor them separately. This is to get the following:

Using the above formula, this then becomes

Notice that we now have two terms with a common factor of , which means that we can factor from both terms. Namely, this means we are combining the underlined terms below into one parenthesis:

Doing this, we get

As the expression in the second parenthesis cannot be factored any further, we conclude that the cubic expression has been fully factored.

For our final example, we will further investigate how we can combine factoring by grouping with other methods of factoring.

### Example 5: Factoring an Expression by Recognizing a Perfect Square Trinomial

Factorize fully .

### Answer

Here, we have been given a polynomial in and with four terms. Although it does not immediately appear to be in a form that we can factor, we can potentially group it into parts and factor each part separately. In fact, we can see that, if we do not include the 1, the rest of the expression takes on a familiar form:

We can see that this trinomial is the result of a perfect square because of the coefficients: namely, 49 is and 14 is .

To make this more obvious, we can begin by factoring the negative sign out to get

Recall that perfect square trinomials of the above form can be factored as follows:

We can use the above expression to directly factor the expression in parentheses. Substituting for , and for , we can see that this becomes

To fully factor the expression, we need one more step. Since is the square of , we note that the above expression is a difference of two squares. In particular, recall that can be factored using

If we let , then we can use this formula to obtain the fully factored form of the expression:

Let us finish by considering the main things we have learned in this explainer.

### Key Points

• We can factor expressions that lack a common factor by grouping them into pairs that share common factors.
• We can also factor cubic expressions that have a shared ratio between the terms using factoring by grouping.
• If we see that we can apply a factoring formula to a part of an expression, such as the difference or the sum of cubes, the difference of squares, or perfect square trinomials, then we can group that expression and factor it separately.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.