6.6  Interpolation and the Chinese Remainder Theorem

Chapter 3 proved that through n+1 points with distinct x-values there passes exactly one polynomial of degree at most n (Theorem 3.7.3). The proof went through an invertible matrix, and it never wrote the polynomial down. This section gives the formula. Then it reads interpolation in the arithmetic of this chapter: “p(c)=y” says that p leaves remainder y on division by x−c. Prescribing remainders modulo several pairwise coprime polynomials at once is the Chinese Remainder Theorem. We prove it twice, once with Bézout’s identity, which gives a formula, and once by counting dimensions in the quotient spaces F[x]/⟨m⟩.

6.6.1. The Lagrange basis

Suppose we want the polynomial of degree at most n taking prescribed values y0,…,yn at distinct points c0,…,cn. The problem is linear in the data: if p fits the values (yi) and q fits (yi′), then p+q fits (yi+yi′), by Theorem 0.8.5. So it is enough to solve the simplest data sets, a single 1 and zeros everywhere else, and add up.

The polynomial that vanishes at every cj with j≠i is easy to write: ∏j≠i(x−cj). At ci it takes the value ∏j≠i(ci−cj), which is a product of nonzero scalars, so we can divide by it. In Example (Dual Bases in R[x]≤2) we met these polynomials for the three points −1,0,1. Here is the general case.

The i-th Lagrange polynomial is the polynomial of degree n that is 1 at the i-th node and 0 at every other node.

Definition 6.6.1 (Lagrange Basis)

Let n∈N, and let c0,c1,…,cn∈F be distinct. For i=0,…,n, the i-th Lagrange polynomial for these nodes is ℓi(x):=∏j=0j≠inx−cjci−cj∈F[x]. The list (ℓ0,…,ℓn) is the Lagrange basis for the nodes c0,…,cn.

In words: the numerator makes ℓi vanish at every node except ci, and the denominator rescales so that the value at ci is exactly 1. The points ci are called nodes.

Well-definedness. Each denominator ci−cj with j≠i is nonzero because the nodes are distinct, so the quotients exist in F. The product has n linear factors, each with leading coefficient (ci−cj)−1≠0, so deg⁡ℓi=n by Theorem 0.8.3. The name “basis” is justified by the theorem below.

Examples.

  • One node. For n=0 the product is empty, so ℓ0=1. The degenerate case is consistent: a polynomial of degree at most 0 with value y0 at c0 is the constant y0=y0ℓ0.
  • Two nodes. For c0=0, c1=1 we get ℓ0=x−10−1=1−x and ℓ1=x−01−0=x. The line through (0,y0) and (1,y1) is y0(1−x)+y1x.
  • Three nodes. For −1,0,1, ℓ−1=x(x−1)(−1)(−2)=12x(x−1), ℓ0=(x+1)(x−1)(1)(−1)=1−x2, and ℓ1=12x(x+1), the polynomials of Example (Dual Bases in R[x]≤2). (Here we index the nodes by their values.)

Nonexample by minimal change. Take the nodes 0,1,1. The numerator of ℓ1 is still defined, (x−0)(x−1), but the denominator contains c1−c2=0, which has no inverse. No rescaling helps: a polynomial that vanishes at c2=1 cannot take the value 1 at c1=1. The clause that fails is “distinct”.

Everything about the Lagrange polynomials follows from one table of values, the Kronecker delta ℓi(cj)=δij.

Theorem 6.6.1 (Lagrange Interpolation)

Let n∈N, let c0,…,cn∈F be distinct, and let (ℓ0,…,ℓn) be the Lagrange basis for these nodes.

  • (a) ℓi(cj)=δij for all i,j∈{0,…,n}.
  • (b) (ℓ0,…,ℓn) is a basis of F[x]≤n, and every p∈F[x]≤n satisfies p=∑i=0np(ci)ℓi.
  • (c) For all y0,…,yn∈F, the unique p∈F[x]≤n with p(ci)=yi for every i is p=∑i=0nyiℓi.

Idea. ① The delta table is a direct evaluation. ② Evaluating a vanishing combination ∑aiℓi at cj kills every term but aj, so the list is independent, and it has the right length, so we count instead of checking spanning. ③ The expansion of p and the interpolation formula are the same computation: both sides of a candidate identity are polynomials of degree at most n with the same values at n+1 nodes.

