Sub topic 3
Recognizing like terms
This chapter assumes you can evaluate algebraic expressions, work with negative integers, read exponents such as x^3, and use the distributive property. It also assumes you know what a term, a coefficient, and a degree are. Chapter 1 covered those.
Like terms are the basis of polynomial addition and subtraction. Both operations come down to finding like terms and combining them. If you misjudge which terms are alike, every later step is wrong.
What makes terms "like"
Two terms are like terms when they have the same variable part. The variable part is everything in the term except the numerical coefficient. It includes each variable and the exponent on each variable.
Only the coefficients may differ. This gives two conditions, and both must hold:
- The terms use the same variables.
- Each variable has the same exponent in both terms.
Here are some examples.
| Pair | Like terms? | Reason |
|---|---|---|
| 3x and 5x | Yes | Both have variable part x |
| 4x^2 and -7x^2 | Yes | Both have variable part x^2 |
| 3x and 3x^2 | No | Exponents differ (1 and 2) |
| 2x^2 and 2y^2 | No | Variables differ |
| 6xy and -xy | Yes | Both have variable part xy |
| 5xy and 5x | No | One has y, the other does not |
| 4 and -9 | Yes | Both are constants (no variable part) |
| 4 and 4x | No | One is a constant, the other is not |
The coefficient does not affect whether terms are like. In 3x and 3x^2 the coefficients match, but the terms are still unlike. In 4x^2 and -7x^2 the coefficients differ, and the terms are still like.
Constants are like terms with each other
A constant such as 4 or -9 has no variable. You can think of it as having the variable part x^0, which equals 1. Every constant therefore has the same variable part, so all constants are like terms with each other. They are not like terms with anything that contains a variable.
Order of variables does not matter
Multiplication is commutative, so xy and yx are the same variable part. The terms 3xy and 2yx are like terms. Writing variables in alphabetical order makes this easier to see.
Coefficients you cannot see
A term such as x has an unwritten coefficient of 1. A term such as -x has an unwritten coefficient of -1. Write these coefficients in your head, or on paper, before you combine anything. In x^2 - x^2 + 4x^2, the coefficients are 1, -1, and 4.
Why only like terms combine
Combining like terms is the distributive property run backward. Consider 3x + 5x. Both terms contain the factor x, so you can factor it out:
3x + 5x = (3 + 5)x = 8x
The same step works for any shared variable part. It cannot work when the variable parts differ. In 3x + 3x^2 there is no common variable part to factor out except x itself, and factoring leaves x(3 + 3x), which is not a simpler single term.
A substitution check shows the difference. Let x = 2.
- 3x + 5x = 6 + 10 = 16, and 8x = 16. They agree.
- 3x + 3x^2 = 6 + 12 = 18. The expression 6x^3 gives 48, and 6x^2 gives 24. Neither equals 18, so no single term replaces 3x + 3x^2.
You can think of unlike terms as different kinds of objects. Three apples plus five apples is eight apples. Three apples plus three apple crates is not a single count of anything.
Combining like terms: the procedure
Follow the same steps each time:
- Write the polynomial so each term has its sign attached.
- Group terms that share a variable part.
- Add the coefficients within each group. Keep the variable part unchanged.
- Write the result, usually in standard form.
Notice that the variable part and its exponent stay the same. When you add 3x^2 and 5x^2, you get 8x^2. You do not get 8x^4. Adding terms never adds exponents. Exponents are added only in multiplication, which later chapters cover.
Worked example 1
Simplify 4x^2 + 3x - 2x^2 + 7 - x + 5.
Sort the terms by variable part:
- x^2 terms: 4x^2 and -2x^2
- x terms: 3x and -x
- constants: 7 and 5
Add the coefficients in each group:
- 4 + (-2) = 2, giving 2x^2
- 3 + (-1) = 2, giving 2x
- 7 + 5 = 12
The result is 2x^2 + 2x + 12.
Worked example 2: more than one variable
Simplify 5xy + 2x^2 - 3xy + y^2 + x^2 - 4y^2.
- xy terms: 5xy and -3xy, which combine to 2xy
- x^2 terms: 2x^2 and x^2, which combine to 3x^2
- y^2 terms: y^2 and -4y^2, which combine to -3y^2
The result is 3x^2 + 2xy - 3y^2. Here x^2, xy, and y^2 all have degree 2, but they are three different variable parts, so none of them combines with another.
Worked example 3: terms that cancel
Simplify 6x^3 - 2x + 1 - 6x^3 + 2x + 4.
- x^3 terms: 6 + (-6) = 0
- x terms: -2 + 2 = 0
- constants: 1 + 4 = 5
A coefficient of 0 makes the whole term disappear, because 0 times any variable part is 0. The result is 5. Fully cancelling terms is common, and it can lower the degree of the answer. Here a degree 3 expression simplified to a constant.
Seeing the grouping in a diagram
The diagram shows how the terms from worked example 1 are sorted into groups, and how each group becomes one term.
Common errors
Combining terms with different exponents
Writing 3x + 4x^2 = 7x^3, or 7x^2, is the most frequent mistake. These terms are unlike, so the expression stays 4x^2 + 3x. A polynomial with several terms is often already as simple as it can be.
Dropping the sign of a term
In 5x - 8x, the second term is -8x, so the coefficient sum is 5 + (-8) = -3. The result is -3x. Always treat the sign to the left of a term as part of that term.
Forgetting the invisible 1
In 4x - x, the second coefficient is -1, not 0 and not missing. The result is 3x. Writing 4x - x = 4 is wrong.
Confusing xy with x + y
The term 2xy has variable part xy, which is a product. It is not like 2x or 2y. In 2xy + 3x, the two terms are unlike because one contains y.
Adding exponents when adding terms
Adding 2x^2 + 3x^2 gives 5x^2. The exponent stays 2. If you catch yourself writing x^4 after an addition, stop and check.
Checking by substitution
You can test a simplification by evaluating the original and the simplified polynomial at one value of the variable. The results must match.
Take worked example 1 and let x = 3.
- Original: 4(9) + 3(3) - 2(9) + 7 - 3 + 5 = 36 + 9 - 18 + 7 - 3 + 5 = 36
- Simplified: 2(9) + 2(3) + 12 = 18 + 6 + 12 = 36
Both give 36. A match does not prove the answer is right for every x, but a mismatch proves it is wrong. Avoid x = 0 and x = 1 for this check, because many wrong answers also agree at those values.
You can run the same check in code. This program groups terms by their variable part, using a dictionary keyed on the exponent, and then combines them.
from collections import defaultdict
def combine_like_terms(terms):
# Each term is (coefficient, exponent) for a single-variable polynomial.
totals = defaultdict(int)
for coefficient, exponent in terms:
totals[exponent] += coefficient
# Drop terms whose coefficients cancelled to zero, highest exponent first.
return [(c, e) for e, c in sorted(totals.items(), reverse=True) if c != 0]
def evaluate(terms, x):
return sum(c * x**e for c, e in terms)
# 4x^2 + 3x - 2x^2 + 7 - x + 5
original = [(4, 2), (3, 1), (-2, 2), (7, 0), (-1, 1), (5, 0)]
simplified = combine_like_terms(original)
print(simplified) # [(2, 2), (2, 1), (12, 0)]
print(evaluate(original, 3)) # 36
print(evaluate(simplified, 3)) # 36The dictionary key is the exponent, which is the entire variable part when there is one variable. Terms with the same key are like terms, so their coefficients are added.
Summary of the rules
- Like terms have identical variable parts, including exponents.
- Coefficients may be any numbers, and they do not affect whether terms are like.
- All constants are like terms with each other.
- Combining adds the coefficients and keeps the variable part unchanged.
- A coefficient of 0 removes the term.
- Substituting a value, such as x = 3, tests the result.
Exercise
Simplify 7x^3 - 2x^2 + x - 4x^3 + 5x^2 - x + 9. Then check the result by substituting x = 2.
Show answer
Group by variable part. The x^3 terms: 7 - 4 = 3, giving 3x^3. The x^2 terms: -2 + 5 = 3, giving 3x^2. The x terms: 1 + (-1) = 0, so they cancel. The constant is 9. The result is 3x^3 + 3x^2 + 9. Check at x = 2: the original is 7(8) - 2(4) + 2 - 4(8) + 5(4) - 2 + 9 = 56 - 8 + 2 - 32 + 20 - 2 + 9 = 45. The simplified form is 3(8) + 3(4) + 9 = 24 + 12 + 9 = 45. They match.
Exercise
Which pairs are like terms? (a) 6ab and -ab, (b) 3x^2y and 3xy^2, (c) 8 and 8x, (d) 2yx and 5xy. For each like pair, write the combined term.
Show answer
(a) Like. Both have variable part ab, and 6 + (-1) = 5, giving 5ab. (b) Not like. The exponents of x and y are swapped, so the variable parts x^2y and xy^2 differ. (c) Not like. The constant 8 has no variable. (d) Like. Multiplication is commutative, so yx = xy, and 2 + 5 = 7, giving 7xy.
Exercise
A student simplifies 5x^2 + 3x as 8x^3. Explain both errors and give the correct result.
Show answer
The terms 5x^2 and 3x are unlike, because their exponents differ (2 and 1), so they cannot be combined. The student also added the exponents, which is not how addition works. Adding like terms adds coefficients and leaves the exponent unchanged. The expression 5x^2 + 3x is already fully simplified. A check at x = 1 fails to expose the error here, since 5 + 3 = 8 and 8x^3 = 8. At x = 2 the original gives 26 and 8x^3 gives 64, so the check shows the mismatch.