Let $p_k$ be the polynomial of degree $\leq k$ such that $p_k(x_i)=y_i$ for $0\leq i \leq k$. Prove that $p_k=p_{k-1}$ if and only if $p_{k-1}(x_k)=y_k$.
I'm a first year PhD student and I encountered this problem in one of my courses. I feel like I intuitively understand the solution to this problem, but I am not sure how to prove it. Any help would be appreciated. Thanks in advance
Let $V_k$ be the Vandermonde matrix of order $k + 1$ at the points $x_0,\ldots,x_k$. Then $V_k C_k = Y_k$, where $C_k$ is the vector of coefficients of $p_k$ and $Y_k = (y_0,\ldots,y_k)^T$. Assuming the points $x_0,\ldots,x_k$ are distinct, the matrix $V_k$ is invertible. Now, let $C_{k-1}$ be the coefficient vector for $p_{k-1}$ and let $Y_{k-1} = (y_0,\ldots,y_{k-1})^T$. If $p_{k-1}(x_k) = y_k$, then
$$ V_k \left[ \begin{array}{c} C_{k-1}\\ 0\\ \end{array}\right] = \left[ \begin{array}{c} Y_{k-1}\\ y_k\\ \end{array}\right] = Y_k $$
and by the invertibility of $V_k$
$$ \left[ \begin{array}{c} C_{k-1}\\ 0\\ \end{array}\right] = C_k $$
Thus, it follows that $p_{k-1} = p_{k}$. The other direction follows by the observation that $p_{k-1} = p_{k} \implies p_{k-1}(x_k) = p_k(x_k) = y_k$.