Derivation: Lagrange basis functions

How the requirement to equal 1 at one node and 0 at the others forces the product form of the LiL_i functions.

From the cardinal property to the formula

  1. We want Li(x)L_i(x) to vanish at every node except xix_i. To vanish at xjx_j (jij\ne i) it suffices to include the factor (xxj)(x-x_j) for each one:

    numerador=j=0jin(xxj)\text{numerador}=\prod_{\substack{j=0\\ j\ne i}}^{n}(x-x_j)
  2. That product has some value (not 1) at xix_i. To normalize it to 1 we divide by its value at xix_i, i.e. the same product evaluated there:

    Li(x)=j=0jinxxjxixjL_i(x)=\prod_{\substack{j=0\\ j\ne i}}^{n}\frac{x-x_j}{x_i-x_j}
  3. Thus Li(xi)=1L_i(x_i)=1 and Li(xj)=0L_i(x_j)=0. The combination iLi(x)f(xi)\sum_i L_i(x)\,f(x_i) reproduces each datum, hence interpolates.