Chapter 3 proved that through points with
distinct -values
there passes exactly one polynomial of degree at most
(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: “” says that leaves remainder on division by . 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 .
The
Lagrange basis
Suppose we want the polynomial of degree at most
taking prescribed
values at distinct points . The
problem is linear in the data: if fits the values and fits , then fits , by Theorem 0.8.5. So it
is enough to solve the simplest data sets, a single
and zeros
everywhere else, and add up.
The polynomial that vanishes at every with is easy to write:
. At it takes the value
, which is a product of non-zero scalars,
so we can divide by it. In Example (Dual Bases in )
we met these polynomials for the three points . Here is the
general case.
The -th
Lagrange polynomial is the polynomial of degree that is at the -th node and at every other
node.
Definition
6.6.1 (Lagrange Basis)
Let ,
and let be distinct. For , the
-th
Lagrange polynomial for these nodes is
The list is the Lagrange
basis for the nodes .
In words: the numerator makes vanish at every
node except ,
and the denominator rescales so that the value at is exactly . The points are called
nodes.
Well-definedness. Each denominator
with
is non-zero
because the nodes are distinct, so the
quotients exist in . The product has linear factors, each
with leading coefficient ,
so
by Theorem 0.8.3. The
name “basis” is justified by the theorem below.
Examples.
- One node. For the product is
empty, so . The degenerate case is consistent: a
polynomial of degree at most with value at is the constant .
- Two nodes. For , we get and . The line through and is .
- Three nodes. For , , and , the polynomials of Example (Dual Bases in ).
(Here we index the nodes by their values.)
Non-example by minimal change. Take
the nodes .
The numerator of is still defined,
, but
the denominator contains , which has no inverse. No rescaling
helps: a polynomial that vanishes at cannot take the
value at . The clause that
fails is “distinct”.
Everything about the Lagrange polynomials follows
from one table of values, the Kronecker delta .
Theorem
6.6.1 (Lagrange Interpolation)
Let ,
let be distinct, and let
be the Lagrange basis for these nodes.
- (a)
for all .
- (b)
is a basis of , and every satisfies
- (c) For all ,
the unique with for every is
Idea. ① The delta table is a direct
evaluation. ② Evaluating a vanishing combination at kills every term but
, so the list is
independent, and it has the right length, so we count
instead of checking spanning. ③ The expansion of and the interpolation
formula are the same computation: both sides of a
candidate identity are polynomials of degree at most
with the same
values at
nodes.
Proof.
(a) By Theorem 0.8.5, . If , every factor is
, so . If , the factor with
is , so .
(b) Each has degree , so it lies in . Let . Evaluating at and using (a) gives
for each . Hence the list is
linearly independent. It has length
(Example (Standard Bases)),
so it is a basis by Theorem 1.6.4
(a).
Now let , and put . By (a),
for every . So has the distinct roots
and
degree at most .
By Corollary 6.1.4, , which is the
expansion of .
- (c) By (a), , so has the
required values, and it lies in . 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
is determined by
its values at the nodes, because those values are its
coordinates in the Lagrange basis.
Solution. The nodes are distinct.
Write for the Lagrange polynomials,
indexed by the node. The denominators are : Expanding, By Theorem 6.6.1 (c),
. Collecting coefficients:
Hence , the polynomial found by
elimination in Example (A cubic through four points),
as uniqueness demands. The elimination solved a 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 , not exactly . Through the
three points the formula gives , where and
; this is . The degree- terms cancel, because
the points lie on a line. Each has degree exactly
, but a
combination of them need not.
Quick check. Let and let
be the Lagrange basis for distinct nodes . What is
?
Solution. It is the polynomial
. Indeed since
, and its
values at the nodes are , so Theorem 6.6.1 (b)
gives .
Evaluations
are the dual basis
The delta table
can be read the other way round. For , evaluation at
is the linear
functional (Example (Four Families of Functionals)),
which we restrict to . Then the
table says : 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 be distinct, with Lagrange basis .
Then is the dual basis of
in . In
particular, every linear functional on is a
combination of evaluations at the nodes:
The first formula of Theorem 5.1.3 (c), , 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
and the measurements “value at ”.
The formula for has a practical
reading: any linear measurement of a
polynomial of degree at most can be computed from
of its
values, with weights that do
not depend on the polynomial.
Example
(Integrals and Slopes from Values)
- (a) Find
such that
for every .
- (b) Express on
as a
combination of .
Solution.
(a) Integration
over is a
linear functional on (Example (Four Families of Functionals)).
For the nodes , Their integrals are , and . By Corollary 6.6.2, Check with : the right side is . This is
Simpson’s rule, which here is exact rather than
approximate because has degree at most
.
(b) With , and , the derivatives at are , and . Hence for every , the
symmetric difference quotient, exact on
quadratics.
Congruences
and the Chinese Remainder Theorem
Now we change the point of view. By Theorem 6.1.3, the
remainder of on
division by
is . So the
interpolation conditions say that
leaves the
remainder on
division by , for each . Nothing in this
reformulation needs the divisors to be linear. What
happens if we prescribe the remainders modulo arbitrary
polynomials ? The integers faced the same question long
ago, which explains the name of the answer. We first
need the language of congruences, copied from .
Definition
6.6.2 (Congruence Modulo a Polynomial)
Let .
Two polynomials are congruent modulo , written , if
.
For example, , and for every , by Theorem 6.1.3.
Congruence modulo
is an equivalence relation, and it respects sums and
products: if and , then and are divisible by . By Theorem 6.1.1, if
, every
is congruent
modulo to
exactly one polynomial of degree less
than , its
remainder: gives , and if with both degrees below , then with
, which forces .
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 . If
is coprime to each , then there are with , and
is coprime to .
- (b) Let
be non-zero and pairwise coprime, that
is, whenever . If for every , then .
Proof.
(a) By Corollary 6.2.4, for
each there are
with .
Multiplying these
identities, for some , because every term of the expanded
product except contains a factor . Let . By Theorem 6.2.3, divides and , hence
divides , where . So is a non-zero constant
by Theorem 0.8.3, and
being monic, .
Hence and are
coprime (Definition 6.2.3).
(b) We use
induction on . For
there is
nothing to prove. Let . The moduli are pairwise coprime and each
divides , so by
the induction hypothesis divides , say . Since , and
is coprime to
by (a), Theorem 6.2.8 gives
, say
. Then
, as claimed.
Theorem
6.6.4 (Chinese Remainder Theorem for
Polynomials)
Let be non-zero and pairwise coprime, and put
.
For all :
- (a) there is with
for every ;
- (b) if and both satisfy (a), then
;
- (c) there is
exactly one such with .
Idea. Copy Lagrange. There, was at and at the other nodes; in
the new language, and . So we look for with
and for , and then works. To be modulo every other
, should be a multiple
of ; to be modulo , it should be . Bézout’s
identity provides exactly such an element: .
Proof.
(a) Fix , and let . Since is coprime to each
with , Lemma 6.6.3 (a) gives
with . Put . Then , so , and for
, so .
Let . Since congruence modulo respects sums and
products, for each .
(b) If and satisfy (a), then , that is, , for every
. By Lemma 6.6.3 (b), .
(c) Since each
, (Theorem 0.8.3). Let
be as in (a), and
let be its
remainder on division by (Theorem 6.1.1). Then
, so for each , and . If
is another
solution with , then by (b), and , so . This proves the theorem.
Lagrange is the case .
For distinct nodes, is a non-zero
constant, so , and any common divisor of and divides : the moduli are
pairwise coprime. The congruence means by Theorem 6.1.3, and
. So
part (c) is Theorem 3.7.3. The
element has
degree less than after reduction modulo , is at and at the other nodes, so
after reduction it is .
Example
(A Linear and a Quadratic Modulus)
Find the polynomial of degree less than with
Solution. Bézout. Divide
by : . Hence and the moduli are coprime, since any common
divisor divides .
The elements . Put
and . Then is a multiple of
and ; symmetrically,
and .
Combine and reduce. By the proof of Theorem 6.6.4, . Expanding, Dividing by gives
quotient
and remainder Check. , so . Modulo , , so .
Warning. The moduli must be
coprime in pairs; coprime as a whole family is not
enough. Without coprimality a system can be
unsolvable: with and , the system , has
no solution: the first condition says , the second says
, so
. For three
moduli, , and have no common
factor, yet the first and third share , and , is again impossible.
Example
(Values and Slopes by CRT)
- (a) Let and . Show that
if and only if and .
- (b) Find the with
, , and .
Solution.
(a) Divide by
: with
(Theorem 6.1.1).
Writing , which is possible because is a basis of
by Theorem 1.4.4 and Theorem 1.6.4, the
uniqueness of the remainder says
exactly when and . Now . By Theorem 6.4.4, , so . Hence
the congruence holds if and only if and .
(b) By (a), the
conditions are and . The
moduli are coprime, since So is
and , while is and . The polynomial is the smooth step
of Example (Prescribing Values and Slopes):
value and slope
at , value and slope at . By Theorem 6.6.4, is the remainder of
on division by . Adding gives Check. ; ,
so ;
; .
The same recipe handles any finite set of nodes with multiplicities
: the moduli
are
pairwise coprime for distinct nodes, by Lemma 6.6.3 (a)
applied twice: first is coprime to , and then
is
coprime to . So for any prescribed remainders
modulo , there is exactly one polynomial of
degree less than with those remainders. In characteristic
, the Taylor
expansion of Theorem 6.4.7
translates “the remainder modulo ” into the
values , and this is
Hermite interpolation.
The
quotient space
Congruence modulo is equality of cosets.
The ideal is a subspace of : it is non-empty and
closed under addition and under multiplication by
constant polynomials (Definition 6.2.1). So
the quotient space of
Definition 4.4.3
exists, and by Lemma 4.4.3 (b),
An element of is
a polynomial “known only modulo ”. We cannot quote Theorem 4.4.5 for
its dimension, because is
infinite-dimensional (Theorem 1.3.3). The
remainder does the job instead.
Theorem
6.6.5 (Dimension of )
Let
be non-zero of degree . Then is
finite-dimensional with If , the cosets form a basis.
Proof. If , then is a non-zero constant,
and every lies in . So
and the quotient is the zero space, of
dimension .
Let , and
define by letting be the remainder
of on division by
(Theorem 6.1.1).
Linear. If and , then for , and by Theorem 0.8.2. By the
uniqueness in Theorem 6.1.1, . Surjective. If , then , so
.
Kernel. exactly when for some , that is, .
By the First Isomorphism Theorem (Theorem 4.4.7),
, , is a well-defined injective linear map
with image , so it is an isomorphism. Since
for , and is
a basis of (Example (Standard Bases)),
the inverse isomorphism carries it
to the basis (Theorem 2.5.2). Hence
.
For example, has basis , so each element is
for unique .
The Chinese Remainder Theorem now becomes a statement
about linear maps. Reducing a polynomial modulo each
records its
remainders; the
theorem says that this record, taken modulo , is a perfect
dictionary. Recall from Definition 4.4.1
that is the space of lists with entrywise
operations.
Theorem
6.6.6 (CRT as an Isomorphism)
Let be non-zero and pairwise coprime, and put
.
Then is a well-defined isomorphism of vector
spaces.
Idea. The map that does not care
about well-definedness is on itself. Its kernel
is the set of polynomials divisible by every , which is 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 , because degrees
add under products.
Proof. Let , . 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),
if and
only if
for every . If
, then
for all
, since ; conversely,
if every , then by Lemma 6.6.3 (b). Hence
.
By the First Isomorphism Theorem (Theorem 4.4.7),
the rule is a well-defined
injective linear map; this is . By Theorem 6.6.5, Theorem 0.8.3 and Theorem 4.4.1,
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 does. In Chapter 9
this splitting of
into pieces, one for each coprime factor of , reappears as a
splitting of a space on which an operator acts. The next
section begins that story.
Quick check. What is ? Into which three spaces does Theorem 6.6.6 split
it, and what does do to the coset of
?
Solution. By Theorem 6.6.5, the
dimension is .
Since with distinct linear factors, which are
pairwise coprime, maps it
isomorphically onto , a product of three one-dimensional
spaces. Modulo , a polynomial is congruent to its value at
, so is the list of cosets of the constants
: the values
of at .
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define the
Lagrange basis for distinct nodes , and
state the value of at .
- (b) True or false:
for four distinct nodes, the polynomial of degree at
most through the
four points always has degree exactly . Justify your
answer.
- (c) State the
Chinese Remainder Theorem for polynomials, with all
hypotheses.
- (d) True or false:
if , then every system ,
, has a
solution. Justify your answer.
- (e) What is ? Give a basis.
- (f) Which functional
on is
the -th vector of
the dual basis (Theorem 5.1.3) of the
Lagrange basis?
Solution.
(a) For distinct
, (Definition 6.6.1), and
(Theorem 6.6.1
(a)).
(b) False. The
points are fitted by the zero polynomial,
of degree ;
by uniqueness (Theorem 3.7.3),
that is the interpolant.
(c) If
are non-zero and pairwise coprime and , then
for all there is with
for each , unique
modulo , and
exactly one such
has (Theorem 6.6.4).
(d) False. , , have gcd as a family, but , ,
has no solution: the last condition gives
,
contradicting the first.
(e) , with basis of
cosets modulo , by Theorem 6.6.5.
(f) Evaluation at
the -th node,
(Corollary 6.6.2).
B. Practice
Exercise
(B1: A Lagrange interpolant)
Let . Write down the Lagrange basis for
these nodes in factored form, and use it to find the
with , , and . Hence compute .
Solution. The denominators are , , and . So By Theorem 6.6.1 (c),
. Expanding each needed
term, The coefficient of is ; of ,
; of
, ; the constant is . Hence Check: , , , . Hence .
Exercise
(B2: A CRT system)
Find the polynomial of degree less than with
and . Hence describe all satisfying
both congruences.
Solution. Bézout. , so , and the
moduli are coprime.
The elements .
is a multiple of and .
And is a multiple of with .
Combine and reduce. By the proof of Theorem 6.6.4, . Modulo , add : Check. . Modulo , .
By Theorem 6.6.4 (b), and
since every satisfies both congruences (because and divide ), the solutions are
exactly with .
Exercise
(B3: The Lagrange basis sums to one)
Let be distinct with Lagrange basis .
- (a) Prove that .
- (b) Prove more
generally that for (with ).
- (c) For and nodes , verify (a) by
expanding.
Solution.
(a) This is (b)
with .
(b) Let . Then , and
its value at is
(Definition 0.8.6). By
Theorem 6.6.1 (b),
.
(c) , , .
Adding: has
coefficient , has , and the constant is . So the sum is .
C. Going deeper
Exercise
(C1: Interpolation over a finite field)
Let be a prime
and .
- (a) Explain why Theorem 6.6.1 cannot
be applied with more than nodes.
- (b) Let , . Prove that is linear and
surjective but not injective, and find a non-zero
polynomial in .
- (c) Deduce that
every function is the polynomial function of exactly one
polynomial of degree at most , but of more than
one polynomial of degree at most .
Solution.
(a) The theorem
needs distinct nodes, and has only elements, so there are
no distinct
nodes.
(b)
Linear. Each entry is linear
by Theorem 0.8.5.
Surjective. The elements of
are distinct
nodes, so for every , Theorem 6.6.1 (c) with
gives
with . Not injective. , so is not injective by Corollary 2.3.2 (c).
Concretely, is monic of degree , hence non-zero, and
for every
,
because one factor vanishes (Theorem 0.8.5).
(c) A function
is
the same as its list of values . By
(b), the restriction of to is
surjective, and it is injective because a polynomial of
degree at most vanishing at distinct points is
(Corollary 6.1.4). So
exactly one polynomial of degree at most has the given
values. In degree at most , if has the given values,
so does , with
from (b). Unlike over , a polynomial over
is not
determined by its function.
Exercise
(C2: Newton’s form of the interpolant)
Let be distinct. Put and for .
- (a) Prove that is a
basis of .
- (b) Let . Show that and . Explain
why the coefficients of the interpolant can be found one
at a time, and show that and .
- (c) Let
interpolate at , and let be a further
node, distinct from the others, with a value . Prove that the
interpolant is
- (d) Find the Newton
form of the interpolant of Exercise (B1: A Lagrange interpolant),
and then the interpolant after adding the point . Why is this more
economical than recomputing with Lagrange’s
formula?
Hint: for (c), check the values of the right-hand
side at all
nodes.
Solution.
(a) is a product of monic linear factors,
so it is monic of degree (Theorem 0.8.3). The
polynomials are non-zero with pairwise distinct
degrees, hence linearly independent by Theorem 1.4.4. The
list has length , so it is a basis by Theorem 1.6.4
(a).
(b) For , contains the factor
, so ; this gives
the formula for . And is a product of non-zero scalars, since
the nodes are distinct, so it is non-zero. The
conditions therefore form a lower triangular system:
the -th equation
involves only , with coefficient on . Solving in the order
determines each
from the earlier ones. For : , so . For : , so , the slope of the chord, the first
“divided difference”.
(c) Let be the right-hand side;
the division is legal because by
(b). Then . For , , so . At , . By Theorem 3.7.3,
.
(d) With nodes
: , , .
Forward substitution: ; , so ; , so ; , so . Thus agreeing with Exercise (B1: A Lagrange interpolant).
Adding :
and
, so by (c) One checks . Adding a
node changes every Lagrange polynomial,
since each
acquires a new factor; in Newton’s form the old
coefficients survive and only one new coefficient is
computed.