Consider the matrix A below: $$A = \begin{pmatrix} 3 & 2 & 2 \\ -1 & 0 & -2 \\ 1 & 2 & 4\end{pmatrix}$$
Is the matrix A diagonalizable? If so, then find a diagonal matrix D and an invertible matrix P such that $P^{-1}AP=D$.
I know it is supposed to be diagonalizable but I have tried to solve it and haven't succeeded. The format I'm used to is $A=PDP^{-1}$.
Thanks.
Doing some regular computations for eigenvalues and eigenvectors you should find
$$\matrix{ {{\lambda _1} = 2} \hfill & \to \hfill & {{X_1} = \left[ {\matrix{ { - 2} \cr 0 \cr 1 \cr } } \right]} \hfill & {{X_2} = \left[ {\matrix{ { - 2} \cr 1 \cr 0 \cr } } \right]} \hfill \cr {{\lambda _2} = 3} \hfill & \to \hfill & {{X_3} = \left[ {\matrix{ 1 \cr { - 1} \cr 1 \cr } } \right]} \hfill & {} \hfill \cr } $$
and hence your matrix $P$ will be
$$P = \left[ {\matrix{ {{X_1}} & {{X_2}} & {{X_3}} \cr } } \right] = \left[ {\matrix{ \hfill { - 2} & \hfill { - 2} & \hfill 1 \cr \hfill 0 & \hfill 1 & \hfill { - 1} \cr \hfill 1 & \hfill 0 & \hfill 1 \cr } } \right]$$
and finally
$$D = {P^{ - 1}}AP = \left[ {\matrix{ 2 & 0 & 0 \cr 0 & 2 & 0 \cr 0 & 0 & 3 \cr } } \right]$$
will be the diagonal matrix where its diagonal elements are the eigenvalues. However, as $\lambda_1=2$ had multiplicity $2$, it will appear twice on the diagonal here! :)