5.5  Interpolation, Quotient Rings, and the Chinese Remainder Theorem

Section 5.4 proved a uniqueness statement: two polynomials of degree at most n that agree at n+1 distinct points are equal (Theorem 5.4.2 (a)). It said nothing about existence. Is there, for instance, a quadratic through the points (0,1), (1,3), (2,7)? This section builds one by a formula. It then reads the same question as three congruences. By Theorem 5.1.3 (a), “the value at c is y” says that f leaves the remainder y on division by x−c. So we look for f with f≡1(modx),f≡3(modx−1),f≡7(modx−2). Three congruences to coprime moduli: that is the Chinese remainder theorem of Number Systems: From N to R, Chapter 3 (Number Systems: From N to R, Theorem 3.5.3), with polynomials in place of integers. On the way we meet the classes modulo a polynomial m. They form a ring F[x]/⟨m⟩, and it is a field exactly when m is irreducible, as Z/pZ is a field exactly when p is prime.

Throughout, F is a field. “Polynomial” means an element of F[x] unless another field is named.

5.5.1. Polynomials through given points

The points at which values are prescribed are called nodes. Suppose the nodes are c0,…,cn∈F and the values y0,…,yn∈F. Fitting all the values at once is hard. Fitting one value while ignoring the others would be easy if we had, for each node ci, a polynomial that is 1 at ci and 0 at every other node: then y0 times the first, plus y1 times the second, and so on, has every value right. A polynomial that vanishes at the nodes cj with j≠i is a multiple of the product of the factors x−cj (Theorem 5.4.1); the simplest is that product itself. Its value at ci is the product of the numbers ci−cj, and dividing by that product makes the value 1.

Each Lagrange polynomial is 1 at its own node and 0 at all the others.

Definition 5.5.1 (Lagrange Polynomials)

Let n∈N and let c0,…,cn∈F be distinct. For i∈{0,…,n}, the i-th Lagrange polynomial of these nodes is ℓi:=∏j=0j≠in(ci−cj)−1(x−cj)∈F[x], the product, in increasing order of j, of the n polynomials (ci−cj)−1(x−cj) with j≠i.

The inverse (ci−cj)−1 exists because ci≠cj for j≠i, and F is a field. The product of a list of polynomials is given by the recursion of Sets, Relations, and Cardinality, Definition 2.3.1, read in the commutative ring F[x] (Theorem 4.2.4 (a)); the pattern Number Systems: From N to R used for lists of integers.

Examples.

  • Two nodes. For the nodes 0,1∈Q: ℓ0=(0−1)−1(x−1)=1−x and ℓ1=(1−0)−1(x−0)=x. Indeed ℓ0(0)=1, ℓ0(1)=0, ℓ1(0)=0, ℓ1(1)=1.
  • Three nodes. For the nodes 0,1,2∈Q, the polynomial ℓ0 is ℓ0=(0−1)−1(x−1)⋅(0−2)−1(x−2)=12(x−1)(x−2). It vanishes at 1 and 2, and ℓ0(0)=12⋅(−1)(−2)=1.
  • Over a finite field. In F3, with the nodes 0,1,2, the same formula gives ℓ0=2−1(x−1)(x−2)=2(x−1)(x−2), since 2⋅2=4=1 in F3. Its value at 0 is 2⋅(−1)(−2)=4=1.
Second readingOne node, and a repeated node

One node (n=0). The product defining ℓ0 has no factors, so ℓ0=1, the empty product. The theorem below then says that the only polynomial of degree at most 0 with value y0 at c0 is the constant y0, which is right.

A repeated node. Change the nodes 0,1 of the first example to 0,0. The clause that fails is “distinct”: the factor (c0−c1)−1=0−1 does not exist. Nothing can repair this. A polynomial cannot have the value 1 at 0 and also the value 2 at 0, so with a repeated node some prescribed values have no interpolating polynomial at all.

The next theorem says that the Lagrange polynomials do what they were built for, and that the polynomial they produce is the only one.

Theorem 5.5.1 (Lagrange Interpolation)

Let n∈N, let c0,…,cn∈F be distinct, and let y0,…,yn∈F. Let ℓ0,…,ℓn be the Lagrange polynomials of the nodes (Definition 5.5.1).

  • (a) For all i,k∈{0,…,n}, ℓi(ck)=1 if k=i and ℓi(ck)=0 if k≠i. Each ℓi has degree exactly n.
  • (b) The polynomial p:=∑i=0nyiℓi satisfies deg⁡p≤n and p(ck)=yk for every k.
  • (c) It is the only polynomial of degree at most n with p(ck)=yk for every k.
  • (d) Every q∈F[x] with deg⁡q≤n satisfies q=∑i=0nq(ci)ℓi.

Try it first (ten minutes): for the nodes 0,1,2∈Q, write down ℓ0,ℓ1,ℓ2 and check (a) on them. Then find a quadratic through (0,1), (1,3), (2,7). Why can there be no second one?

Idea. The direct attempt writes p=a0+a1x+a2x2 and solves the three equations p(0)=1, p(1)=3, p(2)=7 for a0,a1,a2. It works here, but it gives no formula, and for n+1 nodes it is a system of n+1 equations. The Lagrange polynomials replace the system by a sum: (a) is “evaluate at a root”, since every factor x−cj with j≠i vanishes at cj, and (b) follows from (a) term by term. The second question, why there is no other quadratic, is not answered by any construction. It is answered by counting roots: two such quadratics differ by a polynomial of degree at most 2 with three roots.

