Originally Posted by
NonCommAlg obviously we also need to have $\displaystyle a_i \neq a_j,$ for $\displaystyle i \neq j.$ anyway, again, we have $\displaystyle B=\{P_1, \cdots , P_{n+1} \} \subset \mathbb{R}_n[x]$ and $\displaystyle \dim_{\mathbb{R}} \mathbb{R}[x]=n+1.$ so, in order to show that $\displaystyle B$ is a basis for $\displaystyle \mathbb{R}_n[x],$ we only need
first see that for any $\displaystyle i$ we have $\displaystyle P_i(a_i)=1$ and $\displaystyle P_j(a_i)=0,$ for $\displaystyle i \neq j.$ now, to show that $\displaystyle B$ is linearly independent, suppose that $\displaystyle \sum_{j=1}^{n+1}c_j P_j(x)=0,$ for some $\displaystyle c_j \in \mathbb{R}.$ put $\displaystyle x=a_i$ to get $\displaystyle c_i=0. \ \Box$