The matrix $A = \left[\begin{array}{ccc}2&-1&3\\1&2&1\\0&0&1\end{array}\right]$ has the eigenvalues $\lambda_1 = -1$, $\lambda_2 = 2+i$ and $\lambda_3 = 2-i$ and the corresponding eigenvectors are $v_1 = \left[\begin{array}{ccc}1\\0\\-1\end{array}\right] $, $v_2 = \left[\begin{array}{ccc}1\\i\\0\end{array}\right] $ and $v_3 = \left[\begin{array}{ccc}1\\-i\\0\end{array}\right] $
How can I find a real matrix $M$ such that: $$M^{-1}A M = \left[\begin{array}{ccc}1&0&0\\0&2&1\\0&-1&2\end{array}\right] ?$$
$v_1 = \pmatrix{-2\\1\\1},v_2 = \pmatrix{1\\i\\0},v_3 = \pmatrix{1\\-i\\0}$
Now, unfortunately I have forgotten the whys of it but, if you can locate the complex entries such that the complex parts are equal and across the main daigonal from one annother....i.e.
$P = \pmatrix{1&i&-2\\i&-1&-1\\0&0&1}$ then you can do this...
$M = \pmatrix{1&1&-2\\1&-1&-1\\0&0&1}$
$\pmatrix{2&-1&3\\1&2&1\\0&0&1}=M\pmatrix{2&1&0\\-1&2&0\\0&0&1}M^{-1}$