Chapter status:   👷   in progress   👷

TODO:

Polynomials

In this chapter, we cover general results about polynomials with coefficients in a ring.

We recall some abbreviations from the chapter about rings:

  • UCR stands for unitary commutative ring,
  • PID stands for principal ideal domain,
  • UFD stands for unique factorization domain.

Contents

Generalities

Let be a ring. A (univariate) polynomial with coefficients in is an infinite sequence such that for all but a finite number of indices Polynomials are traditionally denoted where is a symbol called indeterminate.

The set of all univariate polynomials over is denoted

Polynomials can be added:

Polynomials can also be multiplied:

Proposition 7.1. Let be a ring. Then equipped with operations and as defined above is a ring. If is commutative, then so is and if has a unity 1, then the constant polynomial is the unity of

The set is called the polynomial ring in over If we embed into by identifying with the constant polynomial then is a subring of

The degree of a polynomial is the largest power of occurring in with a non-zero coefficient, with the convention that polynomial has degree Hence, has degree provided We let denote the degree of a polynomial and denote the set of polynomials over of degree at most The leading term of is its highest degree term and the leading coefficient is If the leading coefficient is 1 then the polynomial is said to be monic.

We will often drop the indeterminate from the notation, simply writing "polynomial ", keeping it mostly when writing the polynomial coefficients explicitly as in

Proposition 7.2. Let be a ring and let and be two polynomials in Then Moreover, if the leading coefficient of either or is not a zero divisor, then

Proof

The first two inequalities follow straightforwardly from the definition of addition and multiplication in For the last part of the proposition, assume that has leading term and has leading term with and Then has leading term with as otherwise and would be zero divisors. Hence,

On the other hand, when has zero divisors, then one might have if the leading terms of and are and with

When the coefficients are in an integral domain, we have additional properties.

Proposition 7.3. Let be an integral domain. Then

  • is an integral domain;
  • for any polynomials
  • the units of are the constant polynomials for

Proof

Let and be two non-zero polynomials in If has leading term and has leading term with and then has leading term with since is an integral domain. Hence, is not the zero polynomial. This also shows that Clearly, for any unit the constant polynomial is a unit with inverse the constant polynomial Conversely, if polynomials and are such that then (by the second point) necessarily i.e., and are constant polynomials, and by definition these constants are units of

Divisibility in Polynomial Rings

All definitions regarding divisibility that we gave for general rings apply to polynomial rings. We restate these definitions here for convenience.

Let be a UCR. Given two polynomials and in we say that divides or that is a factor of or that is a multiple of denoted if there exists a polynomial such that

Proposition 7.4. Let be a UCR and be a non-zero polynomial. Then for every such that the leading coefficient of is not a zero divisor, In particular, this always holds when is an integral domain.

Proof

Let be a polynomial dividing By definition, there exists such that Since the leading coefficient of is not a zero divisor, by Proposition 7.2, Note that cannot be the zero polynomial as this would imply hence and thus

It is easy to see that this proposition does not hold when the leading coefficient of is a zero divisor: for example, over and hence

Two polynomials and are said to be associates if and By [??], over an integral domain are associates if and only if there exists such that

In general, might not be Euclidean (as we will see shortly, this holds if and only if is a field). However, one can perform division with remainder for polynomials as soon as the leading coefficient of the divisor is a unit.

Proposition 7.5. Let be a UCR. Then for every polynomials such that the leading coefficient of is in (i.e., a unit), there exists unique polynomials and such that and

Proof

Consider the set of all polynomials of the form for Let be a polynomial of minimal degree in and be such that Let us show that Indeed, assume that this does not hold. Let and be the leading terms of and respectively, with and Consider the polynomial defined as Then Since the leading terms of and are both they cancel and the leading term of has degree at most so that contradicting the assumption that has minimal degree in Hence, which proves existence of a suitable pair

Let us show uniqueness. Assume that there exists two pairs of polynomials such that and Then Assume that Note that the leading coefficient of is a unit and hence, by [??], is not a zero divisor. Hence, by Proposition 7.2, where the last inequality holds because On the other hand, by Proposition 7.2, This is a contradiction and hence we must have and hence proving uniqueness.

