TExcelTAD
Home › Algebra › Algebra Terminology

Algebra Terminology

Algebra has a small vocabulary that every later lesson relies on: terms, coefficients, constants, factors, degree and a few more. Knowing the exact words makes instructions like "combine like terms" or "factor out the coefficient" mean something precise. This lesson defines them on one running example and shows how SymPy can pull each part out of an expression.

Anatomy of an expression

Take the expression

5x2−3xy+7y−45x^2 - 3xy + 7y - 4
Word Meaning In the example
Term a part separated by ++ or −- (the sign belongs to the term) 5x25x^2, −3xy-3xy, 7y7y, −4-4
Variable a letter that stands for a number xx, yy
Coefficient the number multiplying the variables in a term 5, −3, 7
Constant a term with no variable −4
Factor something multiplied in a term in −3xy-3xy: −3, xx and yy
Exponent / power the small raised number the 2 in x2x^2
Degree of a term sum of the exponents of its variables 5x25x^2: 2, −3xy-3xy: 1+1=21 + 1 = 2, 7y7y: 1, −4-4: 0
Degree of the expression the highest degree of any term 2
Like terms terms with exactly the same variables and powers 4x24x^2 and −x2-x^2 are like; x2x^2 and xx are not

Note: A term written as just xx has coefficient 1, and −y-y has coefficient −1. The 1 is invisible but it is there.

Expressions get names from their number of terms: a monomial has one term (7x37x^3), a binomial two (x+5x + 5), a trinomial three (x2−2x+1x^2 - 2x + 1). Any sum of such terms with whole-number exponents is a polynomial, the subject of the Polynomials section.

Terms versus factors

The distinction between terms and factors is the most important one in this lesson.

  • Terms are added. In x+6x + 6, xx and 6 are terms.
  • Factors are multiplied. In 6x6x, 6 and xx are factors. In 3(x+2)3(x + 2), the factors are 3 and (x+2)(x + 2).

Why it matters: you may cancel a common factor from a fraction, as in 6x3=2x\frac{6x}{3} = 2x, but you may not cancel part of a term: x+63\frac{x + 6}{3} is not x+2x + 2. Most fraction mistakes in algebra come from mixing these up.

python · try it yourself
x = 9
print((x + 6) / 3)     # the real value
print(x + 2)           # the wrong "cancellation"
print(6 * x / 3, 2 * x)  # cancelling a factor is fine
5.0
11
18.0 18

Pulling the parts out with SymPy

SymPy knows this vocabulary. Add.make_args lists the terms, .coeff() reads a coefficient and degree gives the degree:

python · try it yourself
from sympy import symbols, Add, Poly, degree

x, y = symbols("x y")
e = 5*x**2 - 3*x*y + 7*y - 4

print("terms:", Add.make_args(e))
print("coefficient of x**2:", e.coeff(x, 2))
print("coefficient of x*y:", e.coeff(x*y))
print("constant:", e.as_coeff_add()[0])
print("degree:", Poly(e, x, y).total_degree())
print("degree in x only:", degree(e, x))
terms: (-4, 5*x**2, 7*y, -3*x*y)
coefficient of x**2: 5
coefficient of x*y: -3
constant: -4
degree: 2
degree in x only: 2

SymPy stores terms in its own internal order, so the list does not match the order we wrote them in; the terms themselves are the same.

Equations, identities and solutions

Word Meaning Example
Equation a statement that two expressions are equal 2x+1=92x + 1 = 9
Solution / root a value that makes the equation true x=4x = 4
Identity an equation true for every value 2(x+1)=2x+22(x + 1) = 2x + 2
Contradiction an equation true for no value x+1=x+2x + 1 = x + 2
Formula an equation linking named quantities A=πr2A = \pi r^2

In software

The same words appear in code. A polynomial in a physics engine is stored as an array of coefficients, [−4, 0, 5] for 5x2−45x^2 - 4. A compiler's parser splits a + b*c into terms joined by ++ and factors joined by ×\times, which is precisely how it knows to multiply first. And a regression model's output w1x1+w2x2+bw_1 x_1 + w_2 x_2 + b is a sum of terms whose coefficients are the learned weights.

Exercises

Exercise 1: Name the parts

In 8a3−a+128a^3 - a + 12, list the terms, the coefficients, the constant and the degree.

Answer

Terms 8a38a^3, −a-a, 12; coefficients 8 and −1; constant 12; degree 3.

Solution

The terms are separated by ++ and −-, and each keeps its sign. The coefficient of −a-a is −1 (the 1 is invisible). The highest exponent is 3, so the degree is 3.

Exercise 2: Like terms

Which of these are like terms with 4xy24xy^2: (a) −xy2-xy^2, (b) 4x2y4x^2y, (c) 9y2x9y^2x, (d) 4xy4xy?

Answer

(a) and (c)

Solution

Like terms need the same variables with the same powers: x1y2x^1y^2. (a) is x1y2x^1y^2. (c) is y2x=xy2y^2x = xy^2 (multiplication order does not matter). (b) is x2yx^2y and (d) is xyxy, so they differ.

Exercise 3: Term or factor?

Is the following simplification right? 4x+84=x+8\frac{4x + 8}{4} = x + 8. If not, give the correct result.

Answer

No. The correct result is x+2x + 2.

Solution

Only part of the numerator was divided. Every term must be divided, or equivalently factor first:

4x+84=4(x+2)4=x+2\frac{4x + 8}{4} = \frac{4(x + 2)}{4} = x + 2

Check with x=1x = 1: 4+84=3\frac{4 + 8}{4} = 3 and 1+2=31 + 2 = 3, while 1+8=91 + 8 = 9.

Exercise 4: Degree with code

Use SymPy to find the total degree of 3x2y3−2x4+xy3x^2y^3 - 2x^4 + xy.

Answer

5

Solution

The degrees of the terms are 2+3=52 + 3 = 5, 4 and 1+1=21 + 1 = 2. The highest is 5.

python · try it yourself
from sympy import symbols, Poly
x, y = symbols("x y")
print(Poly(3*x**2*y**3 - 2*x**4 + x*y, x, y).total_degree())
5

Test yourself

What is the coefficient of the term −y-y in 3x−y+23x - y + 2?

  1. 0
  2. 1
  3. −1
  4. 2

What is the degree of 4x3y2+x44x^3y^2 + x^4?

  1. 5
  2. 4
  3. 3
  4. 9

In 7(x−1)7(x - 1), what are 7 and (x−1)(x - 1)?

  1. Terms
  2. Coefficients
  3. Constants
  4. Factors