See How Things Work

Combining like terms

Unit
Algebraic Expressions
Part
1. Variables & Expressions
Lesson
1.6

Like terms can be added into a single term: 6t + 2t = 8t. This lesson proves why, from the distributive law; extends the rule to differences, opposites and fraction coefficients; sets out how to combine every group of like terms in an expression; and proves that unlike terms, such as x and x², can never be combined into one term.

Why like terms combine

Like terms have the same variable part (lesson 1.5): 6t and 2t are 6 copies and 2 copies of the same number t. The distributive law, read from right to left, collects them into one term.⁠[1]

Theorem (combining like terms).

Let X be a variable part (a product of variables, possibly raised to powers), and let a and b be rational numbers. Then, for every value of the variables,

aX + bX = (a + b)X and aX − bX = (a − b)X.

So like terms combine into one like term whose coefficient is the sum, or the difference, of their coefficients.

Proof.

Fix values of the variables. Then X is a rational number, and so are a and b. The distributive law (Rational Numbers 1.4, from Multiplication 1.7) gives (a + b)X = aX + bX, which is the first identity read from right to left.

For the second, subtracting is adding the opposite (Integers 2.3), and −(bX) = (−b)X (Rational Numbers 1.4). So aX − bX = aX + (−b)X = (a + (−b))X = (a − b)X, by the first identity.

Both identities hold for every value of the variables, so each side may replace the other: the two sides are equivalent expressions (lesson 1.4). Replacing like terms by one term is called combining like terms, and it shortens an expression without changing its value.⁠[2] In practice: add or subtract the coefficients and keep the variable part.⁠[3]

2x + 3 + x + 1

xx1112x + 3x1x + 1

3x + 4

xxx3x11114

3x − 5x

xxx3x−x−x−x−3x−x−x−2x

−2x

−x−x−2x
Figure. Combining like terms with tiles (as in lesson 1.2; schematic, since x may be any number). First two panels: 2x + 3 + x + 1 has three long tiles in all and four small squares, so it equals 3x + 4. Last two panels: in 3x − 5x, subtracting 5x adds five tiles for −x, drawn as three under the tiles for x and two more. Each tile for x with the tile for −x under it makes 0, by the inverse law, so three pairs vanish and two tiles for −x remain: −2x.
Example (Two like terms).

Tickets cost 6 dollars each and the booking fee is 2 dollars per ticket (lesson 1.4). Simplify the cost 6t + 2t of t tickets.

  1. Both terms have the variable part t: they are like terms.
  2. By the Theorem, 6t + 2t = (6 + 2)t = 8t.
  3. Check at t = 5: 6 · 5 + 2 · 5 = 30 + 10 = 40, and 8 · 5 = 40.

Answer: 8t dollars: each ticket costs 8 dollars in all.

Example (A difference with a negative result).

Simplify 9y − 13y.

  1. Like terms, variable part y. By the second identity, 9y − 13y = (9 − 13)y = −4y.
  2. Check at y = 2: 18 − 26 = −8, and −4 · 2 = −8.

Answer: −4y. The result of combining can be negative even though both terms were written with positive coefficients.

Example (Edge cases: coefficients 1 and −1, and a result of 0).

Simplify x + x, x − x and 3ab − 7ba.

  1. x + x = 1x + 1x = (1 + 1)x = 2x: a term without a number has coefficient 1.
  2. x − x = (1 − 1)x = 0x = 0, since a product with 0 is 0 (Rational Numbers 1.4).
  3. ba = ab by the commutative law, so 3ab − 7ba = 3ab − 7ab = (3 − 7)ab = −4ab.

Answer: 2x, 0 and −4ab. Like terms can cancel completely.

Example (Fraction coefficients).

Simplify x2 + x3.

  1. By the Proposition of lesson 1.5, x2 = 12x and x3 = 13x: like terms with fraction coefficients.
  2. By the Theorem, the sum is (12 + 13)x = (36 + 26)x = 56x.
  3. Check at x = 6: 3 + 2 = 5, and 56 · 6 = 5.

Answer: 56x, also written 5x6. Adding the denominators instead, to get x5, is a mistake: at x = 6 it gives 65, not 5.

Combining every group in an expression