Ring vs. Polynomial Ring: Summary

impl./equ.see
integral domainintegral domainProposition 7.3
UFDUFD
PID/EuclideanUFD
fieldPID/Euclidean

Polynomial Evaluation and Roots

Let be a commutative ring. Given a polynomial in and an element the evaluation of at written is The function from to mapping to is called the polynomial function associated with

In general, there is not a one-to-one correspondence between polynomials and polynomial functions. For example, over a finite commutative ring the polynomial evaluates to 0 at every element but is clearly different from the constant polynomial 0. Hence, this gives an example where two different polynomials yield the same polynomial function.

As wee will see below, if is an infinite integral domain, though, there is a one-to-one correspondence between polynomials and polynomial functions.

We say that is a root of if The following result gives an important sufficient and necessary condition for a ring element to be a root of a polynomial.

Theorem 7.1 (factor theorem). Let be a UCR, be a polynomial and be a ring element. Then is a root of if and only if divides

The factor theorem is actually a special case of the following result.

Theorem 7.2 (polynomial remainder theorem). Let be a UCR, be a polynomial and be ring elements. Then if and only if divides

Proof

Assume that divides Then there exists such that Evaluating the two sides of this equality at yields i.e.,

Conversely, assume that Since the leading coefficient of is a unit, by Proposition 7.5, there exists polynomials and such that where Hence, the polynomial must be a constant. Evaluating the polynomial equality at we obtain that Hence, which exactly means that divides

Note that the statement " divides " is equivalent to the statement " is the remainder of the division of by ", hence the name of the theorem.

The factor theorem (which holds over any UCR) generalizes to multiple roots naturally, however only over integral domains. (We will see how the polynomial remainder theorem generalizes to multiple evaluations in a moment.)

Theorem 7.3 (generalized factor theorem). Let be an integral domain, be a polynomial, and be distinct ring elements. Then are roots of if and only if divides

Proof

Assume that divides Then there exists such that which implies that

We will prove the converse by induction on The case is simply the factor theorem. Assume that the implication holds for and let us prove that it holds for Let and be distinct roots of Since is in particular a root of by the factor theorem, there exists such that Moreover, for every which implies that since and are distinct and has no zero divisors. Hence, are roots of which by the induction hypothesis implies that divides Since divides

This has an important consequence regarding the maximal number of roots of a polynomial.

Proposition 7.6. Let be an integral domain and let be a non-zero polynomial of degree Then has at most distinct roots in

Proof

This follows easily from the generalized factor theorem. Indeed, assume that has degree and has roots. Let denote the roots of Then divides a contradiction with Proposition 7.4 as a polynomial of degree cannot divide a non-zero polynomial of degree

Let us prove the proposition directly by induction on The result clearly holds for Let and assume that the result holds for degree Let be a polynomial of degree If has no root then the result holds again. Otherwise, assume that has a root Then, by the factor theorem, for some polynomial where, by Proposition 7.3, has degree If is a root of distinct from then which implies that since and has no zero divisors. Since has at most distinct roots by the induction hypothesis, has at most distinct roots.

This proposition allows us to reconsider the relation between polynomials and polynomial functions.

Proposition 7.7. Let be an integral domain and be a polynomial such that for every If is infinite, then is the zero polynomial.

Proof

Assume that is not the zero polynomial and let be the degree of Then, by Proposition 7.6, has at most distinct roots in a contradiction with the assumption that for every since is infinite. Hence, must be the zero polynomial.

Hence, over an infinite integral domain, if and are two polynomials such that for every then In other words, there is a one-to-one mapping between polynomials and polynomial functions. However, not every function from to is a polynomial function: for example, the function such that and for is not a polynomial since it has infinitely many roots yet it cannot be the function corresponding to the zero polynomial.

We can in fact be more precise with the following proposition.

Proposition 7.8. Let be an integral domain. Let be the ring homomorphism mapping a polynomial to the corresponding polynomial function. Then:

  1. If is finite, then is surjective but not injective.
  2. If is infinite, then is injective but not surjective.

