Combining like terms

Like terms are terms that have the same exponent AND the same variable or variables. For example, \(2x\) and \(–5x\) are like terms, and \(3y^2\) and \(y^2\) are like terms. Combining like terms is a way of simplifying an algebraic expression or equation. In the lesson below, we will see a few examples of how this works!

[adsenseWide]

Examples of like terms and terms that are not like terms

Let’s first look at a few more examples of like terms, and “not-like” terms:

  • \(5x\) and \(x^5\)
    These terms are NOT like terms. They both have the same variable, but different exponents.
  • \(4y^2\) and \(-y^2\)
    These terms ARE like terms since they both have the variable y to the 2nd power.
  • \(5xy\) and \(2yx\)
    These terms ARE like terms, even though the variables in \(2yx\) are in a different order. As long as the terms have the same variable or variables, each to the same power, then they are like terms.
  • \(5x^2y^3\) and \(2x^2y^2\)
    These terms are NOT like terms. While they both share the same variables and both of the x’s are squared, the y has a different exponent in each term.

Examples of simplifying expressions by combining like terms

Now, let’s work through a few examples to see how we can combine like terms to simplify expressions. In each case, the idea is to combine all like terms until there are no more to combine.

Example

Simplify the expression:
\(5x+2x-12x\)

Solution

All three terms have the same variable to the same power. So, they are all like terms and simplifying this expression means combining all of them. To do this, add or subtract (depending on the sign) the coefficients. These are the numbers in front of the variables.

\(5x+2x-12x = (5 + 2 – 12)x = \boxed{-5x}\)

The final answer is:

\(\boxed{-5x}\)

Example

Simplify the expression:
\(5y^2-2y+y^2+3y-15\)

Solution

The groups like terms here are the terms with \(y^2\), \(y\) and the constant. You can move the terms around to see this, as long as you are careful with the signs.

\(\color{red}{5y^2}-2y+\color{red}{y^2}+3y-15 = \color{red}{5y^2} + \color{red}{y^2} – 2y + 3y – 15\)

Now combine like terms by adding or subtracting coefficients. Remember that if there is no number in front of the variable, then the coefficient is 1. So, \(y^2\) = \(1y^2\).

\(\begin{align}5y^2 + y^2 – 2y + 3y – 15 &= (5 + 1)y^2 + (-2 + 3)y – 15\\ &= \boxed{6y^2 + y – 15}\end{align}\)

This is the final answer. Notice that we followed the rule of writing \(1y\) as \(y\) in this answer.

Example

Simplify the expression:
\(-2w^3+w^3-5w^2-3+w-6+3w^3 + 2\)

Solution

This time, there are four sets of like terms. Those terms with \(w^3\), those with \(w^2\), those with just \(w\), and the three constants (numbers) –3, –6, and 2.

You can jump straight into combining these like terms, or you can first rewrite the expression so that the like terms are next to each other and easy to keep track of. We will do that since it helps us make sure that we don’t miss any terms.

\(\color{red}{-2w^3}+\color{red}{w^3}-5w^2 \color{blue}{-3}+w\color{blue}{-6}+\color{red}{3w^3} \color{blue}{+ 2} = \color{red}{-2w^3} + \color{red}{w^3} + \color{red}{3w^3} – 5w^2 + w \color{blue}{-3} \color{blue}{- 6} + \color{blue}{2}\)

Now combine like terms by adding or subtracting the coefficients. You can combine the constants just by adding them as well.

\(\begin{align}-2w^3 + w^3 + 3w^3 – 5w^2 + w – 3 – 6 + 2 &= (-2 + 1 + 3)w^3 – 5w^2 + w – 7\\ &= \boxed{2w^3 – 5w^2 + w – 7}\end{align}\)

We will look at one last example. In this example, there are multiple variables in each term. Remember that you should apply the same rules as before and combine any terms with the same variable and exponent.

Example

Simplify the expression:
\(3x^2y^2-2x^2+3x^2y^2-1\)

Solution

There are two like terms here that can be combined: the two terms with \(x^2y^2\). As before, you can write these next to each other or simply combine them as your first step. Here, we will first rewrite the expression with those terms next to each other.

\(\begin{align} \color{red}{3x^2y^2}-2x^2+\color{red}{3x^2y^2}-1 &= \color{red}{3x^2y^2}+\color{red}{3x^2y^2}-2x^2-1\\ &= (3 + 3)x^2y^2-2x^2-1\\ &= \boxed{6x^2y^2-2x^2-1}\end{align}\)

[adsenseLargeRectangle]

Summary

Combining like terms is an essential skill in algebra, calculus, and beyond since it is one of the main ways to simplify an expression or equation. You should make sure to work plenty of problems so that you are comfortable with this skill.