## Section2.5Like Terms

### SubsectionEquivalent Expressions

When we solve an equation such as

\begin{equation*} 2+3x=17 \end{equation*}

we find a value for the variable that makes the equation true. The solution to this equation is 5, because the two expressions $2+3x$ and 17 are equal if $x=5\text{.}$ If we use any other value for $x\text{,}$ say $x=9$ or $x=-1\text{,}$ then $2+3x$ does not equal 17.

It is possible for two algebraic expressions to be equal for all values of the variable. For instance, the expressions $2x+3x$ and $5x$ will always give the same value when the same number is substituted for $x$ in each expression. For example,

Both expressions equal 15 when $x=3\text{.}$

###### Exercise2.29.

Verify that $2+3x$ and $5x$ are equal when $x=-4\text{.}$

Two algebraic expressions are equivalent if they name the same number for all values of the variable.

Thus, $2+3x$ and $5x$ are equivalent expressions, and we can replace one by the other if it will simplify our work.

###### Caution2.30.

Although two expressions may name the same number for some values of the variable, they are not necessarily equivalent. For example, to show that the expressions $2+3x$ and $5x$ are not equivalent, we only have to find a single value of $x$ for which they are not equal. If we evaluate each expression for $x=6\text{,}$ we find:

\begin{equation*} \begin{aligned} 2+3x \amp = 2+3(\alert{6})=20\\ 5x \amp = 5(\alert{6})=30 \end{aligned} \end{equation*}

Because they are not equal for $x=6\text{,}$ the expressions $2+3x$ and $5x$ are not equivalent.

###### 1.

When are two expressions equivalent?

### SubsectionLike Terms

We saw above that $2x+3x$ and $5x$ are equivalent expressions. This makes sense when we consider what these expressions mean: $2x$ means two $x$'s added together, and $3x$ means three $x$'s added together. Then

\begin{equation*} 2x+3x=(x+x)+(x+x+x)=5x \end{equation*}

We can add two $x$'s to three $x$'s and get five $x$'s, just as we can add two pencils to three pencils, or two dollars to three dollars. In algebra this is called combining like terms.

Like terms are any terms that are exactly alike in their variable factors.

###### Example2.31.
1. \begin{equation*} \begin{aligned} 2x~~\text{and}~~3x~~~~~~ \amp \text{are like terms}\\ -4a~~\text{and}~~7a~~~~~~ \amp \text{are like terms} \end{aligned} \end{equation*}
because their variable factors are identical.
2. \begin{equation*} \begin{aligned} 2x~~\text{and}~~3y~~~~~~ \amp \text{are not like terms}\\ 2x~~\text{and}~~3~~~~~~ \amp \text{are not like terms} \end{aligned} \end{equation*}
because their variable factors are different.

The numerical factor in a term is called the numerical coefficient, or just the coefficient of the term.

###### Example2.32.
1. In the expression $3xy\text{,}$ the number 3 is the numerical coefficient.
2. In a term such as $xy$ or $b\text{,}$ the numerical coefficient is 1.
3. If a variable is preceded by a negative sign, the coefficient of the term is $-1\text{.}$ For example,
\begin{equation*} \begin{aligned} -x~~~~~~\text{means}~~~~~~ \amp -1 \cdot x\\ -a~~~~~~\text{means}~~~~~~ \amp -1 \cdot a \end{aligned} \end{equation*}

### SubsectionAdding and Subtracting Like Terms

Add the numerical coefficients of the terms. Do not change the variable factors of the terms.

###### Example2.33.

1. $5n+3n$
2. $-4y-3y$
3. $-6st+9st$
Solution

In each calculation, we do not change the variables we are adding; only the coefficient changes.

1. $5n+3n = (5+3)n = 8n~~~~~~~~ \blert{\text{Add the coefficients,}~ 5 ~\text{and}~ 3.}$
2. $-4y-3y = (-4-3)y = -7y~~~~~~~~ \blert{\text{Add the coefficients,}~ -4~ \text{and}~ -3}.$
3. $-6st+9st = (-6+9)st = 3st~~~~~~~~ \blert{\text{Add the coefficients,}~ -6 ~\text{and} ~9.}$

In Example 2.33, we replaced each expression by a simpler but equivalent expression. In other words, $-7y$ is equivalent to $-4y-3y\text{,}$ and $3st$ is equivalent to $-6st+9st\text{.}$

