Read this lesson as text

Lagrange Interpolation

Numerical Analysis · Axiom Academy

An elegant explicit formula for the interpolating polynomial Instead of solving a system of equations, construct the polynomial directly using basis polynomials that "turn on" at one point and "turn off" at all others. Then the interpolating polynomial is simply: The basis polynomial Lᵢ(x) that equals 1 at xᵢ and 0 at all other points: The numerator is zero when x = xⱼ for any j ≠ i (one factor becomes zero) When x = xᵢ, the numerator equals the denominator, giving Lᵢ(xᵢ) = 1 Find the polynomial through (0, 1), (1, 3), (2, 2). Explicit formula — no system to solve Easy to understand and prove correctness Adding a new point requires recomputing everything Evaluating at each x requires O(n²) operations Numerical instability for large n For these reasons, Newton's form (using divided differences) is often preferred in practice. Barycentric Lagrange Interpolation A more efficient reformulation that reduces evaluation to O(n): Where the weights wⱼ are precomputed once: Adding a new point only requires computing one new weight Used in modern interpolation software

This is the written version of the interactive lesson above. See the full Numerical Analysis course.