= Lagrange polynomial
{c}
{title2=$p_n(x)=\sum_{i=0}^n y_i\ell_i(x)$}
{wiki}
= Lagrange interpolation polynomial
{c}
{synonym}
= Lagrange interpolation
{c}
{synonym}
= Polynomial interpolant
{synonym}
The <Lagrange polynomial> writes the <interpolation polynomial> as a <linear combination> of <Lagrange cardinal polynomials>. Each one selects a single <interpolation node>, so the data values themselves become the coefficients:
$$
p_n(x)=\sum_{i=0}^n y_i\ell_i(x),\qquad
\ell_i(x)=\prod_{\substack{0\leq j\leq n\\j\ne i}}\frac{x-x_j}{x_i-x_j}.
$$
Distinct <interpolation nodes> make every denominator nonzero. At $x_j$, all terms vanish except $y_j\ell_j(x_j)=y_j$. This gives an explicit construction without solving for <monomial> coefficients. The elegance of the <Lagrange polynomial> is that it builds all constraints into the <basis>, leaving no equations to solve for the data values.
For $(x_0,x_1,x_2)=(0,1,2)$ and $(y_0,y_1,y_2)=(1,2,5)$, substitution gives
$$
p_2(x)=\frac{(x-1)(x-2)}2-2x(x-2)+\frac{5x(x-1)}2=x^2+1.
$$
At $x=1/2$, the <Lagrange cardinal polynomial> values are $3/8,3/4,-1/8$, so $p_2(1/2)=3/8+2(3/4)+5(-1/8)=5/4$. A negative <Lagrange cardinal polynomial> value is allowed: these weights sum to one but need not be <probabilities>.
The product form is especially useful for deriving <differentiation weights from nodal evaluations> and <quadrature rules>. For repeated numerical evaluation, the <barycentric interpolation formula> reorganizes the same <Lagrange polynomial> into precomputed weights and sums; it avoids evaluating every full product at every argument.
Back to article page