Proof.

  • (a) By Theorem 0.8.5, ℓi(cj)=∏k≠icj−ckci−ck. If j=i, every factor is 1, so ℓi(ci)=1. If j≠i, the factor with k=j is 0, so ℓi(cj)=0.

  • (b) Each ℓi has degree n, so it lies in F[x]≤n. Let a0ℓ0+⋯+anℓn=0. Evaluating at cj and using (a) gives 0=∑iaiδij=aj for each j. Hence the list is linearly independent. It has length n+1=dim⁡F[x]≤n (Example (Standard Bases)), so it is a basis by Theorem 1.6.4 (a).

    Now let p∈F[x]≤n, and put q=p−∑ip(ci)ℓi∈F[x]≤n. By (a), q(cj)=p(cj)−p(cj)=0 for every j. So q has the n+1 distinct roots c0,…,cn and degree at most n. By Corollary 6.1.4, q=0, which is the expansion of p.

  • (c) By (a), (∑iyiℓi)(cj)=∑iyiδij=yj, so ∑iyiℓi has the required values, and it lies in F[x]≤n. By Theorem 3.7.3, it is the only such polynomial. This proves the theorem.

So Chapter 3’s existence statement now comes with a formula, and the uniqueness half of (c) is the expansion in (b) read backwards: a polynomial of degree at most n is determined by its values at the nodes, because those values are its coordinates in the Lagrange basis.

Example (The Chapter 3 Cubic by Lagrange’s Formula)

Use Theorem 6.6.1 to find the p∈Q[x]≤3 with p(−1)=2, p(0)=1, p(1)=2, and p(2)=11, and compare with Example (A cubic through four points).

Solution. The nodes −1,0,1,2 are distinct. Write ℓ−1,ℓ0,ℓ1,ℓ2 for the Lagrange polynomials, indexed by the node. The denominators are ∏j≠i(ci−cj): ℓ−1=x(x−1)(x−2)(−1)(−2)(−3)=−16x(x−1)(x−2),ℓ0=(x+1)(x−1)(x−2)(1)(−1)(−2)=12(x+1)(x−1)(x−2), ℓ1=(x+1)x(x−2)(2)(1)(−1)=−12(x+1)x(x−2),ℓ2=(x+1)x(x−1)(3)(2)(1)=16(x+1)x(x−1). Expanding, ℓ−1=−16x3+12x2−13x,ℓ0=12x3−x2−12x+1,ℓ1=−12x3+12x2+x,ℓ2=16x3−16x. By Theorem 6.6.1 (c), p=2ℓ−1+ℓ0+2ℓ1+11ℓ2. Collecting coefficients: x3: −13+12−1+116=1,x2: 1−1+1+0=1,x: −23−12+2−116=−1,1: 1. Hence p=x3+x2−x+1, the polynomial found by elimination in Example (A cubic through four points), as uniqueness demands. The elimination solved a 4×4 system for these particular values. The Lagrange polynomials were computed once, and would serve for any other values at the same nodes.

Warning. The interpolant has degree at most n, not exactly n. Through the three points (0,0),(1,1),(2,2) the formula gives 0⋅ℓ0+1⋅ℓ1+2ℓ2, where ℓ1=−x(x−2) and ℓ2=12x(x−1); this is −x2+2x+x2−x=x. The degree-2 terms cancel, because the points lie on a line. Each ℓi has degree exactly n, but a combination of them need not.

Quick check. Let n≥1 and let (ℓ0,…,ℓn) be the Lagrange basis for distinct nodes c0,…,cn. What is ∑i=0nciℓi?

Solution. It is the polynomial x. Indeed x∈F[x]≤n since n≥1, and its values at the nodes are c0,…,cn, so Theorem 6.6.1 (b) gives x=∑iciℓi.

6.6.2. Evaluations are the dual basis

The delta table ℓi(cj)=δij can be read the other way round. For c∈F, evaluation at c is the linear functional εc:p↦p(c) (Example (Four Families of Functionals)), which we restrict to F[x]≤n. Then the table says εcj(ℓi)=δji: the evaluations at the nodes behave on the Lagrange basis exactly as a dual basis must (Theorem 5.1.3). Exercise (C3: Evaluations as a dual basis) proved from Theorem 3.7.3 that the evaluations form the dual basis of some basis. We can now name that basis.

Corollary 6.6.2 (Evaluations Are Dual to the Lagrange Basis)

Let c0,…,cn∈F be distinct, with Lagrange basis (ℓ0,…,ℓn). Then (εc0,…,εcn) is the dual basis of (ℓ0,…,ℓn) in F[x]≤n∗. In particular, every linear functional φ on F[x]≤n is a combination of evaluations at the nodes: φ=∑i=0nφ(ℓi)εci.

Proof. The evaluations are linear (Example (Four Families of Functionals)), and εci(ℓj)=ℓj(ci)=δij by Theorem 6.6.1 (a). Since (ℓ0,…,ℓn) is a basis (Theorem 6.6.1 (b)), the uniqueness in Theorem 5.1.3 (a) shows that the evaluations are its dual basis. The formula for φ is the second formula of Theorem 5.1.3 (c).

The first formula of Theorem 5.1.3 (c), p=∑iεci(p)ℓi, is the expansion in Theorem 6.6.1 (b). So Lagrange’s formula is the statement “a vector is recovered from its dual-basis coordinates”, for the space F[x]≤n and the measurements “value at ci”.