Replacing an expression by a simpler equivalent one is called simplifying the expression.

We subtract like terms in the same way that we add like terms.

###### To subtract like terms.

Subtract the numerical coefficients of the terms. Do not change the variable factors of the terms.

###### Example2.34.
$6a-(-8a)=[6-(-8)a]=14a~~~~~~~~~~\blert{\text{Subtract the coefficients.}}$

###### 2.

What are like terms?

###### 3.

How do we add or subtract like terms?

###### Caution2.35.

We cannot add or subtract unlike terms. Thus,

\begin{equation*} \begin{aligned} 2x+3y~~~~~~~~ \amp \text{cannot be simplified}\\ -6x+4xy~~~~~~~~ \amp \text{cannot be simplified}\\ 6-2x~~~~~~~~ \amp \text{cannot be simplified} \end{aligned} \end{equation*}

Many expressions contain both like and unlike terms. In such expressions we can combine only the like terms.

###### Example2.36.

Simplify $~-4a+2-5+8a+5a$

Solution

We combine all the $a$-terms, and all the constant terms, like this:

\begin{equation*} -4a+8a+5a=9a ~~~~~~~~\text{and}~~~~~~~~2-5=-3 \end{equation*}

so

\begin{equation*} -4a+2-5+8a+5a=9a-3 \end{equation*}
###### Caution2.37.

In Example 2.36, $9a-3 \not= 6a,$ because $9a$ and $-3$ are not like terms.

### SubsectionRemoving Parentheses

\begin{equation*} 5+(-3)=5-3=2 \end{equation*}

We can also remove parentheses when we add like terms. Thus,

\begin{equation*} 5x+(-3x)=5x-3x=2x \end{equation*}
###### Removing parentheses that follow a plus sign.

Parentheses preceded by a plus sign may be omitted, and each term within parentheses keeps its original sign.

###### Example2.38.

Simplify $~(2x+3)+(5x-7)$

Solution

Each set of parentheses is preceded by a plus sign, so we may remove the parentheses.

\begin{equation*} \begin{aligned} (2x+3)+(5x-7)\amp = 2x+3+5x-7 \amp \blert{\text{Combine like terms.}}\\ \amp = 7x-4 \end{aligned} \end{equation*}

BUT: We must be careful when removing parentheses preceded by a minus sign. In the expression

\begin{equation*} (5x-2)-(7x-4) \end{equation*}

the minus sign preceding $(7x-4)$ applies to each term inside the parentheses. Therefore, when we remove the parentheses we must change the sign of $7x$ from $+$ to $-$ and we must change the sign of $-4$ from $-$ to $+\text{.}$ Thus,

\begin{equation*} \begin{aligned} (5x-2)-(7x-4)\amp = 5x-2\alert{-}7x\alert{+}4 \amp \amp \blert{\text{Change each sign inside parentheses.}}\\ \amp =5x-7x-2+4 \amp \amp \blert{\text{Combine like terms.}}\\ \amp =-2x+2 \end{aligned} \end{equation*}
###### Removing parentheses that follow a minus sign.

If an expression inside parentheses is preceded by a minus sign, we change the sign of each term within parentheses and then omit the parentheses and the minus sign.

###### Example2.39.

Simplify $~-5b-(3-2b)+(4b-6)$

Solution

Before combining like terms, we must remove the parentheses. We change the signs of any terms inside parentheses preceded by a minus sign; we do not change the signs of terms inside parentheses preceded by a plus sign.

###### 4.

We can remove parentheses that follow .

###### 5.

What must you do if you remove parentheses that follow a minus sign?

### SubsectionSolving Equations and Inequalities

We can now solve equations in which two or more terms contain the variable.

###### Example2.40.

Solve the equation $~2x+7=4x-3$

Solution

We first get all terms containing the variable on one side of the equation. For this example, we will subtract $2x$ from both sides of the equation to get

\begin{equation*} \begin{aligned} 2x+7\amp = 4x-3 \amp \amp \blert{\text{Subtract } 2x\text{ from both sides.}}\\ \underline{\blert{-2x}} \amp = \underline{\blert{-2x}} \\ 7 \amp =2x-3 \end{aligned} \end{equation*}

Now the equation looks like ones we already know how to solve, and we proceed as usual to isolate the variable.