Proof.

  • (a) Let i,k∈{0,…,n}. Evaluation respects products (Theorem 4.4.1), so ℓi(ck) is the product of the values of the factors at ck: ℓi(ck)=∏j=0j≠in(ci−cj)−1(ck−cj). If k≠i, the factor with j=k is (ci−ck)−1⋅0=0, so the product is 0. If k=i, every factor is (ci−cj)−1(ci−cj)=1, so the product is 1. For the degree, each factor (ci−cj)−1x−(ci−cj)−1cj has degree 1, since its coefficient of x is non-zero. A field has no zero divisors, so by Theorem 4.3.2 (b) the degree of a product is the sum of the degrees; with n factors, deg⁡ℓi=n.

  • (b) Each term yiℓi has degree at most n (Theorem 4.3.2 (a)), so deg⁡p≤n by Theorem 4.3.1, applied one term at a time. Evaluating at ck and using (a), p(ck)=∑i=0nyiℓi(ck)=yk, since every term with i≠k is yi⋅0=0, and the term i=k is yk⋅1 ((Σ3) of Lemma 4.1.1).

  • (c) Let q∈F[x] with deg⁡q≤n and q(ck)=yk for every k. Then p and q both have degree at most n and agree at the n+1 distinct points c0,…,cn. By Theorem 5.4.2 (a), q=p.

  • (d) Let deg⁡q≤n, and apply (b) and (c) with yi:=q(ci). The polynomial ∑iq(ci)ℓi and q itself both have degree at most n and the values q(c0),…,q(cn) at the nodes, so they are equal by (c). This proves the theorem.

So for distinct nodes and any values, there is exactly one polynomial of degree at most n through the points, and (b) writes it down. Part (d) says that a polynomial of degree at most n is determined by its values at n+1 nodes, and rebuilt from them by the same formula. Where the linear-algebra companion, Chapter 6, speaks of “the Lagrange basis”, this book has only the formula (d); no basis is defined here.

Warning. The bound “degree at most n” in (c) is what makes the interpolant unique. Without it, uniqueness fails: p and p+(x−c0)(x−c1)⋯(x−cn) have the same values at every node, and the second has degree n+1. For the nodes 0,1 and the values 5,8, both 5+3x and 5+3x+x(x−1)=5+2x+x2 pass through (0,5) and (1,8).

Quick check. Write down the Lagrange polynomials of the nodes 0,1 in Q, and use them to find the line through (0,5) and (1,8).

Solution. ℓ0=1−x and ℓ1=x (the first example after Definition 5.5.1). By Theorem 5.5.1 (b), the line is 5ℓ0+8ℓ1=5(1−x)+8x=5+3x. Check: its values at 0 and 1 are 5 and 8.

Here is a cubic, worked through the formula.

Example (A cubic through four points)

Find the polynomial p∈Q[x] of degree at most 3 with p(−1)=2, p(0)=1, p(1)=2 and p(2)=11.

Solution. The nodes c0=−1, c1=0, c2=1, c3=2 are distinct. From Definition 5.5.1, with the denominators computed first, ℓ0=((−1)(−2)(−3))−1x(x−1)(x−2)=(−6)−1(x3−3x2+2x),ℓ1=((1)(−1)(−2))−1(x+1)(x−1)(x−2)=2−1(x3−2x2−x+2),ℓ2=((2)(1)(−1))−1(x+1)x(x−2)=(−2)−1(x3−x2−2x),ℓ3=((3)(2)(1))−1(x+1)x(x−1)=6−1(x3−x). By Theorem 5.5.1 (b), p=2ℓ0+ℓ1+2ℓ2+11ℓ3. Collect each power of x: x3: −13+12−1+116=1,x2: 1−1+1=1,x: −23−12+2−116=−1,1: 0+1+0+0=1. So p=x3+x2−x+1. Check the four values: p(−1)=−1+1+1+1=2, p(0)=1, p(1)=1+1−1+1=2, p(2)=8+4−2+1=11. By Theorem 5.5.1 (c), no other polynomial of degree at most 3 has these values.

5.5.2. Congruence modulo a polynomial

The opening question turned values into remainders. To compute with remainders as Number Systems: From N to R, Chapter 3 did with integers, we need the relation “same remainder” and the classes it makes.

Definition 5.5.2 (Congruence Modulo a Polynomial)

Let m∈F[x]. Polynomials f,g∈F[x] are congruent modulo m, written f≡g(modm), if m∣f−g (Definition 5.1.1), that is, if f−g∈⟨m⟩ (Definition 5.2.1).

In words: f and g differ by a multiple of m. The set ⟨m⟩ of multiples of m is an ideal of the commutative ring F[x] (Definition 5.2.1), so the relation is the relation ∼I of Number Systems: From N to R, Theorem 3.4.1 for the ideal I=⟨m⟩, and Number Systems: From N to R, Theorem 3.4.1 (a) makes it an equivalence relation. We write [f]=f+⟨m⟩ for the class of f, and [f]m when the modulus must be named.

Examples.

  • x2≡−1(modx2+1), since x2−(−1)=1⋅(x2+1).
  • For every c∈F, f≡f(c)(modx−c): by Theorem 5.1.3 (a), f=q(x−c)+f(c) for some q, so f−f(c) is a multiple of x−c.
  • Two polynomials are congruent modulo m exactly when they leave the same remainder on division by m≠0; this is (b) of the next theorem.
Second readingThe degenerate moduli 0 and the constants

For m=0, f≡g(mod0) means 0∣f−g, that is, f=g (Proposition 5.1.1 (a)): every class is a single polynomial. For a non-zero constant m, every f is a multiple of m (Proposition 5.1.1 (a)), so all polynomials are congruent and there is one class; the ring it forms is the zero ring, in which [1]=[0]. Both cases are legal and neither is useful, which is why the next theorem asks for deg⁡m≥1.

Quick check. Is x3≡x(modx2+1) in Q[x]? In F2[x]?