The formula for φ has a practical reading: any linear measurement of a polynomial of degree at most n can be computed from n+1 of its values, with weights φ(ℓi) that do not depend on the polynomial.

Example (Integrals and Slopes from Values)
  • (a) Find w0,w1,w2∈R such that ∫01p(t)dt=w0p(0)+w1p(12)+w2p(1) for every p∈R[x]≤2.
  • (b) Express p↦p′(0) on R[x]≤2 as a combination of ε−1,ε0,ε1.

Solution.

  • (a) Integration over [0,1] is a linear functional on R[x]≤2 (Example (Four Families of Functionals)). For the nodes 0,12,1, ℓ0=(x−12)(x−1)(−12)(−1)=2x2−3x+1,ℓ1/2=x(x−1)(12)(−12)=−4x2+4x,ℓ1=x(x−12)(1)(12)=2x2−x. Their integrals are 23−32+1=16, −43+2=23, and 23−12=16. By Corollary 6.6.2, ∫01p(t)dt=16p(0)+23p(12)+16p(1)for all p∈R[x]≤2. Check with p=x2: the right side is 23⋅14+16=13=∫01t2dt. This is Simpson’s rule, which here is exact rather than approximate because p has degree at most 2.

  • (b) With ℓ−1=12x(x−1), ℓ0=1−x2, and ℓ1=12x(x+1), the derivatives at 0 are −12, 0, and 12. Hence p′(0)=12(p(1)−p(−1)) for every p∈R[x]≤2, the symmetric difference quotient, exact on quadratics.

6.6.3. Congruences and the Chinese Remainder Theorem

Now we change the point of view. By Theorem 6.1.3, the remainder of p on division by x−c is p(c). So the interpolation conditions p(ci)=yi say that p leaves the remainder yi on division by x−ci, for each i. Nothing in this reformulation needs the divisors to be linear. What happens if we prescribe the remainders modulo arbitrary polynomials m1,…,mk? The integers faced the same question long ago, which explains the name of the answer. We first need the language of congruences, copied from Z.

Definition 6.6.2 (Congruence Modulo a Polynomial)

Let m∈F[x]. Two polynomials f,g∈F[x] are congruent modulo m, written f≡g(modm), if m∣f−g.

For example, x2≡−1(modx2+1), and f≡f(c)(modx−c) for every f, by Theorem 6.1.3. Congruence modulo m is an equivalence relation, and it respects sums and products: if f≡f′ and g≡g′(modm), then f+g−(f′+g′)=(f−f′)+(g−g′) and fg−f′g′=f(g−g′)+(f−f′)g′ are divisible by m. By Theorem 6.1.1, if m≠0, every f is congruent modulo m to exactly one polynomial of degree less than deg⁡m, its remainder: f=qm+r gives f≡r, and if f≡r≡r′ with both degrees below deg⁡m, then m∣r−r′ with deg⁡(r−r′)<deg⁡m, which forces r−r′=0.

Interpolation needed distinct nodes. The general condition is that the moduli share no factor, and the proof needs a way to pass from “coprime in pairs” to “coprime to the product”.

Lemma 6.6.3 (Coprime to Each, Coprime to the Product)
  • (a) Let p,q1,…,qs∈F[x]. If p is coprime to each qj, then there are a,b∈F[x] with ap+bq1⋯qs=1, and p is coprime to q1⋯qs.
  • (b) Let m1,…,mk∈F[x] be nonzero and pairwise coprime, that is, gcd(mi,mj)=1 whenever i≠j. If mi∣h for every i, then m1⋯mk∣h.

Proof.

  • (a) By Corollary 6.2.4, for each j there are aj,bj with ajp+bjqj=1. Multiplying these s identities, 1=∏j=1s(ajp+bjqj)=ap+(b1⋯bs)q1⋯qs for some a∈F[x], because every term of the expanded product except (b1q1)⋯(bsqs) contains a factor ajp. Let d=gcd(p,q1⋯qs). By Theorem 6.2.3, d divides p and q1⋯qs, hence divides ap+bq1⋯qs=1, where b=b1⋯bs. So d is a nonzero constant by Theorem 0.8.3, and being monic, d=1. Hence p and q1⋯qs are coprime (Definition 6.2.3).

  • (b) We use induction on k. For k=1 there is nothing to prove. Let k≥2. The moduli m1,…,mk−1 are pairwise coprime and each divides h, so by the induction hypothesis M:=m1⋯mk−1 divides h, say h=Mg. Since mk∣h=Mg, and mk is coprime to M by (a), Theorem 6.2.8 gives mk∣g, say g=mkg′. Then h=m1⋯mkg′, as claimed.

Theorem 6.6.4 (Chinese Remainder Theorem for Polynomials)

