So I was given this question in my exam, and it is by no mean a homework.
Let A = \begin{pmatrix} 5 & 1 & 0 \\ 1 & 5 & 0 \\ 0 & 0 & 6 \end{pmatrix}
(a) Find the eigenvalues and a basis for each of the eigenspaces of A answer: $\lambda_1 = \lambda_3 = 6$ and $\lambda_2 = 4$
The corresponding basis are: For $\lambda_1 = \lambda_3 = 6$:
Span = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} and \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}
For $\lambda_2= 4$: Span = \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix}
now for the part (b): Show that $A$ is diagonalizable. Find an invertible matrix $P$ and a diagonal matrix $D$ such that $P^{-1} A P = D$ (do not verify).
So I assumed that since there is 2 distinct eigenvalues and 3 linearly independent eigenvectors, $A$ is diagonalizable. How do I continue? Should I assume that the entries of the diagonal matrix $D$ is the eigenvalues and proceed from there?
Thank you.