Solution. Divide: x3=x(x2+1)−x, so x3≡−x, and x3−x=x(x2+1)−2x. Hence x3≡x exactly when x2+1∣−2x. In Q[x] the polynomial −2x is non-zero of degree 1<2, so x2+1 does not divide it (Proposition 5.1.1 (d)): no. In F2[x], −2x=0, which every polynomial divides: yes. The same symbols give different answers over different fields.

5.5.3. The ring of classes modulo a polynomial

Number Systems: From N to R, Chapter 3 built Z/nZ as the quotient of Z by the ideal nZ, and found in each class exactly one remainder in {0,…,n−1}. The same construction works for F[x] and an ideal ⟨m⟩, and division with remainder again picks one representative per class, now “of degree less than deg⁡m”.

Theorem 5.5.2 (The Ring of Polynomials Modulo m)

Let m∈F[x] with d:=deg⁡m≥1, and write [f]=f+⟨m⟩.

  • (a) F[x]/⟨m⟩, with [f]+[g]:=[f+g] and [f][g]:=[fg], is a commutative ring with zero [0] and one [1], and [1]≠[0].
  • (b) Each class contains exactly one polynomial of degree less than d: the remainder of any of its members on division by m. In particular f≡g(modm) if and only if f and g leave the same remainder, and sending each class to its member of degree less than d is a bijection from F[x]/⟨m⟩ onto {r∈F[x]:deg⁡r<d}.
  • (c) The map F→F[x]/⟨m⟩, c↦[c] (c a constant), is injective and preserves + and ⋅.
  • (d) [f] is a unit of F[x]/⟨m⟩ (Number Systems: From N to R, Definition 3.5.1) if and only if gcd(f,m)=1. In that case [f]−1=[a] for any a,b∈F[x] with af+bm=1.

Idea. Part (a) is the quotient theorem of Number Systems: From N to R applied to the ideal ⟨m⟩; only [1]≠[0] needs the degree. Part (b) is division with remainder read twice: existence of the remainder puts one polynomial of small degree into each class, and “compare degrees” shows a class cannot hold two, since their difference would be a non-zero multiple of m of smaller degree than m. Part (d) translates [a][f]=[1] into a Bézout identity, exactly as for Z/nZ.

Proof.

  • (a) By Definition 5.2.1, ⟨m⟩ is an ideal of the commutative ring F[x], so Number Systems: From N to R, Theorem 3.4.1 (a)–(c) give the commutative ring F[x]/⟨m⟩ with these operations, zero [0] and one [1]. By Number Systems: From N to R, Theorem 3.4.1 (d), [1]=[0] would mean 1∈⟨m⟩, that is, m∣1; then deg⁡m≤deg⁡1=0 by Proposition 5.1.1 (d), against d≥1. So [1]≠[0].

  • (b) Since d≥1, m≠0. Existence. Let f∈F[x]. By Theorem 5.1.2 (a), f=qm+r with deg⁡r<d. Then f−r=qm∈⟨m⟩, so r∈[f]. Uniqueness. Let r,r′∈[f] with deg⁡r,deg⁡r′<d. Then r−r′∈⟨m⟩ (both are ∼ to f, and ∼ is an equivalence relation), so m∣r−r′, and deg⁡(r−r′)<d by Theorem 4.3.1. If r−r′≠0, then d≤deg⁡(r−r′) by Proposition 5.1.1 (d), a contradiction. So r=r′.

    Hence two polynomials are congruent exactly when their classes are equal (Sets, Relations, and Cardinality, Theorem 2.5.1 (b)), exactly when the classes have the same member of degree less than d, which is the common remainder. The map “class ↦ its member of degree less than d” is a function by the uniqueness just proved. It is injective, since two classes with a common member are equal (Sets, Relations, and Cardinality, Theorem 2.5.1 (c)); and it is surjective, since a polynomial r with deg⁡r<d is the member of degree less than d of its own class [r].

  • (c) For constants c,c′, [c]+[c′]=[c+c′] and [c][c′]=[cc′] by the definition of the operations, where c+c′ and cc′ are computed in F (Theorem 4.2.4 (b)). If [c]=[c′], then c and c′ are members of one class of degree at most 0<d, so c=c′ by (b).

  • (d) (⇐) Suppose gcd(f,m)=1. By Corollary 5.2.3 there are a,b∈F[x] with af+bm=1; let a,b be any such pair. Then af−1=−bm∈⟨m⟩, so [a][f]=[af]=[1]. So [f] is a unit, and its inverse, which is unique (Number Systems: From N to R, Definition 3.5.1), is [a].

(⇒) Suppose [a][f]=[1] for some a∈F[x] (every element of the quotient is a class, Sets, Relations, and Cardinality, Definition 2.5.4). Then af−1∈⟨m⟩: af−1=km for some k∈F[x]. Hence af+(−k)m=1, and gcd(f,m)=1 by Corollary 5.2.3. This proves the theorem.

So F[x]/⟨m⟩ is a ring whose elements may be named by the polynomials of degree less than deg⁡m, and by (c) its constants form a copy of F. From now on we write c for the class [c] of a constant when no confusion can arise. A computation in the quotient is: compute with representatives, then replace the result by its remainder. The integer twins are Number Systems: From N to R, Theorem 3.4.3 (b) (one remainder per class) and Number Systems: From N to R, Theorem 3.5.1 (units).

Quick check. In Q[x]/⟨x2−2⟩, show that [x+1] is a unit, and find its inverse with (d).

Solution. Divide: x2−2=(x−1)(x+1)−1. Hence (x−1)(x+1)+(−1)(x2−2)=1, so gcd(x+1,x2−2)=1 (Corollary 5.2.3), and by Theorem 5.5.2 (d) with a=x−1, [x+1] is a unit with [x+1]−1=[x−1]. Check: (x+1)(x−1)=x2−1≡2−1=1(modx2−2).

When is every non-zero class a unit? By (d), when every f with m∤f is coprime to m. For an irreducible m, Corollary 5.3.3 (a) says exactly this. For a reducible m, a factor of m of smaller positive degree is neither a multiple of m nor coprime to it.