Let m1,…,mk∈F[x] be nonzero and pairwise coprime, and put m=m1⋯mk. For all r1,…,rk∈F[x]:

  • (a) there is f∈F[x] with f≡ri(modmi) for every i;
  • (b) if f and g both satisfy (a), then f≡g(modm);
  • (c) there is exactly one such f with deg⁡f<deg⁡m.

Idea. Copy Lagrange. There, ℓi was 1 at ci and 0 at the other nodes; in the new language, ℓi≡1(modx−ci) and ℓi≡0(modx−cj). So we look for ei with ei≡1(modmi) and ei≡0(modmj) for j≠i, and then f=∑iriei works. To be 0 modulo every other mj, ei should be a multiple of Mi=∏j≠imj; to be 1 modulo mi, it should be 1−ami. Bézout’s identity ami+bMi=1 provides exactly such an element: ei=bMi.

Proof.

  • (a) Fix i, and let Mi=∏j≠imj. Since mi is coprime to each mj with j≠i, Lemma 6.6.3 (a) gives ai,bi∈F[x] with aimi+biMi=1. Put ei=biMi. Then ei−1=−aimi, so ei≡1(modmi), and mj∣Mi∣ei for j≠i, so ei≡0(modmj). Let f=r1e1+⋯+rkek. Since congruence modulo mj respects sums and products, f≡r1⋅0+⋯+rj⋅1+⋯+rk⋅0=rj(modmj) for each j.

  • (b) If f and g satisfy (a), then f−g≡ri−ri=0(modmi), that is, mi∣f−g, for every i. By Lemma 6.6.3 (b), m∣f−g.

  • (c) Since each mi≠0, m≠0 (Theorem 0.8.3). Let f be as in (a), and let f0 be its remainder on division by m (Theorem 6.1.1). Then mi∣m∣f−f0, so f0≡f≡ri(modmi) for each i, and deg⁡f0<deg⁡m. If g is another solution with deg⁡g<deg⁡m, then m∣f0−g by (b), and deg⁡(f0−g)<deg⁡m, so f0=g. This proves the theorem.

Lagrange is the case mi=x−ci. For distinct nodes, (x−cj)−(x−ci)=ci−cj is a nonzero constant, so 1ci−cj(x−cj)−1ci−cj(x−ci)=1, and any common divisor of x−ci and x−cj divides 1: the moduli are pairwise coprime. The congruence f≡yi(modx−ci) means f(ci)=yi by Theorem 6.1.3, and deg⁡m=n+1. So part (c) is Theorem 3.7.3. The element ei has degree less than n+1 after reduction modulo m, is 1 at ci and 0 at the other nodes, so after reduction it is ℓi.

Example (A Linear and a Quadratic Modulus)

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

Solution. Bézout. Divide x2+1 by x−2: x2+1=(x+2)(x−2)+5. Hence 15(x2+1)−15(x+2)(x−2)=1, and the moduli are coprime, since any common divisor divides 1.

The elements ei. Put e1=15(x2+1) and e2=−15(x+2)(x−2)=1−e1. Then e1 is a multiple of x2+1 and e1=1+15(x+2)(x−2)≡1(modx−2); symmetrically, e2≡0(modx−2) and e2≡1(modx2+1).

Combine and reduce. By the proof of Theorem 6.6.4, f≡1⋅e1+(2x−1)e2(mod(x−2)(x2+1)). Expanding, e1+(2x−1)e2=15(x2+1)−15(2x−1)(x2−4)=15(−2x3+2x2+8x−3). Dividing by m=(x−2)(x2+1)=x3−2x2+x−2 gives quotient −25 and remainder f=15(−2x2+10x−7). Check. f(2)=15(−8+20−7)=1, so f≡1(modx−2). Modulo x2+1, x2≡−1, so f≡15(2+10x−7)=2x−1.

Warning. The moduli must be coprime in pairs; coprime as a whole family is not enough. Without coprimality a system can be unsolvable: with m1=x and m2=x2, the system f≡0(modx), f≡1(modx2) has no solution: the first condition says f(0)=0, the second says f=1+x2q, so f(0)=1. For three moduli, x, x−1, and x(x−1) have no common factor, yet the first and third share x, and f≡0(modx), f≡1(modx(x−1)) is again impossible.