An expression may contain several groups of like terms, scattered among each other. It is still a sum: a term after a minus sign is the opposite of that term, added.⁠[4] The sum may be added in any order and with any grouping (Rational Numbers 1.4, Integers 2.5), so the like terms can be brought together and each group combined.⁠[5]

To combine like terms in a whole expression:

  1. Rewrite each subtraction as adding the opposite, so that every term carries its sign.
  2. Reorder the terms so that like terms stand together, by the commutative and associative laws of addition.⁠[6]
  3. Combine each group by the Theorem: add the coefficients, keep the variable part. A negative coefficient is added as a negative number.⁠[7]
  4. Write the result back with subtraction where a coefficient is negative, leaving out terms with coefficient 0. By convention, terms are written in decreasing powers of the variable, the constant term last.⁠[8]
Proposition .

The procedure gives an expression equivalent to the one it started from.

Proof.

Each step replaces a part by an expression that is equal to it for every value of the variables: subtracting is adding the opposite, the commutative and associative laws, and the Theorem on combining like terms. By the Theorem on replacing a part (lesson 1.4), each new expression is equivalent to the one before, and by the Proposition on chains of equivalences the last is equivalent to the first. No expression in the chain divides by a variable, so all of them have a value at every value of the variables.

Example (One variable and constants).

Simplify 5w − 8 + 3 − 9w + w.

  1. Terms with signs: 5w, −8, 3, −9w, w.
  2. Reorder: (5w + (−9w) + w) + (−8 + 3).
  3. Combine: (5 + (−9) + 1)w = −3w, and −8 + 3 = −5.
  4. Write back: −3w − 5.
  5. Check at w = 2: 10 − 8 + 3 − 18 + 2 = −11, and −6 − 5 = −11.

Answer: −3w − 5.

Example (Squares, first powers and constants).

Simplify −3k² + 8k − 1 + 5k² − 2k.

  1. Groups: k² terms −3k² and 5k²; k terms 8k and −2k; the constant −1.
  2. Combine: (−3 + 5)k² = 2k²; (8 − 2)k = 6k; −1 stays.
  3. Write in decreasing powers: 2k² + 6k − 1.
  4. Check at k = −1: −3 − 8 − 1 + 5 + 2 = −5, and 2 − 6 − 1 = −5.

Answer: 2k² + 6k − 1.

Example (Two variables).

Simplify 4p − 3q + 2 − p + 6q − 9.

  1. p terms: 4p, −p, so (4 − 1)p = 3p.
  2. q terms: −3q, 6q, so (−3 + 6)q = 3q.
  3. Constants: 2 − 9 = −7.
  4. Check at p = 1, q = 2: 4 − 6 + 2 − 1 + 12 − 9 = 2, and 3 + 6 − 7 = 2.

Answer: 3p + 3q − 7. The terms 3p and 3q have the same coefficient but are unlike: they stay apart.

Example (A common mistake: the sign of a term).

Someone simplifies 10 − 3m − 2m to 10 − m. Find and correct the error.

  1. The terms are 10, −3m and −2m: both m terms are subtracted.
  2. (−3 + (−2))m = −5m. The error took the second term as +2m, getting (−3 + 2)m = −m.
  3. Check at m = 1: 10 − 3 − 2 = 5, and 10 − 5 = 5, but 10 − 1 = 9.

Answer: 10 − 5m. The sign in front of each term goes with it.

Game

Combine like terms

Round
1
Score
0
Streak
0

Combine the like terms: type the coefficient of each term of the result. Use a minus sign for a negative coefficient, and type 0 if the terms cancel.

x2 + x2 + 7x² + 4x² + 7x − 54x² − 1 − 1
x²+x+

What cannot be combined

Only like terms can be added into a single term:⁠[9] x + x², x + y and 7 + 2x are already as short as they can be. This is a theorem, not a convention: no single term is equivalent to them.

Proposition (unlike terms do not combine).
  1. x + x² is not equivalent to any single term in x: neither to a constant c nor to cxk for any number c and counting number k.
  2. x + y is not equivalent to any single term in x and y: a constant c, or c times a product of powers of x and of y.
Proof.

(1) Suppose a single term T had the same value as x + x² at every rational x. At x = 1, x + x² is 2, and the term is its coefficient c (every power of 1 is 1), so c = 2. At x = −1, x + x² is −1 + 1 = 0. But the term is 2 times a power of −1, which is 1 or −1 (Powers & Square Roots 1.4), or the constant 2; in every case it is not 0. This contradiction shows that no such term exists.

