$L(q)=\sum_{i=0}^n{q(x_i)l_i(x)}=q(x)$ 
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.
 A: By Lagrange interpolation basics, the $l_i(x)$ are polynomials of degree $n$.
The linear combination of polynomials of degree $n$ produces a polynomial of degree from $0$ to $n$.
Given $n+1$ points there is a unique polynomial of degree $[0,n]$ that passes through them. For instance if you have $10$ points that are aligned , the interpolating polynomial will be the line of degree $1$ through them, or of degree $0$ if the line is horizontal.
The Lagrange interpolation produce a unique polynomial passing through the $n+1$ points. If these are actually corresponding $y_k=q(x_k)$ to a polynomial $q(x)$  of lower degree (over-interpolation), you get that polynomial: the coefficients of higher powers will be null.
To demonstrate this you shall connect Lagrange to  Newton Interpolation by divided differences, where, if the points are generated by a lower degree polynomial then the differences of higher order are null and the Newton interpolation has the same degree as $q(x)$.
You can find some help to this regard in this related post, or this other
