# Barycentric Lagrange Interpolation

DevFeed: [Barycentric Lagrange Interpolation](<https://devfeed.tech/articles/barycentric-lagrange-interpolation-40504.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/shortform/2024-06-21-1107/>)

Published: 2024-06-21T18:07:50Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Computing](<https://devfeed.tech/topics/computing.md>), [Haskell](<https://devfeed.tech/topics/haskell.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [article](<https://devfeed.tech/tags/article.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [math](<https://devfeed.tech/tags/math.md>), [shortform](<https://devfeed.tech/tags/shortform.md>)

## AI overview

The article explains barycentric Lagrange interpolation, a numerically more stable reformulation of the classical Lagrange interpolation formula. It derives the formula by factoring a common polynomial and canceling it through an interpolation identity, while noting its relevance to polynomial approximation and its limited numerical concerns in finite-field secret sharing.

## Source excerpt

In my studies of the Remez algorithm, I learned about the barycentric Lagrange interpolation formula. The context is finding a polynomial of degree at most $n$ that passes through $n+1$ points $(x_0, y_0), \dots, (x_n, y_n)$. The classical Lagrange interpolation formula is what you'd write down if you "just did it." $$f(x) = \sum_{i=0}^n y_i \cdot \prod_{j \neq i}\frac{x - x_j}{x_i - x_j}$$ I wrote a 2014 article deriving this more gently, and implementing it in Haskell for secret sharing.