(2) In the same way, at x = y = 1 the sum is 2, so the coefficient is 2. At x = 1, y = −1 the sum is 0, while the term is 2 times powers of 1 and of −1, which is 2 or −2. Again a contradiction.

Example (Four common mistakes).

Each of these “simplifications” is wrong. Find a counterexample to each: (a) 2x + 3y = 5xy; (b) x + x² = x³; (c) 5x − 3x = 2; (d) 7 + 2x = 9x.

  1. (a) At x = 2, y = 1: 4 + 3 = 7, but 5 · 2 · 1 = 10. (At x = y = 1 both are 5: that value hides the error.)
  2. (b) At x = 2: 2 + 4 = 6, but 2³ = 8.
  3. (c) At x = 3: 15 − 9 = 6, not 2. The correct result is (5 − 3)x = 2x: the variable part stays.
  4. (d) At x = 0: 7 + 0 = 7, but 9 · 0 = 0. A constant and a term in x are unlike.

Answer: (a), (b) and (d) cannot be combined at all; (c) combines to 2x, not 2.

Looking ahead.

The next lessons of the unit build on this one. “Expanding with the distributive property” removes parentheses, after which like terms can often be combined; “Factoring out a common factor” reads the distributive law backwards on unlike terms; and “Simplifying expressions” puts all of these together. Combining like terms is the same use of the properties of operations that turns y + y + y into 3y.⁠[10]

Exercises

Exercise .

Combine: (a) 9n + 4n; (b) 3y − 10y; (c) −x − x; (d) 6ab − 6ba.

▸ Show solution

(a) (9 + 4)n = 13n. (b) (3 − 10)y = −7y. (c) −x − x = (−1 − 1)x = −2x. (d) 6ba = 6ab, so (6 − 6)ab = 0.

Exercise .

Simplify 8 − 2c + 5c − 11, and check your answer at one value.

▸ Show solution

The c terms: (−2 + 5)c = 3c; the constants: 8 − 11 = −3. Result: 3c − 3. Check at c = 1: 8 − 2 + 5 − 11 = 0, and 3 − 3 = 0.

Exercise .

Simplify u²2 − 3u + u²3 + 5u − 1.

▸ Show solution

u²2 + u²3 = (12 + 13)u² = 56u²; −3u + 5u = 2u; the constant is −1. Result: 56u² + 2u − 1. Check at u = 6: 18 − 18 + 12 + 30 − 1 = 41, and 30 + 12 − 1 = 41.

Exercise .

Which are correct for every value of the variables? Give a counterexample for each one that is not: (a) 4x + 4 = 8x; (b) 3a − a = 3; (c) −2t + 5t = 3t; (d) x² + x² = 2x²; (e) x² + x² = x⁴.

▸ Show solution

(a) Wrong: at x = 0, 4 · 0 + 4 = 4 but 8 · 0 = 0; 4x and 4 are unlike. (b) Wrong: 3a − a = 2a; at a = 1 the values are 2 and 3. (c) Right: (−2 + 5)t = 3t.

(d) Right: x² + x² = (1 + 1)x² = 2x². (e) Wrong: at x = 1 the left side is 2 and x⁴ is 1.

Exercise .

A baker sells c cakes at 7 dollars each on Monday and c cakes at 5 dollars each on Tuesday, and pays 12 dollars of stall rent on each day. Write the profit for the two days and simplify it.

▸ Show solution

Income: 7c on Monday and 5c on Tuesday. Rent: 12 dollars each day. Profit: 7c + 5c − 12 − 12 = (7 + 5)c − 24 = 12c − 24 dollars.

Check at c = 3: 21 + 15 − 24 = 12, and 36 − 24 = 12.

Exercise .

Prove that 3x + 2 is not equivalent to any single term in x.

▸ Show solution

Suppose a single term T in x had the value of 3x + 2 at every x. At x = 0 the sum is 2. A term cxk with k a counting number is 0 at x = 0, so T must be the constant 2. But at x = 1 the sum is 5, not 2. So no single term is equivalent to 3x + 2.

Exercise .

Prove that aX + bX + cX = (a + b + c)X for all rational a, b, c and every variable part X, using the Theorem on combining like terms.

▸ Show solution

