
I did find the basis but I have no clue in solving the diagonal matrix part of the problem. Could someone please help me?

I did find the basis but I have no clue in solving the diagonal matrix part of the problem. Could someone please help me?
Copyright © 2021 JogjaFile Inc.
$$\text{det}(A-\lambda I)=0\\ \begin{vmatrix}1-\lambda&2&0\\2&2-\lambda&\sqrt2\\0&\sqrt2&1-\lambda\end{vmatrix}=0$$ Leaving the working out to you...You'll get $\lambda =4, \lambda = 1, \lambda =-1$. A matrix that is similar to $A$ is $P^{-1}AP$ where $P$ is an invertible matrix whose coloumns are eigenvectors of $A$. Start off with finding the eigenvectors of $A$ for all values of lambda $4, -1, 1$. I'll do when $\lambda=1$ and then you can do the rest.. Case $\lambda=1$ solve: $$\begin{pmatrix}0&2&0\\2&1&\sqrt2\\0&\sqrt2&0\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}$$ After row-reduction you'll end up with, (there's always a row consisting purely of zeros): $$\left(\begin{array}{ccc|c}1&0&\frac{1}{\sqrt2}&0\\0&1&0&0\\0&0&0&0\end{array}\right)$$ This gives you two equations: $$x+\frac{1}{\sqrt2}z=0\\y=0$$ Put $z=t$ and you'll get: $$z=t, x=-\frac{1}{\sqrt2}t \space \text{and} \space y=0$$
$$\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}-\frac{1}{\sqrt2}t\\0\\t\end{pmatrix}$$ Above is the eigenvector corresponding to $\lambda =1$ $(t\in R)$. You can make $t$ any value. This would be a column in $P$. Finding the eigenvectors corresponding to when $\lambda=-1, 4$ will give you the other columns of $P$ and $P$ will also be an invertible matrix (since distinct eigenvectors from different eigenspaces are linearly independent). You'll end up with something looking like this (when $t=1$) $$P=\begin{pmatrix}-\frac{1}{\sqrt2}&-&-\\0&-&-\\1&-&-\end{pmatrix}$$ Where the blanks represent the eigenvectors corresponding to when $\lambda=-1,4$. After this, you have everything so simply put what you have in the formula: $P^{-1}AP$ and calculate. $$P^{-1}AP=\begin{pmatrix}-\frac{1}{\sqrt2}&-&-\\0&-&-\\1&-&-\end{pmatrix}^{-1}\begin{pmatrix}1&2&0\\2&2&\sqrt2\\0&\sqrt2&1\end{pmatrix}\begin{pmatrix}-\frac{1}{\sqrt2}&-&-\\0&-&-\\1&-&-\end{pmatrix} =D$$
Remark: $P^{-1}AP=D$ where $D$ is a diagonal matrix whose diagonal entries are the eigenvalues of $A$. Therefore, we already know that $D$ is: $$D=\begin{pmatrix}1&0&0\\0&-1&0\\0&0&4\end{pmatrix}$$
Note: The eigenvalues must correspond to the eigenvector it is related to, so the first column of $D$ is when $\lambda =1$ and the column is the eigenvector corresponding to $\lambda=1$. So, the second column should be the eigenvector corresponding to when $\lambda=-1$ and the third column should be the eigenvector corresponding to when $\lambda=4$.
Theorem: If there exists an invertible matrix $P=(\underline{x}_1, \underline{x}_2...\underline{x}_n)_{n\times n}$ where $\underline{x}_i$ are eignevectors from the space corresponding to $\lambda_i$ (not necessarily unique) then $A$ is similar to $$D=\begin{pmatrix}\lambda_1&0&\cdots&0\\0&\lambda_2&\cdots&0\\\vdots&&&\ddots\\0&0&\cdots&\lambda_n\end{pmatrix}$$