<s>[INST] If $b\ne 0$, orthogonally diagonalize \begin{bmatrix}a&0&b\\0&a&0\\b&0&a\end{bmatrix} I'm trying to calculate the eigenvalues as the first step of this problem, but it's leading me down this rabbit hole of countless computations to find all the eigenvalues. I'm confident I'm supposed to solve this a different way that is less tedious. Anyone able to give me a hand?
 [/INST] the eigenvalues of
$$
\left(
\begin{array}{cc}
0&1 \\
1&0 \\
\end{array}
\right)
$$
are $1,-1$  with eigenvectors as the columns of (orthogonal)
$$
\left(
\begin{array}{cc}
\frac{1}{\sqrt 2}& \frac{-1}{\sqrt 2}\\
\frac{1}{\sqrt 2}& \frac{1}{\sqrt 2}\\
\end{array}
\right)
$$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
the eigenvalues of
$$
\left(
\begin{array}{ccc}
0&0&1 \\
0&0&0 \\
1&0&0 \\
\end{array}
\right)
$$
are $1,0,-1$  with eigenvectors as the columns of (orthogonal)
$$
\left(
\begin{array}{cc}
\frac{1}{\sqrt 2}&0& \frac{-1}{\sqrt 2}\\
0&1&0 \\
\frac{1}{\sqrt 2}&0& \frac{1}{\sqrt 2}\\
\end{array}
\right)
$$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
the eigenvalues of
$$
\left(
\begin{array}{ccc}
0&0&b \\
0&0&0 \\
b&0&0 \\
\end{array}
\right)
$$
are $b,0,-b$  with eigenvectors as the columns of (orthogonal)
$$
\left(
\begin{array}{cc}
\frac{1}{\sqrt 2}&0& \frac{-1}{\sqrt 2}\\
0&1&0 \\
\frac{1}{\sqrt 2}&0& \frac{1}{\sqrt 2}\\
\end{array}
\right)
$$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
the eigenvalues of
$$
\left(
\begin{array}{ccc}
a&0&b \\
0&a&0 \\
b&0&a \\
\end{array}
\right)
$$
are $a+b,a,a-b$  with eigenvectors as the columns of (orthogonal)
$$
\left(
\begin{array}{cc}
\frac{1}{\sqrt 2}&0& \frac{-1}{\sqrt 2}\\
0&1&0 \\
\frac{1}{\sqrt 2}&0& \frac{1}{\sqrt 2}\\
\end{array}
\right)
$$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
</s>