Theorem 5.5.3 (The Quotient Is a Field Exactly When m Is Irreducible)

Let m∈F[x] with deg⁡m≥1. Then F[x]/⟨m⟩ is a field (Definition 2.1.1) if and only if m is irreducible over F (Definition 5.3.1).

Proof. By Theorem 5.5.2 (a), F[x]/⟨m⟩ is a commutative ring with [1]≠[0]. So it is a field exactly when every non-zero element is a unit.

(⇐) Let m be irreducible and [f]≠[0]. Then f∉⟨m⟩ by Number Systems: From N to R, Theorem 3.4.1 (d), that is, m∤f. By Corollary 5.3.3 (a), gcd(m,f)=1; the definition of the gcd (Definition 5.2.2) is symmetric in its two arguments, so gcd(f,m)=1. Hence [f] is a unit by Theorem 5.5.2 (d).

(⇒) Let m be not irreducible. Since deg⁡m≥1, Definition 5.3.1 gives g,h∈F[x], neither a constant, with m=gh. Then g,h≠0 and deg⁡g,deg⁡h≥1, and deg⁡g+deg⁡h=deg⁡m (Theorem 4.3.2 (b)), so deg⁡g,deg⁡h<deg⁡m. A non-zero polynomial of degree less than deg⁡m is not a multiple of m (Proposition 5.1.1 (d)), so [g]≠[0] and [h]≠[0]. But [g][h]=[gh]=[m]=[0]. In a field a product of non-zero elements is non-zero (Theorem 2.1.1 (f)), so F[x]/⟨m⟩ is not a field. This proves the theorem.

This is Number Systems: From N to R, Theorem 3.5.2 with “prime” replaced by “irreducible”. It manufactures new fields: from F and an irreducible m of degree d, a field whose elements are named by the polynomials of degree less than d.

Example (A field with four elements, and the complex numbers again)
  • (i) Describe F2[x]/⟨x2+x+1⟩, and show that it is a field with four elements.

  • (ii) Describe R[x]/⟨x2+1⟩.

Solution.

  • (i) Let m:=x2+x+1∈F2[x]. Its values are m(0)=1 and m(1)=1+1+1=1 in F2, so m has no root in F2; it has degree 2, so it is irreducible by Proposition 5.3.1 (b), and the quotient is a field by Theorem 5.5.3. By Theorem 5.5.2 (b), its elements are the classes of the polynomials of degree less than 2 over F2, namely 0,1,x,x+1: four elements. Write α:=[x]. Since x2−(x+1)=x2+x+1 in F2[x] (where −1=1), x2≡x+1, and so α2=α+1,α(α+1)=α2+α=2α+1=1,(α+1)2=α2+2α+1=α, using 2=0 in F2. The multiplication table of the non-zero elements is therefore ⋅1αα+111αα+1ααα+11α+1α+11α and every non-zero element has an inverse in it, as the theorem promised. Also α3=α⋅α2=α(α+1)=1. This is the four-element field of Exercise (C1: A Field with Four Elements). There the rule α2=1+α is part of the definition of the multiplication; here it is computed, as the remainder of x2 on division by x2+x+1.

  • (ii) The polynomial x2+1∈R[x] has no real root, since c2+1≥1>0 for every c∈R (Number Systems: From N to R, Proposition 2.3.5 (e)); it has degree 2, so it is irreducible (Proposition 5.3.1 (b)), and R[x]/⟨x2+1⟩ is a field. Its elements are the classes [a+bx] with a,b∈R, each named by exactly one such polynomial, and [x]2=[x2]=[−1]. So it is a field containing a copy of R (Theorem 5.5.2 (c)) and an element whose square is −1: it looks like the complex numbers of Chapter 1, and Exercise B3 shows it is a copy of them.

The theorem needs “irreducible”, and having no root is not a substitute: Section 5.3 showed that the two differ from degree 4 on.

Warning. “m has no root, so F[x]/⟨m⟩ is a field” is false. The polynomial m=(x2+1)2∈R[x] has no real root: for every c∈R, c2+1>0 (Example (A field with four elements, and the complex numbers again) (ii)), so m(c)=(c2+1)2>0 by Number Systems: From N to R, Proposition 2.3.5 (e). But [x2+1]≠[0], since x2+1 has degree 2<4=deg⁡m, while [x2+1]2=[(x2+1)2]=[0]. A non-zero element with square zero cannot be a unit, so R[x]/⟨(x2+1)2⟩ is not a field.

Quick check. Is Q[x]/⟨x2−2⟩ a field? Is R[x]/⟨x2−2⟩?

Solution. Q[x]/⟨x2−2⟩: yes. A rational root c would give c2=2, impossible by Number Systems: From N to R, Theorem 2.6.1; so x2−2 is irreducible over Q (Proposition 5.3.1 (b)), and Theorem 5.5.3 applies. R[x]/⟨x2−2⟩: no. With s the positive square root of 2 in R (Number Systems: From N to R, Proposition 6.1.4), x2−2=(x−s)(x+s) is reducible over R, and the theorem says the quotient is not a field; concretely [x−s][x+s]=[0].

5.5.4. The Chinese remainder theorem for polynomials

Now several congruences at once. Number Systems: From N to R, Chapter 3 solved two congruences to coprime integer moduli by writing 1 as a combination of the moduli and multiplying (Number Systems: From N to R, Theorem 3.5.3). With polynomials the move is the same, and we take k moduli at once. The one new ingredient is that coprimality survives products.

Lemma 5.5.4 (Coprime to Each Factor, Coprime to the Product)
  • (a) Let s≥1 and p,q1,…,qs∈F[x]. If gcd(p,qj)=1 for every j, then gcd(p,q1⋯qs)=1.
  • (b) Let k≥1 and let m1,…,mk∈F[x] be pairwise coprime: gcd(mi,mj)=1 whenever i≠j. If mi∣h for every i, then m1⋯mk∣h.