Remark 7.1. Note that being infinite and being an integral domain are two necessary conditions. Over infinite rings with zero divisors, a non-zero polynomial may evaluate to zero over the entire ring. See here.

Lagrange Interpolation

In all the following, a set of distinct field elements will be called an evaluation domain (or simply domain) of size

Theorem 7.4 (Lagrange interpolation theorem). Let be a finite field and let be a set of pairs of field elements such that for Then there is a unique polynomial called the Lagrange interpolation polynomial for such that for every

Proof

Uniqueness is proved as follows: assume there exists two polynomials and interpolating the points. Then the polynomial has roots but has degree at most hence by Proposition 7.6 it must be the zero polynomial, which implies that

To establish existence, one introduces the Lagrange basis associated with the domain This is the tuple of polynomials of degree defined as One can easily check that Then the Lagrange interpolating polynomial for is given by This polynomial has degree at most and it is easy to see that for every

Note that the Lagrange basis associated with any domain is indeed a basis for the -vector space in the linear algebra sense. The coordinates of a polynomial in this basis are

A polynomial specified by a tuple such that is sometimes said to be in coefficients form, while when it is specified by the values it takes over some domain it is said to be in evaluation form. This is merely a change of basis.

Another way to look at Lagrange interpolation is as follows. Considering the coefficients of a polynomial of degree as unknowns, each evaluation yields a linear equation In matrix form, this yields The matrix on the left-hand side is called a Vandermonde matrix. It is invertible if and only if the 's are distinct, which gives another way to see that there is a unique polynomial of degree at most such that for every

Generalized Polynomial Remainder Theorem

Lagrange interpolation allows us to formulate a generalization of the polynomial remainder theorem. Given an evaluation domain the vanishing polynomial over denoted is the polynomial defined by It is such that for every but it is not the Lagrange interpolation polynomial for since it has degree (the Lagrange interpolation polynomial for is actually the zero polynomial).

Theorem 7.5 (generalized polynomial remainder theorem). Let be a polynomial, be an integer, be distinct field elements, and be field elements (not necessarily distinct). Let be the vanishing polynomial for and be the Lagrange interpolation polynomial for Then for every if and only if divides or equivalently if and only if is the remainder of the division of by

Proof

Assume that divides i.e., there exists such that Evaluating this equality at and using and implies that for every

Conversely, assume that for every Since is Euclidean, there exists polynomials and such that with Evaluating this equality at yields Since is necessarily the Lagrange interpolation polynomial for

For one exactly recovers the polynomial remainder theorem since for a single point the vanishing polynomial is and the Lagrange interpolation polynomial is simply the constant polynomial

Computational Aspects

Newton's method and Neville's algorithm have quadratic complexity.

The Barycentric Formula

Assume we are given a set of evaluations over domain One can consider various task related to the Lagrange interpolation polynomial for One is to compute the coefficients of this polynomial. Another is to evaluate on a field element

For the first task, one may be tempted to solve Eq. (7.1). However, this requires to invert a square matrix of size which requires field operations.

A very useful form for Lagrange interpolation is the so-called barycentric formula [BT04]. Let be the vanishing polynomial for and for let denote the barycentric weights defined as Note that the formal derivative of is hence one also has Then the -th polynomial of the Lagrange basis is from which it follows that the Lagrange interpolation polynomial for can be written as This is the barycentric Lagrange interpolation formula.

Based on this, here is how one can compute the coefficients of and evaluate on a point outside in quasilinear time:

  • compute the coefficients of using a divide-and-conquer approach (see here)
  • compute the coefficients of from the ones of (this requires multiplications)
  • compute using multipoint evaluation

See also this.

Once this is done, computing for takes linear time using

All in all, this yields an algorithm with complexity field operations.

The Special Case of Roots of Unity

The most favorable case from a computational point of view is when is the subgroup of consisting of -th roots of unity. Then the vanishing polynomial takes a very simple form, namely Its formal derivative is simply

Applications

An important application of Lagrange interpolation is Shamir's secret sharing.