Example (Values and Slopes by CRT)
  • (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.
  • (b) Find the p∈Q[x]≤3 with p(0)=2, p′(0)=−1, p(1)=1, and p′(1)=3.

Solution.

  • (a) Divide by (x−c)2: f=q(x−c)2+r with deg⁡r≤1 (Theorem 6.1.1). Writing r=r0+r1(x−c), which is possible because (1,x−c) is a basis of F[x]≤1 by Theorem 1.4.4 and Theorem 1.6.4, the uniqueness of the remainder says f≡a+b(x−c) exactly when r0=a and r1=b. Now f(c)=r0. By Theorem 6.4.4, f′=q′(x−c)2+2q(x−c)+r1, so f′(c)=r1. Hence the congruence holds if and only if f(c)=a and f′(c)=b.

  • (b) By (a), the conditions are p≡2−x(modx2) and p≡1+3(x−1)(mod(x−1)2). The moduli are coprime, since (2x+1)(x−1)2−(2x−3)x2=(2x3−3x2+1)−(2x3−3x2)=1. So e0=(2x+1)(x−1)2 is ≡0(mod(x−1)2) and ≡1(modx2), while e1=−(2x−3)x2=3x2−2x3 is ≡0(modx2) and ≡1(mod(x−1)2). The polynomial e1 is the smooth step 3x2−2x3 of Example (Prescribing Values and Slopes): value 0 and slope 0 at 0, value 1 and slope 0 at 1. By Theorem 6.6.4, p is the remainder of (2−x)e0+(3x−2)e1=−8x4+20x3−12x2−x+2 on division by x2(x−1)2=x4−2x3+x2. Adding 8(x4−2x3+x2) gives 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.

The same recipe handles any finite set of nodes ci with multiplicities ki: the moduli (x−ci)ki are pairwise coprime for distinct nodes, by Lemma 6.6.3 (a) applied twice: first x−ci is coprime to (x−cj)kj, and then (x−cj)kj is coprime to (x−ci)ki. So for any prescribed remainders modulo (x−ci)ki, there is exactly one polynomial of degree less than k1+⋯+ks with those remainders. In characteristic 0, the Taylor expansion of Theorem 6.4.7 translates “the remainder modulo (x−c)k” into the values f(c),f′(c),…,f(k−1)(c), and this is Hermite interpolation.

6.6.4. The quotient space F[x]/⟨m⟩

Congruence modulo m is equality of cosets. The ideal ⟨m⟩ is a subspace of F[x]: it is nonempty and closed under addition and under multiplication by constant polynomials (Definition 6.2.1). So the quotient space F[x]/⟨m⟩ of Definition 4.4.3 exists, and by Lemma 4.4.3 (b), f+⟨m⟩=g+⟨m⟩⟺f−g∈⟨m⟩⟺f≡g(modm). An element of F[x]/⟨m⟩ is a polynomial “known only modulo m”. We cannot quote Theorem 4.4.5 for its dimension, because F[x] is infinite-dimensional (Theorem 1.3.3). The remainder does the job instead.

Theorem 6.6.5 (Dimension of F[x]/⟨m⟩)

Let m∈F[x] be nonzero of degree d. Then F[x]/⟨m⟩ is finite-dimensional with dim⁡F[x]/⟨m⟩=deg⁡m=d. If d≥1, the cosets (1+⟨m⟩,x+⟨m⟩,…,xd−1+⟨m⟩) form a basis.

Proof. If d=0, then m is a nonzero constant, and every f=(m−1f)m lies in ⟨m⟩. So ⟨m⟩=F[x] and the quotient is the zero space, of dimension 0.

Let d≥1, and define ρ:F[x]→F[x]≤d−1 by letting ρ(f) be the remainder of f on division by m (Theorem 6.1.1). Linear. If f=q1m+ρ(f) and g=q2m+ρ(g), then for c∈F, cf+g=(cq1+q2)m+(cρ(f)+ρ(g)), and deg⁡(cρ(f)+ρ(g))<d by Theorem 0.8.2. By the uniqueness in Theorem 6.1.1, ρ(cf+g)=cρ(f)+ρ(g). Surjective. If deg⁡r<d, then r=0⋅m+r, so ρ(r)=r. Kernel. ρ(f)=0 exactly when f=qm for some q, that is, f∈⟨m⟩.

By the First Isomorphism Theorem (Theorem 4.4.7), ρ¯:F[x]/⟨m⟩→F[x]≤d−1, f+⟨m⟩↦ρ(f), is a well-defined injective linear map with image imρ=F[x]≤d−1, so it is an isomorphism. Since ρ¯(xj+⟨m⟩)=xj for j<d, and (1,x,…,xd−1) is a basis of F[x]≤d−1 (Example (Standard Bases)), the inverse isomorphism ρ¯−1 carries it to the basis (xj+⟨m⟩)j<d (Theorem 2.5.2). Hence dim⁡F[x]/⟨m⟩=d.

For example, R[x]/⟨x2+1⟩ has basis (1+⟨x2+1⟩,x+⟨x2+1⟩), so each element is a+bx+⟨x2+1⟩ for unique a,b∈R.

Remark. Cosets can also be multiplied: (f+⟨m⟩)(g+⟨m⟩):=fg+⟨m⟩ is well defined, because congruence modulo m respects products. In R[x]/⟨x2+1⟩, x⋅x=x2≡−1, so the coset of x squares to minus the coset of 1, and (a+bx)(a′+b′x)≡(aa′−bb′)+(ab′+a′b)x: this is multiplication in C, with the coset of x playing the role of i.

The Chinese Remainder Theorem now becomes a statement about linear maps. Reducing a polynomial modulo each mi records its k remainders; the theorem says that this record, taken modulo m, is a perfect dictionary. Recall from Definition 4.4.1 that V1×⋯×Vk is the space of lists with entrywise operations.

Theorem 6.6.6 (CRT as an Isomorphism)

Let m1,…,mk∈F[x] be nonzero and pairwise coprime, and put m=m1⋯mk. Then Φ:F[x]/⟨m⟩→F[x]/⟨m1⟩×⋯×F[x]/⟨mk⟩,f+⟨m⟩↦(f+⟨m1⟩,…,f+⟨mk⟩), is a well-defined isomorphism of vector spaces.

Idea. The map that does not care about well-definedness is Ψ:f↦(f+⟨mi⟩)i on F[x] itself. Its kernel is the set of polynomials divisible by every mi, which is ⟨m⟩ by Lemma 6.6.3. So the First Isomorphism Theorem makes Φ well defined and injective in one stroke. For surjectivity we do not construct a preimage. We count: both sides have dimension deg⁡m, because degrees add under products.

Proof. Let Ψ:F[x]→F[x]/⟨m1⟩×⋯×F[x]/⟨mk⟩, Ψ(f)=(f+⟨m1⟩,…,f+⟨mk⟩). Each entry is a quotient map, which is linear by Theorem 4.4.4 (c), and the operations in the product are entrywise, so Ψ is linear. By Lemma 4.4.3 (b), Ψ(f)=0 if and only if mi∣f for every i. If m∣f, then mi∣f for all i, since mi∣m; conversely, if every mi∣f, then m∣f by Lemma 6.6.3 (b). Hence kerΨ=⟨m⟩.

By the First Isomorphism Theorem (Theorem 4.4.7), the rule f+⟨m⟩↦Ψ(f) is a well-defined injective linear map; this is Φ. By Theorem 6.6.5, Theorem 0.8.3, and Theorem 4.4.1, dim⁡F[x]/⟨m⟩=deg⁡m=∑i=1kdeg⁡mi=∑i=1kdim⁡F[x]/⟨mi⟩=dim⁡(F[x]/⟨m1⟩×⋯×F[x]/⟨mk⟩). Since Φ is injective between spaces of the same finite dimension, it is bijective by Corollary 2.3.2 (e), hence an isomorphism (Definition 2.5.2).

Surjectivity of Φ is the existence part of Theorem 6.6.4, and injectivity is the uniqueness part. So the count has given a second proof of the Chinese Remainder Theorem, one that never uses Bézout’s identity for existence. It is the same trade as in Example (Interpolation as a Count): counting proves that a solution exists, and the Bézout construction says what it is. By the remark above, Φ also respects products of cosets, since reduction modulo each mi does. In Chapter 9 this splitting of F[x]/⟨m⟩ into pieces, one for each coprime factor of m, reappears as a splitting of a space on which an operator acts. The next section begins that story.

Quick check. What is dim⁡Q[x]/⟨x3−x⟩? Into which three spaces does Theorem 6.6.6 split it, and what does Φ do to the coset of x2?

Solution. By Theorem 6.6.5, the dimension is 3. Since x3−x=x(x−1)(x+1) with distinct linear factors, which are pairwise coprime, Φ maps it isomorphically onto Q[x]/⟨x⟩×Q[x]/⟨x−1⟩×Q[x]/⟨x+1⟩, a product of three one-dimensional spaces. Modulo x−c, a polynomial is congruent to its value at c, so Φ(x2+⟨x3−x⟩) is the list of cosets of the constants 0,1,1: the values of x2 at 0,1,−1.

6.6.5. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define the Lagrange basis for distinct nodes c0,…,cn, and state the value of ℓi at cj.
  • (b) True or false: for four distinct nodes, the polynomial of degree at most 3 through the four points always has degree exactly 3. Justify your answer.
  • (c) State the Chinese Remainder Theorem for polynomials, with all hypotheses.
  • (d) True or false: if gcd(m1,m2,m3)=1, then every system f≡ri(modmi), i=1,2,3, has a solution. Justify your answer.
  • (e) What is dimR⁡R[x]/⟨x4+1⟩? Give a basis.
  • (f) Which functional on F[x]≤n is the i-th vector of the dual basis (Theorem 5.1.3) of the Lagrange basis?

Solution.

  • (a) For distinct c0,…,cn∈F, ℓi=∏j≠ix−cjci−cj (Definition 6.6.1), and ℓi(cj)=δij (Theorem 6.6.1 (a)).

  • (b) False. The points (0,0),(1,0),(2,0),(3,0) are fitted by the zero polynomial, of degree −∞; by uniqueness (Theorem 3.7.3), that is the interpolant.

  • (c) If m1,…,mk∈F[x] are nonzero and pairwise coprime and m=m1⋯mk, then for all r1,…,rk∈F[x] there is f with f≡ri(modmi) for each i, unique modulo m, and exactly one such f has deg⁡f<deg⁡m (Theorem 6.6.4).

  • (d) False. x, x−1, x(x−1) have gcd 1 as a family, but f≡0(modx), f≡0(modx−1), f≡1(modx(x−1)) has no solution: the last condition gives f(0)=1, contradicting the first.

  • (e) 4, with basis (1,x,x2,x3) of cosets modulo ⟨x4+1⟩, by Theorem 6.6.5.

  • (f) Evaluation at the i-th node, εci:p↦p(ci) (Corollary 6.6.2).

B. Practice

Exercise (B1: A Lagrange interpolant)

Let c0,c1,c2,c3=0,1,2,3. Write down the Lagrange basis for these nodes in factored form, and use it to find the p∈Q[x]≤3 with p(0)=1, p(1)=0, p(2)=1, and p(3)=10. Hence compute p(4).

Solution. The denominators ∏j≠i(ci−cj) are (−1)(−2)(−3)=−6, (1)(−1)(−2)=2, (2)(1)(−1)=−2, and (3)(2)(1)=6. So ℓ0=−16(x−1)(x−2)(x−3),ℓ1=12x(x−2)(x−3),ℓ2=−12x(x−1)(x−3),ℓ3=16x(x−1)(x−2). By Theorem 6.6.1 (c), p=ℓ0+0⋅ℓ1+ℓ2+10ℓ3. Expanding each needed term, ℓ0=−16(x3−6x2+11x−6),ℓ2=−12(x3−4x2+3x),10ℓ3=53(x3−3x2+2x). The coefficient of x3 is −16−12+53=1; of x2, 1+2−5=−2; of x, −116−32+103=0; the constant is 1. Hence p=x3−2x2+1. Check: p(0)=1, p(1)=0, p(2)=8−8+1=1, p(3)=27−18+1=10. Hence p(4)=64−32+1=33.

Exercise (B2: A CRT system)

Find the polynomial f∈Q[x] of degree less than 3 with f≡2(modx−1) and f≡x(modx2+1). Hence describe all g∈Q[x] satisfying both congruences.

Solution. Bézout. x2+1=(x+1)(x−1)+2, so 12(x2+1)−12(x+1)(x−1)=1, and the moduli are coprime.

The elements ei. e1=12(x2+1) is a multiple of x2+1 and e1=1+12(x+1)(x−1)≡1(modx−1). And e2=1−e1=−12(x+1)(x−1) is a multiple of x−1 with e2≡1(modx2+1).

Combine and reduce. By the proof of Theorem 6.6.4, f≡2e1+xe2=(x2+1)−12x(x2−1)=−12x3+x2+12x+1. Modulo m=(x−1)(x2+1)=x3−x2+x−1, add 12m: f=−12x3+x2+12x+1+12(x3−x2+x−1)=12x2+x+12=12(x+1)2. Check. f(1)=2. Modulo x2+1, f≡12(−1)+x+12=x.

By Theorem 6.6.4 (b), and since every g≡f(modm) satisfies both congruences (because x−1 and x2+1 divide m), the solutions are exactly g=12(x+1)2+h(x−1)(x2+1) with h∈Q[x].

Exercise (B3: The Lagrange basis sums to one)

Let c0,…,cn∈F be distinct with Lagrange basis (ℓ0,…,ℓn).

  • (a) Prove that ℓ0+ℓ1+⋯+ℓn=1.
  • (b) Prove more generally that ∑i=0ncikℓi=xk for k=0,1,…,n (with c0=1).
  • (c) For n=2 and nodes 0,1,2, verify (a) by expanding.

Solution.

  • (a) This is (b) with k=0.

  • (b) Let 0≤k≤n. Then xk∈F[x]≤n, and its value at ci is cik (Definition 0.8.6). By Theorem 6.6.1 (b), xk=∑icikℓi.

  • (c) ℓ0=(x−1)(x−2)2=12x2−32x+1, ℓ1=x(x−2)−1=−x2+2x, ℓ2=x(x−1)2=12x2−12x. Adding: x2 has coefficient 12−1+12=0, x has −32+2−12=0, and the constant is 1. So the sum is 1.

C. Going deeper

Exercise (C1: Interpolation over a finite field)

Let p be a prime and F=Fp.

  • (a) Explain why Theorem 6.6.1 cannot be applied with more than p nodes.
  • (b) Let E:Fp[x]≤p→Fpp, E(f)=(f(0),f(1),…,f(p−1)). Prove that E is linear and surjective but not injective, and find a nonzero polynomial in kerE.
  • (c) Deduce that every function Fp→Fp is the polynomial function of exactly one polynomial of degree at most p−1, but of more than one polynomial of degree at most p.

Solution.

  • (a) The theorem needs distinct nodes, and Fp has only p elements, so there are no p+1 distinct nodes.

  • (b) Linear. Each entry f↦f(c) is linear by Theorem 0.8.5. Surjective. The p elements 0,1,…,p−1 of Fp are distinct nodes, so for every (y0,…,yp−1), Theorem 6.6.1 (c) with n=p−1 gives f=∑iyiℓi∈Fp[x]≤p−1⊆Fp[x]≤p with E(f)=(y0,…,yp−1). Not injective. dim⁡Fp[x]≤p=p+1>p=dim⁡Fpp, so E is not injective by Corollary 2.3.2 (c). Concretely, g=∏c∈Fp(x−c) is monic of degree p, hence nonzero, and g(c)=0 for every c∈Fp, because one factor vanishes (Theorem 0.8.5).

  • (c) A function Fp→Fp is the same as its list of values (y0,…,yp−1). By (b), the restriction of E to Fp[x]≤p−1 is surjective, and it is injective because a polynomial of degree at most p−1 vanishing at p distinct points is 0 (Corollary 6.1.4). So exactly one polynomial of degree at most p−1 has the given values. In degree at most p, if f has the given values, so does f+g≠f, with g from (b). Unlike over R, a polynomial over Fp is not determined by its function.

Exercise (C2: Newton’s form of the interpolant)

Let c0,…,cn∈F be distinct. Put N0=1 and Nk=(x−c0)(x−c1)⋯(x−ck−1) for 1≤k≤n+1.

  • (a) Prove that (N0,…,Nn) is a basis of F[x]≤n.
  • (b) Let p=∑k=0nakNk. Show that p(ci)=∑k=0iakNk(ci) and Ni(ci)≠0. Explain why the coefficients a0,a1,… of the interpolant can be found one at a time, and show that a0=y0 and a1=y1−y0c1−c0.
  • (c) Let pn∈F[x]≤n interpolate y0,…,yn at c0,…,cn, and let cn+1 be a further node, distinct from the others, with a value yn+1. Prove that the interpolant pn+1∈F[x]≤n+1 is pn+1=pn+yn+1−pn(cn+1)Nn+1(cn+1)Nn+1.
  • (d) Find the Newton form of the interpolant of Exercise (B1: A Lagrange interpolant), and then the interpolant after adding the point (4,0). Why is this more economical than recomputing with Lagrange’s formula?

Hint: for (c), check the values of the right-hand side at all n+2 nodes.

Solution.

  • (a) Nk is a product of k monic linear factors, so it is monic of degree k (Theorem 0.8.3). The polynomials N0,…,Nn are nonzero with pairwise distinct degrees, hence linearly independent by Theorem 1.4.4. The list has length n+1=dim⁡F[x]≤n, so it is a basis by Theorem 1.6.4 (a).

  • (b) For k>i, Nk contains the factor x−ci, so Nk(ci)=0; this gives the formula for p(ci). And Ni(ci)=∏j<i(ci−cj) is a product of nonzero scalars, since the nodes are distinct, so it is nonzero. The conditions p(ci)=yi therefore form a lower triangular system: the i-th equation involves only a0,…,ai, with coefficient Ni(ci)≠0 on ai. Solving in the order i=0,1,…,n determines each ai from the earlier ones. For i=0: p(c0)=a0, so a0=y0. For i=1: y1=a0+a1(c1−c0), so a1=y1−y0c1−c0, the slope of the chord, the first “divided difference”.

  • (c) Let q be the right-hand side; the division is legal because Nn+1(cn+1)≠0 by (b). Then deg⁡q≤n+1. For i≤n, Nn+1(ci)=0, so q(ci)=pn(ci)=yi. At cn+1, q(cn+1)=pn(cn+1)+yn+1−pn(cn+1)=yn+1. By Theorem 3.7.3, q=pn+1.

  • (d) With nodes 0,1,2,3: N1=x, N2=x(x−1), N3=x(x−1)(x−2). Forward substitution: a0=p(0)=1; 0=p(1)=1+a1, so a1=−1; 1=p(2)=1−2+2a2, so a2=1; 10=p(3)=1−3+6+6a3, so a3=1. Thus p3=1−x+x(x−1)+x(x−1)(x−2)=x3−2x2+1, agreeing with Exercise (B1: A Lagrange interpolant). Adding (4,0): p3(4)=33 and N4(4)=4⋅3⋅2⋅1=24, so by (c) p4=x3−2x2+1−3324x(x−1)(x−2)(x−3)=x3−2x2+1−118x(x−1)(x−2)(x−3). One checks p4(4)=33−118⋅24=0. Adding a node changes every Lagrange polynomial, since each ℓi acquires a new factor; in Newton’s form the old coefficients a0,…,an survive and only one new coefficient is computed.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.