Answer: The eigenvalue corresponding to \(\begin{pmatrix}1\\-1\\1\end{pmatrix}\) is \(-3\).
For \(\lambda=4\), an eigenvector is \(\begin{pmatrix}1\\1\\0\end{pmatrix}\). For \(\lambda=6\), an eigenvector is \(\begin{pmatrix}1\\-1\\-2\end{pmatrix}\).
One suitable choice is \(\mathbf P=\begin{pmatrix}1&1&1\\-1&1&-1\\1&0&-2\end{pmatrix}\), \(\mathbf D=\begin{pmatrix}-3&0&0\\0&4&0\\0&0&6\end{pmatrix}\).
The eigenvalues of \(\mathbf B\) are \(-3\), \(4\), and \(6\), with corresponding eigenvectors \(\begin{pmatrix}2\\1\\0\end{pmatrix}\), \(\begin{pmatrix}15\\5\\3\end{pmatrix}\), and \(\begin{pmatrix}17\\7\\3\end{pmatrix}\), respectively.
First multiply \(\mathbf A\) by the given eigenvector:
\(\mathbf A\begin{pmatrix}1\\-1\\1\end{pmatrix}=\begin{pmatrix}-3\\3\\-3\end{pmatrix}=-3\begin{pmatrix}1\\-1\\1\end{pmatrix}\).
So the corresponding eigenvalue is \(-3\).
For \(\lambda=4\), solve \((\mathbf A-4\mathbf I)\mathbf x=\mathbf0\). A corresponding eigenvector is
\(\begin{pmatrix}1\\1\\0\end{pmatrix}\).
For \(\lambda=6\), solve \((\mathbf A-6\mathbf I)\mathbf x=\mathbf0\). A corresponding eigenvector is
\(\begin{pmatrix}1\\-1\\-2\end{pmatrix}\).
Using these eigenvectors as the columns of \(\mathbf P\), in the same order as their eigenvalues, gives
\(\mathbf P=\begin{pmatrix}1&1&1\\-1&1&-1\\1&0&-2\end{pmatrix}\), and \(\mathbf D=\begin{pmatrix}-3&0&0\\0&4&0\\0&0&6\end{pmatrix}\).
Then \(\mathbf A=\mathbf P\mathbf D\mathbf P^{-1}\).
Now \(\mathbf B=\mathbf Q\mathbf A\mathbf Q^{-1}\), so
\(\mathbf B=\mathbf Q\mathbf P\mathbf D\mathbf P^{-1}\mathbf Q^{-1}=(\mathbf Q\mathbf P)\mathbf D(\mathbf Q\mathbf P)^{-1}\).
Therefore \(\mathbf B\) has the same eigenvalues \(-3\), \(4\), and \(6\), and its corresponding eigenvectors are the columns of \(\mathbf Q\mathbf P\).
Calculate
\(\mathbf Q\mathbf P=\begin{pmatrix}-2&15&-17\\-1&5&-7\\0&3&-3\end{pmatrix}\).
So a corresponding set of eigenvectors for \(\mathbf B\) is
\(\begin{pmatrix}2\\1\\0\end{pmatrix}\), \(\begin{pmatrix}15\\5\\3\end{pmatrix}\), and \(\begin{pmatrix}17\\7\\3\end{pmatrix}\), for eigenvalues \(-3\), \(4\), and \(6\), respectively.