By the associative law, aX + bX + cX = (aX + bX) + cX. By the Theorem, aX + bX = (a + b)X, so the sum is (a + b)X + cX, and by the Theorem again this is ((a + b) + c)X = (a + b + c)X. The same argument, one term at a time, works for any number of like terms.

Summary

  1. Like terms combine by the distributive law: aX + bX = (a + b)X and aX − bX = (a − b)X. Add or subtract the coefficients; keep the variable part.
  2. Coefficients 1 and −1 count (x + x = 2x), fractions combine as fractions (x/2 + x/3 = 5x/6), and like terms may cancel to 0.
  3. To combine every group in an expression: give each term its sign, bring like terms together, combine each group, and write the result in decreasing powers. Every step keeps the expression equivalent.
  4. Unlike terms cannot be combined: x + x², x + y and 7 + 2x are not equivalent to any single term. A check at one value catches most mistakes, but only the laws prove a simplification.

Sources

  1. 1.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 1, “Symbolic Expressions”, section “Polynomials and order of operations”, p. 21 (the whole topic: pp. 20–22).
    “we shall always collect them together by the use of the distributive law”
    Used for: terms with the same variable part are collected into one by the distributive law (p. 21).
  2. 2.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Identify and Combine Like Terms”), p. 33 (the whole topic: pp. 31–33).
    “If there are like terms in an expression, you can simplify the expression by combining the like terms.”
    Used for: replacing like terms by one term is called combining like terms, and it shortens (simplifies) an expression.
  3. 3.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Identify and Combine Like Terms”), p. 33 (the whole topic: pp. 31–33).
    “Add or subtract the coefficients and keep the same variable for each group of like terms.”
    Used for: to combine like terms, add or subtract the coefficients and keep the variable part.
  4. 4.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 1, “Symbolic Expressions”, section “Polynomials and order of operations”, p. 21 (the whole topic: pp. 20–22).
    “Recall yet again that we talk about both of the above expressions as a “sum” even in the presence of the terms”
    Used for: an expression with subtractions is still a sum: a term after a minus sign is its opposite, added (p. 21; Wu goes on: “−(257 × 25) = +{−(257 × 25)}”).
  5. 5.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Identify and Combine Like Terms”), p. 33 (the whole topic: pp. 31–33).
    “Rearrange the expression so like terms are together.”
    Used for: the like terms of an expression are brought together and each group is combined (the source’s steps: identify like terms; rearrange; add or subtract the coefficients).
  6. 6.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Foundations”, section 1.9, “Properties of Real Numbers” (“Use the Commutative and Associative Properties”), p. 148 (the whole topic: pp. 146–148).
    “In order to combine like terms in the next example, we will use the commutative property of addition to write the like terms together.”
    Used for: like terms are brought together by the commutative (and associative) laws of addition.
  7. 7.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 2, “The Language of Algebra”, section 2.2, “Evaluate, Simplify, and Translate Expressions” (“Simplify Expressions by Combining Like Terms”), p. 120 (the whole topic: pp. 119–120).
    “When any of the terms have negative coefficients, the procedure is the same, except that you have to subtract instead of adding to combine like terms.”
    Used for: terms with negative coefficients are combined in the same way.
  8. 8.
    H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).
    Chapter 1, “Symbolic Expressions”, section “Polynomials and order of operations”, p. 22 (the whole topic: pp. 22–24).
    “The terms are written in decreasing powers of the number x in question.”
    Used for: by convention, the terms are written in decreasing powers of the variable (p. 22, convention (iii)).
  9. 9.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Foundations”, section 1.6, “Add and Subtract Fractions” (“Add or Subtract Fractions with Different Denominators”, Example 1.83), p. 100 (the whole topic: pp. 99–100).
    “Remember, we can only add like terms: 24 and 5x are not like terms.”
    Used for: only like terms can be added into one term.
  10. 10.
    National Governors Association Center for Best Practices and Council of Chief State School Officers, “Common Core State Standards for Mathematics”, Common Core State Standards Initiative (2010).
    Section “Expressions and Equations, standard 6.EE.3 (p. 44)”. corestandards.org/wp-content/uploads/2023/09/Math_Standards1.pdf · open at the quoted passage.
    “apply properties of operations to y + y + y to produce the equivalent expression 3y.”
    Used for: combining like terms is a use of the properties of operations that produces an equivalent expression, as y + y + y = 3y.