Interpolation is estimating unknown values between known values.
Generally, given data points, interpolation finds a smooth function that passes through all the data points.

Example: For the points (1,3) and (2,7), we can fit the function .
Now, we can provide values for x= 1.5, x = 1.32, x = 1.999 etc.

Practical Uses

  • We can go from a low-res photo to a high-res photo by interpolating; we are estimating the colour values of the newly generated pixels!

Types of Interpolation

  • Linear Interpolation (lerp) - connects two points with a straight line
  • Polynomial Interpolation - a single polynomial connects all points
    • Includes Lagrange, Newton interpolation techniques
  • Spline Interpolation - piecewise polynomials (avoids oscillations)

Naive Polynomial Interpolation

For data points, we can generate a polynomial of degree . This is an upper-bound for the degree that a polynomial must be to go through all the data points!

Example: Given data points (1,2), (3, 4), and (5,8). Give a polynomial interpolation

.

Subbing in the points:

Vandermonde Matrix

Generalised Theorem

Theorem: Given data points

Horner Scheme

Derived from just factoring out the each time

Limitations of Naive Polynomial Interpolation

  1. Finding the inverse of the Vandermonde matrix is expensive
  2. No support for incremental update; have to recalculate the polynomial from scratch
  3. Must find the whole function first (determine coefficients) before finding estimates for intermediate points

Lagrange Interpolation solves problems 1 and 3.
Newton Interpolation solves problems 2 and 3.

Lagrange Polynomial

Divided Difference

1st order divided difference is the gradient/rate-of-change of the line between the two parts.
2nd order divided difference is the rate of change of the 1st order divided differences.

Example: Evaluate for

First, calculate the 1st order divided differences.

Divided Difference Properties

Property 1:
Property 2: