Q) Consider the matrix A=$ \left( \begin{array}{ccc} -2 & 6 & 10 \\ -2 & 5 & 5 \\ 0 & 0 & 2 \end{array} \right)$ with entries in $C$. Find a diagonal matrix $D$ and an invertible matrix $P$ such that $D=P^{-1}AP$.
A) I found the characteristic polynomial to equal $(\lambda-2)^2(\lambda-1)$. So D=$ \left( \begin{array}{ccc}
2 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 1 \end{array} \right)$. I then calculated,
$1I_3-A$=
$\left( \begin{array}{ccc}
1 & -2 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0 \end{array} \right)$. So found the third column of P to be $(2,1,0)^T$. But I got
$2I_3-A$= $\left( \begin{array}{ccc} 2 & -3 & -5 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array} \right)$. So I am confused about how to calculate the first two columns of P. I have been over my working and don't know where I have gone wrong. Any hints would be appreciated. I am also unsure of how to deal with the repeated eigenvalue.