Skip to content

Polynomial Rings

In this lesson you’ll learn to treat polynomials as ring elements rather than functions, use the division algorithm, connect roots to linear factors, and test polynomials for irreducibility. These are the tools that build finite fields two lessons from now.

In earlier courses a polynomial was a function you graphed. Here it is an element of a ring, and that shift matters.

For a ring RR, the polynomial ring R[x]R[x] consists of all expressions

anxn+an1xn1++a1x+a0,aiRa_nx^n + a_{n-1}x^{n-1} + \dots + a_1x + a_0, \qquad a_i \in R

with the usual addition and multiplication. Two polynomials are equal when their coefficients match, not when they agree as functions. Over F2\mathbb{F}_2 the polynomials x2+xx^2 + x and 00 take the same value at every element of the field, but they are different ring elements. Keeping this straight matters in finite fields.

Inheritance of structure:

  • RR commutative     \implies R[x]R[x] commutative
  • RR has unity     \implies R[x]R[x] has unity
  • RR an integral domain     \implies R[x]R[x] an integral domain

But R[x]R[x] is never a field, even when RR is: xx has no inverse, because deg(fg)=degf+degg\deg(fg) = \deg f + \deg g can’t be zero unless both factors are constants.

Over an integral domain, deg(fg)=degf+degg\deg(fg) = \deg f + \deg g. The reason is that the leading coefficients multiply to something nonzero. Over a ring with zero divisors this can fail: in Z4[x]\mathbb{Z}_4[x], (2x)(2x)=4x2=0(2x)(2x) = 4x^2 = 0, and the degrees don’t add at all.

Conventionally deg0\deg 0 is -\infty or left undefined, so the degree formula holds without exceptions.

If FF is a field and f,gF[x]f, g \in F[x] with g0g \ne 0, there are unique q,rF[x]q, r \in F[x] with

f=qg+r,degr<deggf = qg + r, \qquad \deg r < \deg g

This is long division of polynomials, and it works for the same reason it works for integers: repeatedly subtract a multiple of gg to kill the leading term.

The field hypothesis matters. The algorithm divides by gg‘s leading coefficient, which requires that coefficient to be invertible. Over Z\mathbb{Z} you cannot divide x2x^2 by 2x+12x + 1 and stay in Z[x]\mathbb{Z}[x].

Because of the division algorithm, F[x]F[x] is a Euclidean domain, so gcds exist, the Euclidean algorithm runs, and unique factorization into irreducibles holds. Polynomials over a field behave remarkably like the integers.

Factor theorem. For FF a field and fF[x]f \in F[x]: f(a)=0    (xa)ff(a) = 0 \iff (x - a) \mid f.

Proof: divide ff by xax - a. The remainder has degree less than 1, so it’s a constant cc, giving f=q(xa)+cf = q(x-a) + c. Substituting x=ax = a yields f(a)=cf(a) = c. So f(a)=0f(a) = 0 exactly when c=0c = 0. ∎

Substituting into f=q(xa)+cf = q(x-a) + c is also the remainder theorem: the remainder on dividing by xax - a is just f(a)f(a).

Corollary. A nonzero polynomial of degree nn over a field has at most nn roots. Each root removes a linear factor and drops the degree by one.

That corollary needs the field hypothesis. Over Z8\mathbb{Z}_8, x21x^2 - 1 has four roots, as an earlier lesson showed.

A non-constant fF[x]f \in F[x] is irreducible over FF if it cannot be written as a product of two polynomials of strictly smaller degree, both in F[x]F[x].

Irreducible polynomials play the role of primes. And crucially, irreducibility depends on the field:

  • x22x^2 - 2 is irreducible over Q\mathbb{Q}, since 2\sqrt2 is irrational.
  • Over R\mathbb{R} it factors as (x2)(x+2)(x - \sqrt2)(x + \sqrt2).
  • x2+1x^2 + 1 is irreducible over R\mathbb{R} but factors as (xi)(x+i)(x-i)(x+i) over C\mathbb{C}.

So “irreducible” is never a property of a polynomial alone. Always ask: over what?

