Copied to clipboard!
Math Tools

Lagrange Interpolation Calculator

Find polynomials, evaluate points, and visualize interpolation

Lagrange Polynomial Interpolation

Enter data points to find the unique polynomial passing through all points

# x y = f(x)

Minimum 2 points required. X values must be unique.

Quick Add Sample Points

Evaluate Polynomial at Points

Calculate P(x) values for specific x coordinates

⚠️ No polynomial calculated yet
Go to "Interpolator" tab and calculate a polynomial first

Lagrange Basis Polynomials

View the individual Li(x) polynomials that form the interpolation

⚠️ No polynomial calculated yet
Calculate a polynomial in the "Interpolator" tab first

Interactive Visualizer

Explore the polynomial with customizable chart settings

⚠️ No polynomial to visualize
Calculate a polynomial in the "Interpolator" tab first

Lagrange Interpolation Reference

Formulas, properties, and theoretical background

Main Formula
P(x) = Σi=0n yi · Li(x)
Basis Polynomial Definition
Li(x) = Πj=0, j≠in (x - xj) / (xi - xj)
Kronecker Delta Property
Li(xj) = δij = { 1 if i = j, 0 if i ≠ j }
Key Properties
Uniqueness

For n+1 distinct points, there exists exactly one polynomial of degree at most n passing through all points.

Interpolation

The polynomial exactly passes through all given data points: P(xi) = yi for all i.

Degree

For n+1 points, the interpolating polynomial has degree at most n (may be less if points are collinear, etc.).

Error Analysis
Interpolation Error
f(x) - P(x) = f(n+1)(ξ) / (n+1)! · Πi=0n(x - xi)

for some ξ in the interval containing x and all xi

Runge's Phenomenon

High-degree polynomial interpolation on equally spaced points can produce oscillations near the interval edges. Use Chebyshev nodes for better results.

Applications
Numerical Methods
  • Function approximation
  • Numerical integration
  • Root finding algorithms
  • ODE solvers
Data Science
  • Missing data imputation
  • Curve fitting
  • Signal reconstruction
  • Image processing
Engineering
  • Control systems
  • CAD/CAM design
  • Animation curves
  • GPS positioning

Understanding Lagrange Interpolation

What Is Lagrange Interpolation?

A method to find the unique polynomial of lowest degree passing through a given set of points.

  • Named after Joseph-Louis Lagrange
  • Published in 1795
  • Fundamental in numerical analysis
  • Exact at interpolation points
How It Works

Constructs basis polynomials that are 1 at one point and 0 at all others.

  • Li(xi) = 1
  • Li(xj) = 0 for j ≠ i
  • Sum weighted by y values
  • P(x) = Σ yiLi(x)
Computational Notes

While elegant, direct Lagrange form has considerations.

  • O(n²) complexity per evaluation
  • Adding points requires full recomputation
  • Use barycentric form for stability
  • Consider Newton form for efficiency