Linear Algebra – Lagrange Basis Functions in Polynomial Space

linear algebrapolynomials

Suppose $L$ be a Vector Space of Polynomials of $x$ of degree $\leq n-1$ with coefficients in the field $\mathbb{K}$.

Define $$g_i(x) :=\prod _ {{j=1},{j\neq i}}^n \frac{x-a_j}{a_i-a_j}$$ Show that the polynomials $g_1(x), g_2(x),…,g_n(x)$ form a basis of L. Furthermore, show that coordinates of polynomial $f$ in this basis are $\{f(a_1),f(a_2),…,f(a_n)\}.$

To show that the polynomials are the bases, I need to show that they span $L$ and that they are linearly independent. I thought showing that any element in the set $\{1,x,x^2,…,x^{n-1}\}$ belongs to the span of $\{g_1(x), g_2(x),…,g_n(x)\}$ would be enough to show the $g_1(x), g_2(x),…,g_n(x)$ spans $L.$ But I don't know how to do this! Also, linear independence seems to be tougher!

Best Answer

Here is very easy method to show that they are linearly independent.

Suppose that $$b_1g_1(x)+b_2g_2(x)+...+b_ng_n(x)=0$$ To show linear independence, it suffices to show that $$b_1=b_2=...=b_n=0$$ Evaluate $$b_1g_1(x)+b_2g_2(x)+...+b_ng_n(x)=0$$ at $$x=a_i\;\;\;\;\forall i\le n$$

You can notice that $$g_i(a_j)=\begin{cases}0&i\neq j \\ 1 & i=j\end{cases}$$

It follows that $$b_1=b_2=b_3=...=b_n=0$$

To see that the coordinates are given as such, consider a general polynomial as above $$f(x)=c_1g_1(x)+c_2g_2(x)+...+c_ng_n(x)=0$$

Follow same thing as above, start substituting $x=a_i$, you will see that $$c_1=f(a_1)$$ and so on.

Best of luck. I hope I could help.