Useful tests:

  • Degree 1 is always irreducible.
  • Degree 2 or 3: irreducible over FF exactly when it has no root in FF. A factorization would have to include a linear factor.
  • Degree 4 or more: no root does not imply irreducible. x4+4=(x22x+2)(x2+2x+2)x^4 + 4 = (x^2-2x+2)(x^2+2x+2) has no real root but factors over Q\mathbb{Q} into quadratics.
  • Rational root theorem: a root p/qp/q in lowest terms of an integer polynomial must have pa0p \mid a_0 and qanq \mid a_n. A finite list to check.
  • Eisenstein’s criterion: if a prime pp divides every coefficient except the leading one, and p2a0p^2 \nmid a_0, then the polynomial is irreducible over Q\mathbb{Q}.

Example 1: Divide f=x32x2+4f = x^3 - 2x^2 + 4 by g=x3g = x - 3 over Q\mathbb{Q}.

Solution. Long division.

x3÷x=x2x^3 \div x = x^2. Multiply: x33x2x^3 - 3x^2. Subtract: x2+4x^2 + 4.

x2÷x=xx^2 \div x = x. Multiply: x23xx^2 - 3x. Subtract: 3x+43x + 4.

3x÷x=33x \div x = 3. Multiply: 3x93x - 9. Subtract: 1313.

x32x2+4=(x3)(x2+x+3)+13x^3 - 2x^2 + 4 = (x-3)(x^2 + x + 3) + 13

Check with the remainder theorem: f(3)=2718+4=13f(3) = 27 - 18 + 4 = 13 ✓. Since the remainder is nonzero, x3x - 3 is not a factor.

Example 2: Is x33x1x^3 - 3x - 1 irreducible over Q\mathbb{Q}?

Solution. Degree 3, so it’s irreducible exactly when it has no rational root.

By the rational root theorem, candidates are ±1\pm 1.

f(1)=131=30,f(1)=1+31=10f(1) = 1 - 3 - 1 = -3 \ne 0, \qquad f(-1) = -1 + 3 - 1 = 1 \ne 0

No rational roots, so irreducible over Q\mathbb{Q}.

Over R\mathbb{R} it does factor, since every odd-degree real polynomial has a real root - that root is just irrational.

Example 3: Factor x4+4x^4 + 4 over Q\mathbb{Q}.

Solution. No rational roots (candidates ±1,±2,±4\pm1, \pm2, \pm4 all fail, and x4+4>0x^4 + 4 > 0 always). But degree 4 means a factorization into two quadratics is possible.

Complete a square:

x4+4=(x4+4x2+4)4x2=(x2+2)2(2x)2x^4 + 4 = (x^4 + 4x^2 + 4) - 4x^2 = (x^2+2)^2 - (2x)^2

Difference of squares:

=(x22x+2)(x2+2x+2)= (x^2 - 2x + 2)(x^2 + 2x + 2)

Reducible over Q\mathbb{Q} despite having no rational root. This is exactly why the “no root implies irreducible” shortcut stops at degree 3.

Example 4: Eisenstein’s criterion.

Show x4+6x3+12x2+18x+6x^4 + 6x^3 + 12x^2 + 18x + 6 is irreducible over Q\mathbb{Q}.

Solution. Try p=3p = 3. It divides 6,12,18,66, 12, 18, 6 - every coefficient except the leading 1. And 969 \nmid 6.

Eisenstein applies: irreducible over Q\mathbb{Q}.

The rational root theorem alone would have left the possibility of a quadratic-times-quadratic factorization open, and checking that by hand is tedious. Eisenstein settles it in one line.

Example 5: Factoring over a finite field.

Factor x2+x+1x^2 + x + 1 over F2\mathbb{F}_2, then over F3\mathbb{F}_3.

Solution. Over F2={0,1}\mathbb{F}_2 = \{0,1\}: f(0)=1f(0) = 1, f(1)=1+1+1=31f(1) = 1 + 1 + 1 = 3 \equiv 1. No roots, degree 2, so irreducible over F2\mathbb{F}_2.