\begin{equation*} \begin{aligned} 7\amp = 2x-3 \amp \amp \blert{\text{Add 3 to both sides.}}\\ \underline{\blert{+3}} \amp = \underline{\blert{+3}} \\ 10 \amp =2x \amp \amp \blert{\text{Divide both sides by 2.}}\\ \dfrac{10}{\blert{2}} \amp = \dfrac{2x}{\blert{2}}\\ 5 \amp = x \end{aligned} \end{equation*}

The solution is 5.

If one side of an equation or inequality contains like terms, we should combine them before beginning to solve.

###### Example2.41.

Solve $~2x-4x+14 \lt 3+5x-10$

Solution

We combine like terms on each side of the inequality, to get

\begin{equation*} \begin{aligned} \blert{2x-4x} \amp \lt \blert{3}+5x \blert{-1} \amp \amp \blert{2x-4x=-2x~~\text{and}~~ 3-10=7}\\ -2x+14 \amp \lt 5x-7 \end{aligned} \end{equation*}

Now we continue solving as usual: We want to get all the terms containing $x$ on one side of the inequality, and all the constant terms on the other side.

\begin{equation*} \begin{aligned} -2x+14 \amp \lt ~~~ 5x-7 \amp \amp \blert{\text{Subtract}~ 5x~ \text{from both sides.}}\\ \underline{\blert{-5x}\qquad} \amp = \underline{\blert{-5x}\qquad} \\ -7x+14 \amp \lt \qquad -7 \amp \amp \blert{\text{Subtract}~ 14~ \text{from both sides.}}\\ \underline{\qquad\blert{-14}} \amp = \underline{\quad\blert{~~{-14}}}\\ -7x \amp \lt \quad~~ {-21} \amp \amp \blert{\text{Divide both sides by}~-7;}\\ \dfrac{-7x}{\blert{-7}} \amp \gt \dfrac{-21}{\blert{-7}} \amp \amp \blert{\text{reverse the direction of the inequality.}}\\ x \amp \gt 3 \end{aligned} \end{equation*}

The solution is all $x$-values greater than 3. You can check the solution by substituting one $x$-value greater than 3 and one value less than 3 into the original inequality, for instance:

###### 6.

What should you do if one side of an equation or inequality contains like terms?

Here are our guidelines for solving linear equations.

###### Steps for Solving Linear Equations.
1. Combine like terms on each side of the equation.
2. By adding or subtracting the same quantity on both sides of the equation, get all the variable terms on one side and all the constant terms on the other.
3. Divide both sides by the coefficient of the variable to obtain an equation of the form $x=a\text{.}$

### SubsectionSkills Warm-Up

#### ExercisesExercises

Write algebraic expressions.

###### 1.

Getaway Tours offers a Caribbean cruise for $2000 per person if 12 people sign up. For each additional person who signs up, the price per person is reduced by$60. How much will you pay for a cruise if $p$ additional people sign up?

###### 29.

The cost of producing $m$ stereos is $251m+1355$ dollars, and each stereo sells for $847. 1. What profit is made from producing and selling $m$ stereos? 2. How many stereos must be produced to make a profit of$16,525?

For Problems 30–34, write and solve an equation.

###### 30.

Last summer Kevin made 8 batches of barbecue sauce using one bottle of catsup. This summer he made only 5 batches and had 12 ounces of catsup left over. How much catsup does Kevin use in a batch of barbecue sauce?

###### 31.

Arch has two wooden beams of equal length. He makes 3 posts for mailboxes with one beam, and has 33 inches left. He makes another mailbox post with the other beam, and has 131 inches left. How long is each mailbox post?

###### 32.

Quentin bought 12 cans of cat food and a half-gallon of milk that cost $1.80. Tilda bought 8 cans of cat food and a$5 bag of kibble. They paid the same price at the check-out stand. How much does one can of cat food cost?

###### 33.

If Sarah drinks three glasses of milk a day she will exceed her minimum daily requirement for calcium by 70 milligrams. If she drinks only two glasses of milk she will still need another 220 milligrams of calcium. How many milligrams of calcium does a glass of milk contain?

###### 34.

On her last history test, Parisa answered 9 short-answer questions correctly and earned 15 points on the essay. Seana answered 10 short-answer questions correctly and got 23 points on the essay. Seana's score on the test was 14 points higher than Parisa's. How many points was each short-answer question worth?