I am asked to show that $\sum_{k=0}^{n} x_k \ell_k(x) = x$ where $\ell_k(x)$ is the $k$th cardinal function $\ell_k(x) = \prod_{\substack{j = 0 \\ j \neq k}}\frac{x - x_j}{x_k - x_j}$.
I have tried doing some elementary expanding, but I don't see any cancellation. Can someone please give some hint on how I should go about this exercise? I'm then asked to do the same problem but for $x_k^{h}$ for $n \geq h$.
The point is that $\ell_k(x_j)=\delta_{kj}$ so that $$p_n(x_j)=\sum_{k=0}^nx_k\ell_k(x_j)=\sum_{k=0}^nx_k\delta_{kj}=x_j$$ For $0\le j\le n$. Since $p_n(x)-x$ is a polynomial of degree at most $n$ with $n+1$ zeros, it must be the zero polynomial, so $p_n(x)=x$. Hope you can get the part with $p_n(x)=x^h$ now.