Over F3={0,1,2}\mathbb{F}_3 = \{0,1,2\}: f(0)=1f(0) = 1, f(1)=30f(1) = 3 \equiv 0. A root.

So x1fx - 1 \mid f. Dividing gives f=(x1)(x+2)f = (x-1)(x+2) over F3\mathbb{F}_3. Check: (x1)(x+2)=x2+x2=x2+x+1(x-1)(x+2) = x^2 + x - 2 = x^2 + x + 1 since 21(mod3)-2 \equiv 1 \pmod 3

Same polynomial, irreducible over one field and reducible over another. The irreducible one over F2\mathbb{F}_2 is what builds the field GF(4)GF(4) two lessons from now.

Example 6: Degrees failing to add.

Show that deg(fg)=degf+degg\deg(fg) = \deg f + \deg g can fail in Z6[x]\mathbb{Z}_6[x].

Solution. Take f=2xf = 2x and g=3xg = 3x, both of degree 1.

fg=6x2=0 in Z6[x]fg = 6x^2 = 0 \text{ in } \mathbb{Z}_6[x]

The product is the zero polynomial, which has no degree at all, rather than degree 2.

The culprit is that Z6\mathbb{Z}_6 has zero divisors, so leading coefficients can multiply to zero. This also shows Z6[x]\mathbb{Z}_6[x] is not an integral domain, consistent with the rule that R[x]R[x] is a domain exactly when RR is.

Example 7: Greatest common divisor of polynomials.

Find gcd(x31,x21)\gcd(x^3 - 1, x^2 - 1) over Q\mathbb{Q}.

Solution. Euclidean algorithm.

x31=x(x21)+(x1)x^3 - 1 = x(x^2 - 1) + (x - 1) x21=(x+1)(x1)+0x^2 - 1 = (x+1)(x - 1) + 0

The last nonzero remainder is x1x - 1, so gcd=x1\gcd = x - 1.

Sanity check by factoring: x31=(x1)(x2+x+1)x^3 - 1 = (x-1)(x^2+x+1) and x21=(x1)(x+1)x^2 - 1 = (x-1)(x+1). The shared factor is x1x - 1

The algorithm works because Q[x]\mathbb{Q}[x] is a Euclidean domain, which is a direct consequence of the division algorithm.

Error-correcting codes. Reed–Solomon and BCH codes encode data as polynomial coefficients over a finite field, and the code is defined by which polynomials are divisible by a chosen generator. Decoding finds the error-locator polynomial and takes its roots, which are the positions of the corrupted symbols. Every QR code you scan performs polynomial division.

Cryptographic hashing. CRC checksums compute the remainder of a message polynomial divided by a fixed polynomial over F2\mathbb{F}_2. The generator polynomial is chosen for its factorization properties, and how many bit errors the CRC catches follows directly from those properties.

AES. The Advanced Encryption Standard works in GF(28)GF(2^8), built as F2[x]\mathbb{F}_2[x] modulo the irreducible polynomial x8+x4+x3+x+1x^8 + x^4 + x^3 + x + 1. Its MixColumns step is literally multiplication of polynomials with coefficients in that field.

Computer algebra and symbolic integration. Partial fraction decomposition needs the denominator factored into irreducibles over the relevant field, and the answer’s form depends on which field: a real factorization gives arctangent terms where a complex one gives logarithms.

Interpolation and graphics. Fitting a curve through n+1n+1 points is finding a degree-nn polynomial, and uniqueness follows from the at-most-nn-roots corollary. Bézier curves in every font renderer and drawing program are polynomial arithmetic.

Signal processing. A digital filter’s behaviour is determined by the roots of its transfer function’s polynomials, and stability is a statement about where those roots lie. Factoring the polynomial is designing the filter.

Why is ℚ[x] not a field, even though ℚ is?
What is the remainder when x³ − 2x² + 4 is divided by x − 3?
A degree-3 polynomial over a field is irreducible exactly when
Is x⁴ + 4 irreducible over ℚ?
The polynomial x² + x + 1 over 𝔽₂ is
Why does the division algorithm for polynomials require a field of coefficients?