In words: a polynomial coprime to each factor is coprime to the product, and pairwise coprime divisors of h divide h together.

Second readingThe proof: multiply the Bézout identities

Idea. For (a), write 1 as a combination of p and each factor, and multiply the identities: every term of the product but one contains p, and the remaining term is a multiple of the product of the factors. For (b), the product of the first k moduli is coprime to the next one by (a), so two coprime divisors combine (Proposition 5.3.4); induction adds one modulus at a time.

Proof.

Without coprimality (b) fails: for m1=m2=x and h=x, each mi divides h, but m1m2=x2 does not (Proposition 5.1.1 (d)); here gcd(m1,m2)=x≠1.

Theorem 5.5.5 (Chinese Remainder Theorem for Polynomials)

Let k≥1, let m1,…,mk∈F[x] be non-zero and pairwise coprime, and let m:=m1⋯mk. For each i, let Mi be the product of the mj with j≠i (in increasing order of j).

  • (a) For each i there are ai,bi∈F[x] with aiMi+bimi=1. Put ei:=aiMi. Then ei≡1(modmi) and ei≡0(modmj) for j≠i, and for all r1,…,rk∈F[x] the polynomial f:=∑i=1kriei satisfies f≡ri(modmi)for every i∈{1,…,k}.
  • (b) A polynomial g satisfies the same k congruences if and only if g≡f(modm).
  • (c) Exactly one polynomial of degree less than deg⁡m satisfies the k congruences.
  • (d) The rule Φ([f]m):=([f]m1,…,[f]mk) is a well-defined bijection Φ:F[x]/⟨m⟩→F[x]/⟨m1⟩×⋯×F[x]/⟨mk⟩, and, with + and ⋅ on the right taken componentwise, Φ preserves + and ⋅ and sends [1]m to ([1]m1,…,[1]mk).

Idea. This is the integer proof of Number Systems: From N to R, Theorem 3.5.3 with k moduli. The identity aiMi+bimi=1 makes a polynomial ei that is 1 modulo mi and 0 modulo every other modulus, as ℓi is 1 at one node and 0 at the others. Then ∑riei has every remainder right. Uniqueness modulo m is Lemma 5.5.4 (b): a difference divisible by every mi is divisible by their product. Part (c) picks the remainder modulo m, and (d) restates (a) and (b) as a bijection.

Proof. By (L2) of Section 5.3, applied to the list (m1,…,mk) with the entry i removed, m=Mimi, so mi∣m; and mj∣Mi for j≠i, by the last clause of (L2), since mj is an entry of the list whose product is Mi. By (L1) of Section 5.3, m≠0, since every mi is non-zero.

  • (a) If k=1, then M1=1 (the empty product), and a1:=1, b1:=0 will do. If k≥2, then mi is coprime to each mj with j≠i, so Lemma 5.5.4 (a) gives gcd(mi,Mi)=1; by the symmetry of the gcd and Corollary 5.2.3, aiMi+bimi=1 for some ai,bi. In either case ei−1=−bimi, so ei≡1(modmi); and for j≠i, mj∣Mi∣ei, so ei≡0(modmj).

    Now fix j. In f−rj=∑i≠jriei+rj(ej−1), every term with i≠j is a multiple of mj, and so is rj(ej−1)=−rjbjmj. A sum of multiples of mj is a multiple of mj (Proposition 5.1.1 (c), and induction on the number of terms). So f≡rj(modmj).

  • (b) (⇒) Suppose g≡ri(modmi) for every i. Then mi∣(g−ri)−(f−ri)=g−f for every i (Proposition 5.1.1 (c)). The mi are pairwise coprime, so m∣g−f by Lemma 5.5.4 (b). (⇐) Suppose m∣g−f. Since mi∣m, mi∣g−f (Proposition 5.1.1 (b)), and then mi∣(g−f)+(f−ri)=g−ri for every i.

  • (c) Existence. Since m≠0, divide f by m: f=qm+r with deg⁡r<deg⁡m (Theorem 5.1.2). Then r≡f(modm), so r satisfies the k congruences by (b). Uniqueness. If g and g′ both satisfy them and have degree less than deg⁡m, then g≡f≡g′(modm) by (b), so m∣g−g′, while deg⁡(g−g′)<deg⁡m (Theorem 4.3.1). A non-zero multiple of m has degree at least deg⁡m (Proposition 5.1.1 (d)), so g=g′. (If every mi is a non-zero constant, then deg⁡m=0, and the one solution of degree less than 0 is the zero polynomial.)

  • (d) Well defined. Fix i. If f≡g(modm), then f≡g(modmi), since mi∣m. By Number Systems: From N to R, Theorem 2.2.1 (a), applied to the identity map of F[x] with congruence modulo m on the source and modulo mi on the target, there is exactly one function F[x]/⟨m⟩→F[x]/⟨mi⟩ sending [f]m to [f]mi. Taking these k functions together gives Φ.

Surjective. An element of the target is ([r1]m1,…,[rk]mk) for some r1,…,rk∈F[x] (Sets, Relations, and Cardinality, Definition 2.5.4). With f as in (a), [f]mi=[ri]mi for every i (Sets, Relations, and Cardinality, Theorem 2.5.1 (b)), so Φ([f]m) is that element.

Injective. If Φ([f]m)=Φ([g]m), then [f]mi=[g]mi, that is, mi∣g−f, for every i (Sets, Relations, and Cardinality, Theorem 2.5.1 (b)). By Lemma 5.5.4 (b), m∣g−f, that is, [g]m=[f]m.

