Sub topic 1
Terms, coefficients, and degree
Every operation on polynomials starts with reading the expression correctly. To add, subtract, or multiply, you need to split a polynomial into its terms. You also need to know which part of each term is the number, which part is the variable, and how large the exponent is. This chapter sets up that vocabulary and the rules for finding the degree. Later chapters rely on all of it.
Prerequisites
This chapter assumes you can already do the following:
- Evaluate an algebraic expression, such as finding the value of 3x² − 2 when x = 4.
- Do integer arithmetic, including negative numbers.
- Read an exponent such as x³ as "x multiplied by itself three times."
- Apply the distributive property of multiplication over addition. This is used in later chapters more than here.
The anatomy of a term
A term is a single product of a number and zero or more variables, each raised to a whole-number power. Terms are separated by plus or minus signs. In the expression
4x³ − 2xy² + 7
there are three terms: 4x³, −2xy², and 7.
Each term has up to three parts:
- The coefficient is the numeric factor. In 4x³ it is 4. In −2xy² it is −2.
- The variables are the letters, such as x and y.
- The exponents are the powers on the variables.
Details that cause mistakes
The sign in front of a term belongs to that term. In 5x² − 3x, the second term is −3x, so its coefficient is −3. This is why subtraction can be rewritten as adding a negative term.
Some coefficients are hidden:
- In x², the coefficient is 1, because x² means 1·x².
- In −x², the coefficient is −1.
- A variable with no written exponent has exponent 1, so 6x means 6x¹.
- A term with no variable is a constant term. In 4x³ − 2xy² + 7, the constant term is 7. You can think of a constant as having the variable raised to the power 0, since x⁰ = 1.
A term that is missing from a polynomial has coefficient 0. The polynomial x³ + 2 has no x² or x term, which means those coefficients are 0. This matters later when you line up coefficients to add polynomials.
What counts as a polynomial
A monomial is a term in which every variable has a non-negative whole-number exponent. A polynomial is a monomial or a sum of monomials. Special names exist for small cases: a binomial has two terms and a trinomial has three.
The restriction on exponents is what rules expressions out. The table below shows which expressions are polynomials.
| Expression | Polynomial? | Reason |
|---|---|---|
| 3x² − 5x + 1 | Yes | All exponents are whole numbers. |
| 9 | Yes | A constant is a monomial of degree 0. |
| 2x⁻¹ + 4 | No | The exponent −1 is negative. |
| 5/x | No | This is 5x⁻¹, so the variable is in a denominator. |
| √x + 2 | No | √x is x^(1/2), a fractional exponent. |
| x/4 + 1 | Yes | Dividing by the number 4 is multiplying by the coefficient 1/4. |
The last row shows a common point of confusion. A number in a denominator is fine, because it is just a fractional coefficient. A variable in a denominator is not allowed.
The degree of a term
The degree of a term is the sum of the exponents on its variables.
- 4x³ has degree 3.
- 6x has degree 1.
- 7 has degree 0.
- −2xy² has degree 1 + 2 = 3, because x has exponent 1 and y has exponent 2.
- 3x²y³ has degree 2 + 3 = 5.
For terms with several variables, add the exponents. Do not take the largest one. The coefficient never affects the degree.
The degree of a polynomial
The degree of a polynomial is the highest degree among its terms that have a nonzero coefficient. For 4x³ − 2xy² + 7, the term degrees are 3, 3, and 0. The polynomial's degree is 3.
Two terms can tie for the highest degree, as they do here. That is fine. The degree is still 3.
Simplify before you read the degree
The phrase "nonzero coefficient" is important. Consider
5x² − 5x² + x
If you read the exponents without simplifying, you might say the degree is 2. But the two x² terms cancel, leaving just x, which has degree 1. Combine like terms first, then find the degree.
Special cases
- A nonzero constant such as 9 has degree 0.
- The zero polynomial, written 0, has no nonzero terms, so it has no degree. Textbooks usually call its degree undefined. Some use −∞ so that degree rules about products still hold.
- A polynomial's degree does not depend on the order in which terms are written. 7 + 4x³ and 4x³ + 7 both have degree 3.
Names by degree
Polynomials in one variable are often named by degree. The leading term is the term of highest degree, and the leading coefficient is its coefficient.
| Degree | Name | Example | Leading coefficient |
|---|---|---|---|
| 0 | Constant | 8 | 8 |
| 1 | Linear | 2x − 5 | 2 |
| 2 | Quadratic | −x² + 3x | −1 |
| 3 | Cubic | 4x³ + x − 9 | 4 |
| 4 | Quartic | x⁴ − 1 | 1 |
In the quadratic row, −x² + 3x has leading coefficient −1, not 1. The negative sign is part of the coefficient.
Computing the degree in code
The next function stores each term as a coefficient and a dictionary of exponents. It combines like terms first, drops zero coefficients, and then takes the largest total exponent. This follows the same order you should use by hand.
def degree(terms):
# terms is a list of (coefficient, {variable: exponent}) pairs.
combined = {}
for coeff, powers in terms:
# Build a key that identifies the variable part of the term.
key = tuple(sorted((v, e) for v, e in powers.items() if e != 0))
combined[key] = combined.get(key, 0) + coeff
# Keep only terms whose coefficient is not zero after combining.
degrees = [sum(e for _, e in key) for key, c in combined.items() if c != 0]
return max(degrees) if degrees else None # None stands for the zero polynomial
p = [(4, {"x": 3}), (-2, {"x": 1, "y": 2}), (7, {})]
print(degree(p)) # 3
q = [(5, {"x": 2}), (-5, {"x": 2}), (1, {"x": 1})]
print(degree(q)) # 1, because the x^2 terms cancel
print(degree([(0, {"x": 4})])) # None, the zero polynomialThe second example shows why the function combines terms before measuring. If it measured first, it would report 2 for q.
Common errors
- Dropping the sign. In 3x² − 4x, the coefficient of the x term is −4, not 4.
- Forgetting the hidden 1. The coefficient of −x³ is −1. Missing this causes sign errors during subtraction.
- Reading degree from the first term. The degree comes from the highest-degree term, wherever it appears. In 5 + 2x + x⁴, the degree is 4.
- Using the largest exponent in a multi-variable term. The degree of 3x²y³ is 5, not 3.
- Counting terms that cancel. Simplify before deciding the degree.
- Counting the coefficient as part of the degree. The degree of 8x is 1, not 8.
Where this leads
The next chapter puts terms in a standard order, from highest degree to lowest. After that, you will group like terms, which are terms with identical variable parts. Both depend on being able to name the coefficient and degree of each term quickly.
Exercise
For the polynomial 6x²y − x⁴ + 3xy + 10, list the coefficient and degree of each term. Then give the degree of the polynomial and its leading coefficient. Treat x⁴ as the term −x⁴.
Show answer
The terms are 6x²y (coefficient 6, degree 2 + 1 = 3), −x⁴ (coefficient −1, degree 4), 3xy (coefficient 3, degree 1 + 1 = 2), and 10 (coefficient 10, degree 0). The highest term degree is 4, so the polynomial has degree 4. The leading term is −x⁴, so the leading coefficient is −1.
Exercise
Which of these are polynomials: (a) 2x³ − x/5, (b) 4/x + 1, (c) x² + √x, (d) 12? For each polynomial, give its degree.
Show answer
(a) is a polynomial of degree 3, because dividing by the number 5 only makes the coefficient −1/5. (b) is not a polynomial, because x is in a denominator. (c) is not a polynomial, because √x is x^(1/2). (d) is a polynomial, a nonzero constant of degree 0.
Exercise
What is the degree of 7x³ + 2x − 7x³ + 4? Explain why reading the first term gives the wrong answer.
Show answer
The two 7x³ terms cancel, leaving 2x + 4, so the degree is 1. Reading the first term suggests degree 3, but that term has a coefficient of zero after combining like terms, so it does not count.