Example BDE Building desired eigenvalues

In Example ESMS4 the $4\times 4$ symmetric matrix \begin{equation*} C= \begin{bmatrix} 1 & 0 & 1 & 1\\ 0 & 1 & 1 & 1\\ 1 & 1 & 1 & 0\\ 1 & 1 & 0 & 1 \end{bmatrix} \end{equation*} is shown to have the three eigenvalues $\lambda=3,\,1,\,-1$. Suppose we wanted a $4\times 4$ matrix that has the three eigenvalues $\lambda=4,\,0,\,-2$. We can employ Theorem EPM by finding a polynomial that converts $3$ to $4$, $1$ to $0$, and $-1$ to $-2$. Such a polynomial is called an interpolating polynomial, and in this example we can use \begin{equation*} r(x)=\frac{1}{4}x^2+x-\frac{5}{4} \end{equation*}

We will not discuss how to concoct this polynomial, but a text on numerical analysis should provide the details. For now, simply verify that $r(3)=4$, $r(1)=0$ and $r(-1)=-2$.

Now compute \begin{align*} r(C)&=\frac{1}{4}C^2+C-\frac{5}{4}I_4\\ &= \frac{1}{4} \begin{bmatrix} 3 & 2 & 2 & 2\\ 2 & 3 & 2 & 2\\ 2 & 2 & 3 & 2\\ 2 & 2 & 2 & 3 \end{bmatrix} + \begin{bmatrix} 1 & 0 & 1 & 1\\ 0 & 1 & 1 & 1\\ 1 & 1 & 1 & 0\\ 1 & 1 & 0 & 1 \end{bmatrix} -\frac{5}{4} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 1 & 1 & 3 & 3\\ 1 & 1 & 3 & 3\\ 3 & 3 & 1 & 1\\ 3 & 3 & 1 & 1 \end{bmatrix} \end{align*}

Theorem EPM tells us that if $r(x)$ transforms the eigenvalues in the desired manner, then $r(C)$ will have the desired eigenvalues. You can check this by computing the eigenvalues of $r(C)$ directly. Furthermore, notice that the multiplicities are the same, and the eigenspaces of $C$ and $r(C)$ are identical.

(in context)