Operations. By the definition of + in each quotient (Number Systems: From N to R, Theorem 3.4.1 (b)) and of the componentwise sum, Φ([f]m+[g]m)=Φ([f+g]m)=([f+g]m1,…,[f+g]mk)=([f]m1+[g]m1,…,[f]mk+[g]mk)=Φ([f]m)+Φ([g]m). The same lines with fg in place of f+g give the product, and Φ([1]m)=([1]m1,…,[1]mk) by definition. This proves the theorem.

In (a) the solution is built from the moduli alone, and the right-hand sides ri enter linearly; the ei depend only on m1,…,mk. Part (c) is the version used in computation: reduce any solution modulo m. Compared with Number Systems: From N to R, Theorem 3.5.3, this theorem allows any number k≥1 of moduli in one step, where the integer theorem combines two at a time.

Quick check. Find the polynomial f∈Q[x] of degree less than 2 with f≡3(modx) and f≡5(modx−1).

Solution. By Theorem 5.1.3 (b), f≡3(modx) says that 0 is a root of f−3, that is, f(0)=3; likewise the second congruence says f(1)=5. By Theorem 5.5.1, f=3(1−x)+5x=3+2x. (The Chinese remainder route: x−(x−1)=1, so e1=−(x−1)=1−x and e2=x, and f=3e1+5e2, the same polynomial.)

The check is no accident. Interpolation is the Chinese remainder theorem for the moduli x−ci.

Proposition 5.5.6 (Interpolation Is the Chinese Remainder Theorem for Linear Moduli)

Let n∈N, let c0,…,cn∈F be distinct, let y0,…,yn∈F, and let m:=(x−c0)⋯(x−cn).

  • (a) The moduli x−c0,…,x−cn are pairwise coprime, and deg⁡m=n+1.
  • (b) For f∈F[x] and each i: f≡yi(modx−ci) if and only if f(ci)=yi.
  • (c) The polynomial of degree less than n+1 given by Theorem 5.5.5 (c) for the right-hand sides y0,…,yn is ∑iyiℓi, the interpolating polynomial of Theorem 5.5.1. In particular, the remainder of the polynomial ei of Theorem 5.5.5 (a) on division by m is the Lagrange polynomial ℓi.

In words: the congruences modulo x−ci are the values at ci, so the polynomial of the Chinese remainder theorem is the interpolating polynomial, and its building blocks ei, reduced modulo m, are the Lagrange polynomials.

Second readingThe proof: evaluate, and compare by uniqueness

Idea. Two linear moduli differ by a non-zero constant, which is a Bézout identity after scaling. A congruence modulo x−c is a statement about the value at c, by the factor theorem. And two polynomials of degree less than n+1 solving the same congruences are equal, by the uniqueness half of the Chinese remainder theorem; so it is enough to check that the Lagrange formula solves them.

Proof.

  • (a) For i≠j, (x−ci)−(x−cj)=cj−ci, a non-zero constant. Multiplying by its inverse, (cj−ci)−1(x−ci)−(cj−ci)−1(x−cj)=1, so gcd(x−ci,x−cj)=1 by Corollary 5.2.3. Each factor of m has degree 1, so deg⁡m=n+1 by Theorem 4.3.2 (b).

  • (b) By Theorem 5.1.3 (b), x−ci∣f−yi if and only if ci is a root of f−yi, and (f−yi)(ci)=f(ci)−yi by Theorem 4.4.1.

  • (c) The polynomial p:=∑iyiℓi has degree at most n<n+1 and p(ci)=yi for every i (Theorem 5.5.1 (b)), so by (b) it satisfies the congruences p≡yi(modx−ci). By the uniqueness in Theorem 5.5.5 (c), it is the solution of degree less than deg⁡m. For the second claim, fix i and take the right-hand sides 1 at the index i and 0 elsewhere. By Theorem 5.5.5 (a), ei satisfies these congruences, and so does its remainder on division by m, which is congruent to ei modulo m (Theorem 5.5.5 (b)) and has degree less than deg⁡m. By the first claim, with these right-hand sides, that remainder is ∑jyjℓj=ℓi.

So two routes lead to the same polynomial. The Lagrange route needs only evaluation and the root count; the Chinese remainder route needs Bézout identities, and in exchange it works for moduli of any degree. The next two examples use moduli that are not all linear.

Example (A linear and a quadratic modulus)

Find the polynomial f∈Q[x] of degree less than 3 with f≡1(modx−2)andf≡2x−1(modx2+1).

Solution. A Bézout identity. Divide: x2+1=(x+2)(x−2)+5. Hence 1=15(x2+1)−15(x+2)(x−2), so the moduli m1:=x−2 and m2:=x2+1 are coprime (Corollary 5.2.3), and m=(x−2)(x2+1)=x3−2x2+x−2 has degree 3.

The polynomials e1,e2. Here M1=x2+1 and M2=x−2. The identity reads a1M1+b1m1=1 with a1=15, and a2M2+b2m2=1 with a2=−15(x+2). So e1=15(x2+1),e2=−15(x+2)(x−2)=−15(x2−4).

Assemble and reduce. By Theorem 5.5.5 (a), 1⋅e1+(2x−1)e2=15(x2+1−(2x−1)(x2−4))=15(−2x3+2x2+8x−3). Its remainder on division by m is found by adding 25m: since −2x3+2x2+8x−3+2(x3−2x2+x−2)=−2x2+10x−7, f=−25x2+2x−75, the unique solution of degree less than 3 (Theorem 5.5.5 (c)).

Check. f(2)=−85+4−75=1, which is the first congruence (Proposition 5.5.6 (b)). Modulo x2+1, replace x2 by −1: f≡25+2x−75=2x−1.

Squares of linear moduli prescribe a value and a derivative at once.

