The plot is inspired by chapter 5.3 in the book.
A Lagrange interpolation curve has the following formula: \( C(t) = \displaystyle\sum_{i=0}^{d} L_{d,i}(t)\ c_i\), where \(d\) is the polynomial degree and where \(t \in[t_0, t_d]\), see chapter 5.3 in the book. The Lagrange polynomials are the basis functions with the formula: \(L_{d,i}(t) = \displaystyle\prod_{\substack{j=0\\ j\neq i}}^{d} \frac{(t-t_j)}{(t_i-t_j)} \) The following property is what provides interpolation: \(L_{d,i}(t_i) = 1\) and \(L_{d,i}(t_j) = 0, \ j \neq i \). The construction of the Lagrange polynomials is the simplest and most logical to achieve precisely these properties..
The derivative of a Lagrange polynomial is: \( L'_{d,i}(t) = \displaystyle\sum_{\substack{j=0\\ j \neq i}}^{d} \left(\frac{1}{t_i-t_j} \displaystyle\prod_{\substack{k=0\\ k\neq (i,j)}}^{d} \frac{(t-t_j)}{(t_i-t_k)}\right) = L_{d,i}(t) \displaystyle\sum_{\substack{j=0\\ j \neq i}}^{d}\frac{1}{t-t_i} \).
For degree 3 we will get: \( L_{3,0}(t) = \frac{(t-t_1)(t-t_2)(t-t_3)}{(t_0-t_1)(t_0-t_2)(t_0-t_3)} \), \( L_{3,1}(t) = \frac{(t-t_0)(t-t_2)(t-t_3)}{(t_1-t_0)(t_1-t_2)(t_1-t_3)} \), \( L_{3,2}(t) = \frac{(t-t_0)(t-t_1)(t-t_3)}{(t_2-t_0)(t_2-t_1)(t_2-t_3)} \) and \( L_{3,3}(t) = \frac{(t-t_0)(t-t_1)(t-t_2)}{(t_3-t_0)(t_3-t_1)(t_3-t_2)} \). In matrix form, the Lagrange polynomials are:
\( \begin{bmatrix} \frac{-t_1t_2t_3}{(t_0-t_1)(t_0-t_2)(t_0-t_3)} & \frac{t_1t_2+t_1t_3+t_2t_3}{(t_0-t_1)(t_0-t_2)(t_0-t_3)} & \frac{-(t_1+t_2+t_3)}{(t_0-t_1)(t_0-t_2)(t_0-t_3)} & \frac{1}{(t_0-t_1)(t_0-t_2)(t_0-t_3)}\\ \frac{-t_0t_2t_3}{(t_1-t_0)(t_1-t_2)(t_1-t_3)} & \frac{t_0t_2+t_0t_3+t_2t_3}{(t_1-t_0)(t_1-t_2)(t_1-t_3)} & \frac{-(t_0+t_2+t_3)}{(t_1-t_0)(t_1-t_2)(t_1-t_3)} & \frac{1}{(t_1-t_0)(t_1-t_2)(t_1-t_3)}\\ \frac{-t_0t_1t_3}{(t_2-t_0)(t_2-t_1)(t_2-t_3)} & \frac{t_0t_1+t_0t_3+t_1t_3}{(t_2-t_0)(t_2-t_1)(t_2-t_3)} & \frac{-(t_0+t_1+t_3)}{(t_2-t_0)(t_2-t_1)(t_2-t_3)} & \frac{1}{(t_2-t_0)(t_2-t_1)(t_2-t_3)}\\ \frac{-t_0t_1t_2}{(t_3-t_0)(t_3-t_1)(t_3-t_2)} & \frac{t_0t_1+t_0t_2+t_1t_2}{(t_3-t_0)(t_3-t_1)(t_3-t_2)} & \frac{-(t_0+t_1+t_2)}{(t_3-t_0)(t_3-t_1)(t_3-t_2)} & \frac{1}{(t_3-t_0)(t_3-t_1)(t_3-t_2)} \end{bmatrix} \begin{bmatrix} 1 \\ t\\ t^2 \\ t^3 \end{bmatrix} \). This matrix is then the basis shift matrix from a monomial 3rd degree basis to the Lagrange polynomials of degree 3.
Conversely, the basis shift matrix from the Lagrange polynomials of degree 3 to a monomial basis is: \( \begin{bmatrix} -1 & -1 & -1 & -1 \\ t_{0} & t_{1} & t_{2} & t_{3} \\ t_{0}^{2} & t_{1}^{2} & t_{2}^{2} & t_{3}^{2} \\ t_{0}^{3} & t_{1}^{3} & t_{2}^{3} & t_{3}^{3} \end{bmatrix}\).