Linear algebra - diagonizable matrix: find matrix P and D such that A = PDP^-1 Provide a P and a diagonal matrix D such that A = PDP^-1
Given:
A=
\begin{array}{l}-1-5i&1+2i&1+7i\\-4-14i&3+6i&1+19i\\-6+4i&3-2i&5-5i\end{array}
λ=1−i, 2−3i, 4
The matrix P would be: ____
The matrix D would be: ____
So I'm struggling to figure out how I would find the P and D matrices from matrix A. To find P, I thought I would have to find the eigenbasis of A which gave me:
P=
\begin{array}{l}-6+4i&3-2i&5-5i\\0&1/2-1/2i&-12/13+31/13i\\0&0&-48/13+20/13i\end{array}
And I thought for matrix D the general rule would just be to plug in the given eigenvalues diagonally in an empty matrix:
D=
\begin{array}{l}1-i&0&0\\0&2-3i&0\\0&0&4\end{array}
I'm told my answer is wrong, however. I'm not exactly sure if both my matrices are wrong or if it's just one of them, and I don't quite understand how I would acheive the correct values. I would appreciate any help or a push in the right direction!
 A: To find the columns of $P$, find the eigenvectors associated with each eigenvalue of $A$.
So for example, to find the first column of $P$, we find the eigenvector associated with the first eigenvalue, $\lambda = 1 - i$.  That is, we have to find a non-zero solution to the equation $(A - \lambda I)x = 0$. One approach to this is to row-reduce the matrix $A - \lambda I$.  Doing this gives us
$$
\left(\begin{array}{ccc} -2-4{}\mathrm{i} & 1+2{}\mathrm{i} & 1+7{}\mathrm{i}\\ -4-14{}\mathrm{i} & 2+7{}\mathrm{i} & 1+19{}\mathrm{i}\\ -6+4{}\mathrm{i} & 3-2{}\mathrm{i} & 4-4{}\mathrm{i} \end{array}\right)
\leadsto 
\left(\begin{array}{ccc} 1 & -\frac{1}{2} & 0\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{array}\right).
$$
Let $R$ denote the row-reduced form on the right. We want a non-zero solution to $Rx = 0$. We can write this system as
$$
\begin{cases}
x_1 - \frac 12 x_2 = 0\\
x_3 = 0
\end{cases} \implies 
\begin{cases}
x_2 = 2x_1\\
x_3 = 0.
\end{cases}
$$
So, taking $x_1 = 1$ gives us the the vector $x = (1,2,0)$, which we can take as the first column of our matrix $P$.
Following a similar procedure leads to $(- 2 + 1i, - 5 + 2i, 1)$ as the second column and $(2i, - 1 + 5i, 1)$ as the third column.
