Let $x_0,x_1,\cdots,x_n$ be $n+1$ nodes of interpolation to some $f$ and let $L(f)=\sum_{i=0}^n{f(x_i)l_i(x)}$ be a linear transformation. Show that $L$ have the property of $L(q)=q$ for all polynomial $q$ of grade at most $n$.
My process: By the Lagrange interpolation we have that $L(q)(x)=\sum_{i=0}^n{q(x_i)l_i(x)}=\sum_{i=0}^n{q(x_i)\prod_{i=0\\j\not=i}^n \left[\frac{x-x_j}{x_i-x_j}\right]}$, so if $x=x_k$ for some $k=0,1,\cdots,n$ we have two cases:
- If $k=i$ then $\prod_{i=0\\j\not=i}^n \left[\frac{x_k-x_j}{x_i-x_j}\right]=1$
- If $k\not=i$ then $\prod_{i=0\\j\not=i}^n \left[\frac{x_k-x_j}{x_i-x_j}\right]=0$
So $L(q)(x_k)=\sum_{i=0}^n{q(x_i)\prod_{i=0\\j\not=i}^n \left[\frac{x_k-x_j}{x_i-x_j}\right]}=q(x_k)$
But if $x\not=x_k$ for all $k=0,1,\cdots,n$ i don't know how to prove it, can you help me with some hint, please.