CS Wiki | Cedric Schwyter

Lagrange Interpolation of Polynomials

Lagrange Interpolation of Polynomials

(Copied/paraphrased/annotated from the script on Discrete Mathematics HS21 by Prof. Ueli Maurer)

Description

Recall the following lemma of polynomial algebra over fields:

πŸ“Œ A polynomial of degree at most is uniquely determined by any values of , i.e., by for any distinct .

The proof for this lemma is constructive and exhibits a formula with which to construct a polynomial of degree from values.

Proof of Lemma & Formula

Let for . Then is given by Lagrange’s interpolation formula:

where the polynomial is given by

Note that for to be well-defined, all constant terms in the denominator must be invertible. This is guaranteed if is a field since for . Note also that the denominator is simply a constant and hence is indeed a polynomial of degree . It is easy to verify that and for . Thus the polynomials and agree when evaluated at any , for all . We note that has degree at most .

It remains to prove the uniqueness. Suppose there is another polynomial of degree at most such that for . Then is also a polynomial of degree at most , which according to the following theorem can have at most roots, unless it is 0.

πŸ“– For a field , a nonzero polynomial of degree has at most roots, counting multiplicities.

But has indeed the roots . Thus it must be 0, which implies . This concludes the proof.

Visualization

Visualized Lagrange-Interpolation for a polynomial of second degree.

Visualized Lagrange-Interpolation for a polynomial of second degree.

In the visualization the polynomial is computed by adding up all the other polynomials corresponding to the colored parabolas. These colored parabolas correspond to as above. They are computed Lagrange polynomials (as above), with given by the yellow arguments for .

Further Resources

Lagrange polynomial - Wikipedia

This project is maintained by D3PSI