In
numerical analysis
Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, polynomial interpolation is the
interpolation
In the mathematics, mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points.
In engineering and science, one ...
of a given
data set
A data set (or dataset) is a collection of data. In the case of tabular data, a data set corresponds to one or more table (database), database tables, where every column (database), column of a table represents a particular Variable (computer sci ...
by the
polynomial
In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
of lowest possible degree that passes through the points in the dataset.
Given a set of data points
, with no two
the same, a polynomial function
is said to interpolate the data if
for each
.
There is always a unique such polynomial, commonly given by two explicit formulas, the
Lagrange polynomial
In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data.
Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' ...
s and
Newton polynomials.
Applications
The original use of interpolation polynomials was to approximate values of important
transcendental functions such as
natural logarithm
The natural logarithm of a number is its logarithm to the base of a logarithm, base of the e (mathematical constant), mathematical constant , which is an Irrational number, irrational and Transcendental number, transcendental number approxima ...
and
trigonometric function
In mathematics, the trigonometric functions (also called circular functions, angle functions or goniometric functions) are real functions which relate an angle of a right-angled triangle to ratios of two side lengths. They are widely used in all ...
s. Starting with a few accurately computed data points, the corresponding interpolation polynomial will approximate the function at an arbitrary nearby point. Polynomial interpolation also forms the basis for algorithms in
numerical quadrature (
Simpson's rule) and
numerical ordinary differential equations
Numerical methods for ordinary differential equations are methods used to find Numerical analysis, numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although ...
(
multigrid methods).
In
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
, polynomials can be used to approximate complicated plane curves given a few specified points, for example the shapes of letters in
typography
Typography is the art and technique of Typesetting, arranging type to make written language legibility, legible, readability, readable and beauty, appealing when displayed. The arrangement of type involves selecting typefaces, Point (typogra ...
. This is usually done with
Bézier curve
A Bézier curve ( , ) is a parametric equation, parametric curve used in computer graphics and related fields. A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approxima ...
s, which are a simple generalization of interpolation polynomials (having specified tangents as well as specified points).
In numerical analysis, polynomial interpolation is essential to perform sub-quadratic multiplication and squaring, such as
Karatsuba multiplication and
Toom–Cook multiplication, where interpolation through points on a product polynomial yields the specific product required. For example, given ''a'' = ''f''(''x'') = ''a''
0''x''
0 + ''a''
1''x''
1 + ··· and ''b'' = ''g''(''x'') = ''b''
0''x''
0 + ''b''
1''x''
1 + ···, the product ''ab'' is a specific value of ''W''(''x'') = ''f''(''x'')''g''(''x''). One may easily find points along ''W''(''x'') at small values of ''x'', and interpolation based on those points will yield the terms of ''W''(''x'') and the specific product ''ab''. As fomulated in Karatsuba multiplication, this technique is substantially faster than quadratic multiplication, even for modest-sized inputs, especially on parallel hardware.
In
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, polynomial interpolation also leads to algorithms for
secure multi party computation and
secret sharing
Secret sharing (also called secret splitting) refers to methods for distributing a secrecy, secret among a group, in such a way that no individual holds any intelligible information about the secret, but when a sufficient number of individuals c ...
.
Interpolation theorem
For any
bivariate data points
, where no two
are the same, there exists a unique polynomial
of degree at most
that interpolates these points, i.e.
.
Equivalently, for a fixed choice of interpolation nodes
, polynomial interpolation defines a linear
bijection
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equival ...
between the (''n''+1)-tuples of real-number values
and the
vector space
In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
of real polynomials of degree at most ''n'':
This is a type of
unisolvence theorem. The theorem is also valid over any infinite
field in place of the real numbers
, for example the rational or complex numbers.
First proof
Consider the
Lagrange basis functions given by:
Notice that
is a polynomial of degree
, and we have
for each
, while
. It follows that the linear combination:
has
, so
is an interpolating polynomial of degree
.
To prove uniqueness, assume that there exists another interpolating polynomial
of degree at most
, so that
for all
. Then
is a polynomial of degree at most
which has
distinct zeros (the
). But a non-zero polynomial of degree at most
can have at most
zeros, so
must be the zero polynomial, i.e.
.
Second proof
Write out the interpolation polynomial in the form
Substituting this into the interpolation equations
, we get a
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
in the coefficients
, which reads in matrix-vector form as the following
multiplication
Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
:
An interpolant
corresponds to a solution
of the above matrix equation
. The matrix ''X'' on the left is a
Vandermonde matrix, whose determinant is known to be
which is non-zero since the nodes
are all distinct. This ensures that the matrix is
invertible
In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers.
Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that ...
and the equation has the unique solution
; that is,
exists and is unique.
Corollary
If
is a polynomial of degree at most
, then the interpolating polynomial of
at
distinct points is
itself.
Constructing the interpolation polynomial
Lagrange Interpolation
We may write down the polynomial immediately in terms of
Lagrange polynomial
In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data.
Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' ...
s as:
For matrix arguments, this formula is called
Sylvester's formula and the matrix-valued Lagrange polynomials are the
Frobenius covariants.
:
Newton Interpolation
Theorem
For a polynomial
of degree less than or equal to
, that interpolates
at the nodes
where
. Let
be the polynomial of degree less than or equal to
that interpolates
at the nodes
where
. Then
is given by:
where
also known as Newton basis and
.
Proof:
This can be shown for the case where
:
and when
:
By the uniqueness of interpolated polynomials of degree less than
,
is the required polynomial interpolation. The function can thus be expressed as:
Polynomial coefficients
To find
, we have to solve the
lower triangular matrix formed by arranging
from above equation in matrix form:
:
The coefficients are derived as
: