Polynomial Rings
You have added and multiplied polynomials since school:
(x + 1)(x - 1) = x^2 - 1. What you were quietly doing is
arithmetic in a ring. Take any ring
R — the integers, the reals, the clock ring
\mathbb{Z}_n, anything with a "plus" and a "times" — and build from it a
new ring whose elements are polynomials with coefficients drawn from
R. This ring is written R[x], read
"R adjoin x," and it is one of the great
factories of algebra: feed it a ring and it hands you back a bigger one.
The symbol x here is not a number waiting to be plugged in. It is a
formal indeterminate — a placeholder that never gets a value, a peg on which to hang
the coefficients. A polynomial in R[x] is really just its list of
coefficients (a_0, a_1, a_2, \dots), eventually all zero, and the powers of
x are bookkeeping that tells addition and multiplication how to line the
lists up. This single shift — from "polynomial as a function" to "polynomial as a formal object" — is
what makes R[x] a ring in its own right, and it is the whole point of this
page.
By the end you will know exactly how to add and multiply in R[x], why the
degree of a product usually adds but can mysteriously collapse when
R has zero divisors, which polynomials are invertible, and how — when the
coefficients form a field — the school polynomial long division
upgrades into a bona-fide division algorithm.
Building R[x]
An element of R[x] is a formal sum
f = a_0 + a_1 x + a_2 x^2 + \cdots + a_n x^n, \qquad a_i \in R,
with only finitely many nonzero coefficients. Two of them are added the way you would hope —
coefficient by coefficient, matching up equal powers of
x:
\Big(\textstyle\sum_i a_i x^i\Big) + \Big(\textstyle\sum_i b_i x^i\Big)
= \sum_i (a_i + b_i)\, x^i .
Multiplication is the interesting one. You multiply every term against every term and collect powers,
which is exactly the distributive law applied over and over. The coefficient of
x^k in the product gathers every way two exponents can add to
k — the convolution (or Cauchy product):
\Big(\textstyle\sum_i a_i x^i\Big)\Big(\textstyle\sum_j b_j x^j\Big)
= \sum_k c_k x^k, \qquad c_k = \sum_{i + j = k} a_i b_j
= a_0 b_k + a_1 b_{k-1} + \cdots + a_k b_0 .
Grinding through the axioms, these two operations make R[x] a ring: addition
is an abelian group (the zero polynomial is 0, negatives negate every
coefficient), multiplication is associative, and distributivity holds because it held term by term in
R. Two properties are simply inherited from
R: if R is commutative then so is
R[x] (because a_i b_j = b_j a_i inside every
convolution sum), and if R has a unity 1 then the
constant polynomial 1 is the unity of R[x].
Multiplying in \mathbb{Z}[x]
Let us run the convolution once, slowly. In \mathbb{Z}[x] take
f = 2x^2 + 3x + 1, \qquad g = x + 4 .
Distribute g across each term of f, then collect
equal powers:
\begin{aligned}
fg &= (2x^2)(x) + (2x^2)(4) + (3x)(x) + (3x)(4) + (1)(x) + (1)(4) \\
&= 2x^3 + 8x^2 + 3x^2 + 12x + x + 4 \\
&= 2x^3 + 11x^2 + 13x + 4 .
\end{aligned}
Notice the top term: 2 \cdot 1 = 2 times
x^{2}\cdot x = x^{3}. The leading coefficient of the
product is the product of the leading coefficients, and the degree of the product is
2 + 1 = 3 — the degrees added. Hold that thought; it is a theorem in
disguise, and it has a catch.
Degree and the laws it obeys
The degree \deg f is the highest power of
x carrying a nonzero coefficient; that top coefficient is the
leading coefficient. (By convention the zero polynomial has degree
-\infty, so the rules below never lie.) Degree turns vague talk about "size"
of a polynomial into something you can compute with.
Let R be a commutative ring with unity and form
R[x]. Then:
-
Sum degree. \deg(f + g) \le \max(\deg f, \deg g), with
equality whenever \deg f \neq \deg g (the higher term has
nothing to cancel against).
-
Product degree. \deg(fg) \le \deg f + \deg g always,
and \deg(fg) = \deg f + \deg g exactly when the two leading
coefficients do not multiply to 0 — in particular whenever
R is an integral domain.
-
Domain in, domain out. If R is an integral domain then
so is R[x]: a product of nonzero polynomials has nonzero leading
coefficient, hence is nonzero.
-
Units. If R is a domain, the units of
R[x] are exactly the constant polynomials that are units of
R. No polynomial of degree \ge 1 is
invertible — its inverse would need negative degree.
The last two bullets are why R[x] feels so much like
\mathbb{Z}. In \mathbb{Z}[x] the only units are
\pm 1 — the same as in \mathbb{Z} — because
multiplying by any real polynomial of positive degree only raises the degree, and you can
never climb back down to the constant 1. Adjoining
x gives you infinitely many new elements but not a single new unit.
The rule \deg(fg) = \deg f + \deg g is not a law of
nature — it needs the leading coefficients to have a nonzero product. Over an integral domain that is
automatic. Over a ring with zero divisors it can fail spectacularly. Work in
\mathbb{Z}_4[x] (coefficients mod 4) and square
2x + 1:
(2x + 1)^2 = 4x^2 + 4x + 1 \equiv 0\cdot x^2 + 0\cdot x + 1 = 1 \pmod 4 .
A degree-1 polynomial squared to a constant! Even starker,
(2x)(2x) = 4x^2 = 0 in \mathbb{Z}_4[x]: two
nonzero polynomials whose product is the zero polynomial. So
\mathbb{Z}_4[x] is not an integral domain, and
2x + 1 is a genuine unit of positive-looking degree (it is
its own inverse). The moral: every clean statement about degree secretly assumes the coefficient ring
has no zero divisors. Check that hypothesis before you trust the arithmetic.
When the coefficients form a field: the division algorithm
Something special happens the moment the coefficients come from a field
F — like \mathbb{Q},
\mathbb{R}, \mathbb{C} or
\mathbb{Z}_p for prime p. Because every nonzero
leading coefficient is now invertible, you can always divide.
For any f, g \in F[x] with g \neq 0, there are
unique polynomials q (quotient) and
r (remainder) with
f = q\,g + r, \qquad \deg r < \deg g \ \text{ (or } r = 0\text{).}
This is exactly the long
division you already know, now guaranteed to terminate with a strictly smaller remainder.
For instance, in \mathbb{Q}[x], dividing
f = x^3 - 2x + 1 by g = x - 1:
x^3 - 2x + 1 = (x^2 + x - 1)(x - 1) + 0 ,
so the remainder is 0 and x = 1 is a root — no
surprise, since f(1) = 1 - 2 + 1 = 0. Divide instead by
x - 2 and you get a nonzero remainder:
x^3 - 2x + 1 = (x^2 + 2x + 2)(x - 2) + 5, \qquad \text{and indeed } f(2) = 5 .
That "remainder equals the value" pattern is the Remainder Theorem, and it comes free
from the division algorithm. A degree-lowering division like this is the beating heart of a
Euclidean domain: because remainders always shrink, you can run Euclid's algorithm on
polynomials to find greatest common divisors, just as with integers. So F[x]
is not merely a domain — it is one of the best-behaved rings there is. (We build that story out on its
own page.)
Roots, values, and the evaluation homomorphism
Even though x is formal, you are still allowed to substitute a
value and see what a polynomial does. Fixing an element c \in R, the map
\operatorname{ev}_c : R[x] \to R, \qquad f \longmapsto f(c)
that replaces x by c is a
ring homomorphism: it respects both operations,
(f+g)(c) = f(c) + g(c) and
(fg)(c) = f(c)\,g(c). This evaluation homomorphism is the bridge
between the formal world of coefficient-lists and the numerical world of values, and its kernel — the
polynomials that vanish at c — is precisely the multiples of
x - c.
The chart below plots two honest real polynomials from
\mathbb{R}[x] — a cubic and a quadratic — and lets you slide the quadratic's
leading coefficient. Watch its degree stay put at 2 for
every nonzero setting, while at the single value a = 0 the parabola
flattens into a line and the degree suddenly drops — a visual echo of the collapse rule.
Over an infinite ring like \mathbb{R} you can get away with sloppiness:
two polynomials agree as functions if and only if they are equal coefficient-for-coefficient. But over
a finite ring the two notions split apart. In
\mathbb{Z}_2[x] consider
x^2 + x. Plug in the only two elements:
0^2 + 0 = 0 and 1^2 + 1 = 1 + 1 = 0. As a
function it is identically zero — indistinguishable from the polynomial
0. Yet as a formal polynomial
x^2 + x has degree 2 and is emphatically not the
zero polynomial.
If we defined R[x] as "polynomial functions" we would be forced to declare
these two equal and the whole degree theory would rot. Insisting that x is a
formal indeterminate — that a polynomial is its coefficient list — keeps
x^2 + x and 0 distinct, exactly as they must be
for \mathbb{Z}_2[x] to be an infinite ring. Form first, values second.
Nothing stops you feeding R[x] back into the factory. A polynomial in two
variables is just a polynomial in y whose coefficients are themselves
polynomials in x:
R[x, y] := (R[x])[y] = R[x][y] .
So 3x^2 y + xy + y + 5x is read as
(3x^2 + x + 1)\,y + (5x), a degree-1 polynomial in
y over the ring R[x]. Iterating gives
R[x_1, \dots, x_n], the coordinate ring at the foundation of algebraic
geometry.
And if you drop the "finitely many nonzero coefficients" rule and allow infinite tails, you
get the ring of formal power series R[[x]], with the same
convolution product (each coefficient is still a finite sum). Curiously, in
R[[x]] far more elements are units — a power series is invertible exactly
when its constant term is a unit of R, e.g.
(1 - x)^{-1} = 1 + x + x^2 + \cdots. Adjoining
x two different ways gives two very different rings.