Prove existence and uniqueness of general polynomial basis. Show that given any $n$ distinct real numbers $x_1,...., x_n$ there exists a unique basis {$p_1,...,p_n$} of $P_{n-1}(\Bbb{R})$ such that
$$p_i(x_j)=\begin{cases} 1, & \text{if $i=j$}\\0 & \text{otherwise}\end{cases}$$
The vector space is polynomials of $(n-1)$ degrees or less. 
 A: Hint:
Check how Lagrange interpolation polynomials are defined and define your polynomials $p_i$ as 
$p_i(x)=(x-x_1)(x-x_2) \dots(x-x_{i-1})(x-x_{i+1})\dots(x-x_n) \cdot \dfrac{1}{(x_i-x_1)(x_i-x_2) \dots(x_i-x_{i-1})(x_i-x_{i+1})\dots(x_i-x_n)}$.
Then, $p_i(x)$ satisfies given conditions. Now, you have $n$ polynomials in $n-$dimensional space, so it is enough to show that they are linearly independent to form a basis.
A: Take $p_i(x)=\prod_{k\neq i}\frac{x-x_k}{x_i-x_k}$.
A: The $n$ polynomials used in Lagrange interpolation, namely
$$p_j(x):=\prod_{k\ne j}{x-x_k\over x_j-x_k}\qquad(1\leq j\leq n)$$
are of degree $\leq n-1$, hence elements of $P_{n-1}({\mathbb R})$, and satisfy $p_j(x_k)=\delta_{jk}$. On the other hand they are linearly independent in $P_{n-1}({\mathbb R})$, because each of them has a property that cannot be realized by any linear combination of the others, namely $p_j(x_j)=1$. Since $P_{n-1}({\mathbb R})$ is $n$-dimensional this proves that the $p_j$ actually form a basis of $P_{n-1}({\mathbb R})$.