Example (Values and derivatives at once)
  • (a) Let c,a,b∈F and f∈F[x]. Show that f≡a+b(x−c)(mod(x−c)2) if and only if f(c)=a and f′(c)=b (the formal derivative of Definition 4.5.1).

  • (b) Find the polynomial p∈Q[x] of degree at most 3 with p(0)=2, p′(0)=−1, p(1)=1 and p′(1)=3.

Solution.

  • (a) Divide by (x−c)2, which has degree 2: f=q(x−c)2+r with deg⁡r≤1 (Theorem 5.1.2). Every polynomial of degree at most 1 can be written α+β(x−c) with α,β∈F: if r=r0+r1x, take β:=r1 and α:=r0+r1c. Evaluating at c (Theorem 4.4.1), f(c)=q(c)⋅0+α=α. By Theorem 4.5.1 (a)–(c), f′=q′(x−c)2+(2⋅1)q(x−c)+β, so f′(c)=β. Now f≡a+b(x−c) if and only if r≡a+b(x−c), and both have degree less than 2, so by Theorem 5.5.2 (b) this holds if and only if α+β(x−c)=a+b(x−c). Comparing the coefficients of x and then the constant terms, that is β=b and α=a, that is, f′(c)=b and f(c)=a.

  • (b) By (a), the conditions say p≡2−x(modx2) and p≡1+3(x−1)=3x−2(mod(x−1)2). The moduli are coprime: expanding, (2x+1)(x−1)2+(3−2x)x2=(2x3−3x2+1)+(3x2−2x3)=1. So, with m1=x2 and m2=(x−1)2, Theorem 5.5.5 (a) gives e1=2x3−3x2+1 and e2=3x2−2x3, and (2−x)e1+(3x−2)e2=−8x4+20x3−12x2−x+2. Adding 8m=8(x4−2x3+x2) gives the remainder modulo m=x2(x−1)2: p=4x3−4x2−x+2. Check: p(0)=2; p′=12x2−8x−1, so p′(0)=−1; p(1)=4−4−1+2=1; p′(1)=12−8−1=3. By Theorem 5.5.5 (c), p is the only polynomial of degree less than 4 with these four conditions.

This section met the Chinese remainder theorem three times: as interpolation (moduli x−ci), as a value and a derivative at a point (moduli (x−c)2), and in general. In each case the ring F[x]/⟨m⟩ of Theorem 5.5.2 is the place where the computation happens.

5.5.5. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Finish the Try it first before Theorem 5.5.1: find the polynomial of degree at most 2 through (0,1), (1,3), (2,7) in Q[x].
  • (b) Describe the classes of F[x]/⟨x⟩. Which ring is it, up to renaming?
  • (c) True or false: R[x]/⟨x2−1⟩ is a field. Justify your answer.
  • (d) Where does the proof of Theorem 5.5.1 (c) use that the nodes are distinct, and where do (a) and (b) use it?

Solution.

  • (a) With the nodes 0,1,2, Definition 5.5.1 gives ℓ0=12(x−1)(x−2),ℓ1=−x(x−2),ℓ2=12x(x−1). So p=ℓ0+3ℓ1+7ℓ2=12(x2−3x+2)−3(x2−2x)+72(x2−x)=x2+x+1. Check: p(0)=1, p(1)=3, p(2)=7. It is the only one of degree at most 2 (Theorem 5.5.1 (c)).

  • (b) By Theorem 5.5.2 (b) with d=1, each class contains exactly one polynomial of degree less than 1, a constant; the constant in [f] is f(0), the remainder on division by x−0 (Theorem 5.1.3 (a)). So the classes are the [c], c∈F, and they are distinct for distinct c. By Theorem 5.5.2 (c), c↦[c] preserves + and ⋅; it is injective, and surjective by what was just said. So F[x]/⟨x⟩ is F with each element c renamed [c]; and [f]=[f(0)], so passing to the quotient is “evaluate at 0”.

  • (c) False. x2−1=(x−1)(x+1) is reducible, so Theorem 5.5.3 says the quotient is not a field. Concretely, [x−1]≠[0]≠[x+1] (degree 1<2), while [x−1][x+1]=[x2−1]=[0].

  • (d) Part (c) uses distinctness only through Theorem 5.4.2 (a), which needs the n+1 points to be distinct, ultimately because the root count of Section 5.4 counts distinct roots. Parts (a) and (b) use it to form the inverses (ci−cj)−1 in the definition of ℓi.

B. Practice

Exercise (B1)

Find the polynomial f∈Q[x] of degree less than 4 with f≡1(modx2) and f≡−1(modx2+1).

Solution. The moduli are coprime, since (x2+1)−x2=1 (Corollary 5.2.3), so by Theorem 5.5.5 (c) there is exactly one such f. The first congruence says f−1=x2h for some h∈Q[x]. Then f+1=2+x2h=(2−h)+h(x2+1), so the second congruence holds if and only if x2+1∣2−h, that is, h≡2(modx2+1). The choice h=2 gives f=1+2x2, of degree 2<4. Check: f−1=2x2 and f+1=2(x2+1). Hence f=1+2x2.

Exercise (B2)

In Q[x]/⟨x3−2⟩, show that [x2+1] is a unit, and compute its inverse.

Solution. Run the Euclidean algorithm (Theorem 5.2.5) on x3−2 and x2+1: x3−2=x(x2+1)+(−x−2),x2+1=(−x+2)(−x−2)+5. The last remainder is the non-zero constant 5, so the gcd is 1. Back-substitute: 5=(x2+1)−(−x+2)((x3−2)−x(x2+1))=(−x2+2x+1)(x2+1)+(x−2)(x3−2). Dividing by 5: 15(−x2+2x+1)⋅(x2+1)+15(x−2)⋅(x3−2)=1. By Theorem 5.5.2 (d), [x2+1] is a unit and [x2+1]−1=[15(−x2+2x+1)]. Check: (x2+1)(−x2+2x+1)=−x4+2x3+2x+1, and with x3≡2, x4≡2x, this is ≡−2x+4+2x+1=5.

Exercise (B3)
  • (a) Write the addition and multiplication tables of F2[x]/⟨x2+x+1⟩, with its elements named 0,1,α,α+1 as in Example (A field with four elements, and the complex numbers again), and check from the table that every non-zero element is a unit.
  • (b) Show that φ(a+bi):=[a+bx] (a,b∈R) is a bijection C→R[x]/⟨x2+1⟩ that preserves + and ⋅ and sends 1 to [1].

Solution.

  • (a) Addition is coefficientwise in F2, where 1+1=0: +01αα+1001αα+1110α+1αααα+101α+1α+1α10⋅01αα+100000101αα+1α0αα+11α+10α+11α The products come from α2=α+1, α(α+1)=1, (α+1)2=α (Example (A field with four elements, and the complex numbers again)). Each non-zero row of the multiplication table contains 1: 1−1=1, α−1=α+1, (α+1)−1=α.

  • (b) Every complex number is a+bi for exactly one pair (a,b)∈R2 (Proposition 1.1.1 and the comparison of real and imaginary parts after it), and every element of R[x]/⟨x2+1⟩ is [a+bx] for exactly one such pair, by Theorem 5.5.2 (b) (the polynomials of degree less than 2 are the a+bx, distinct for distinct pairs). So φ is a bijection. Sums: φ of (a+bi)+(c+di)=(a+c)+(b+d)i is [(a+c)+(b+d)x]=[a+bx]+[c+dx]. Products: in R[x], (a+bx)(c+dx)=(ac−bd)+(ad+bc)x+bd(x2+1), so [a+bx][c+dx]=[(ac−bd)+(ad+bc)x], which is φ of (a+bi)(c+di)=(ac−bd)+(ad+bc)i (Definition 1.1.1, Proposition 1.1.1). Finally φ(1)=[1]. So the field of Chapter 1 could have been built as this quotient: the multiplication rule of Definition 1.1.1 is “multiply, then replace x2 by −1”.

C. Going deeper

Exercise (C1: Two routes to the same theorem)

Let c0,…,cn∈F be distinct and m:=(x−c0)⋯(x−cn).

  • (a) Prove, using Theorem 5.5.1 and the root count but no Bézout identity, that for all r0,…,rn∈F[x] some f satisfies f≡ri(modx−ci) for every i, and that g satisfies the same congruences if and only if g≡f(modm).
  • (b) Conversely, derive from Theorem 5.5.5 that for all y0,…,yn∈F exactly one polynomial of degree at most n satisfies p(ck)=yk for every k (the content of Theorem 5.5.1 (b) and (c), without the formula ∑iyiℓi).
  • (c) Which derivation is shorter, and why?

Solution.

  • (a) By the second example after Definition 5.5.2, ri≡ri(ci)(modx−ci). Let f:=∑iri(ci)ℓi. By Theorem 5.5.1 (b), f(ci)=ri(ci), so f≡ri(ci)≡ri(modx−ci), by Proposition 5.5.6 (b) and transitivity. If g also satisfies the congruences, then g−f≡0(modx−ci) for every i, so each ci is a root of g−f (Theorem 5.1.3 (b)). The ci are distinct roots, so m∣g−f by Theorem 5.4.1. Conversely, if m∣g−f, then each x−ci divides m (it is an entry of the list whose product is m, (L2) of Section 5.3) and so divides g−f (Proposition 5.1.1 (b)), and g≡f≡ri(modx−ci).

  • (b) By Proposition 5.5.6 (a), (b), the moduli x−ci are pairwise coprime, deg⁡m=n+1, and “f(ci)=yi for every i” is the system f≡yi(modx−ci). By Theorem 5.5.5 (c), exactly one polynomial of degree less than n+1, that is, of degree at most n, solves it. That is the existence of an interpolating polynomial and its uniqueness at once, without the formula for ℓi; identifying it with ∑iyiℓi still needs Theorem 5.5.1 (a).

  • (c) The route in (a) is shorter in what it needs: evaluation and the root count. The route in (b) passes through Lemma 5.5.4 and Bézout identities for the moduli. The Lagrange route is shorter because linear moduli are special: “divisible by x−c” can be tested by evaluating at c, which turns every congruence into an equation in F. For moduli of higher degree, evaluation at a single point is no longer enough. For (x−c)2, Example (Values and derivatives at once) (a) needs the derivative as well as the value. For x2+1 over Q in Example (A linear and a quadratic modulus), the modulus has no root in Q, so no evaluation in Q detects divisibility at all. The Chinese remainder route handles every modulus in the same way.

Exercise (C2: Every function on a prime field is a polynomial)

Let p be a prime. Prove that every function φ:Fp→Fp is the polynomial function c↦f(c) of exactly one f∈Fp[x] with deg⁡f<p.

Solution. The elements 0,1,…,p−1 of Fp are p distinct elements (Definition 2.2.1), and there are no others. Use them as nodes, ci:=i for i=0,…,p−1, so n=p−1.

Existence. With yi:=φ(i), Theorem 5.5.1 (b) gives f with deg⁡f≤p−1<p and f(i)=φ(i) for every i. Since the i are all the elements of Fp, the polynomial function of f is φ.

Uniqueness. If g also has degree less than p and the function φ, then f and g have degree at most p−1 and agree at the p distinct nodes, so f=g by Theorem 5.5.1 (c).

So over Fp every function is a polynomial function, and the polynomials of degree less than p correspond one to one to the functions Fp→Fp. (As a count: both sets have pp elements, p choices for each of p coefficients, or for each of p values.) Interpolation over Fp can use at most p nodes, since Fp has no more distinct elements. Polynomials of degree p or more are no longer determined by their functions: xp and x have the same function by Theorem 2.6.6 (a), which is the warning of Section 5.4.