<s>[INST] Finding an invertible matrix P and some matrix C Find an invertible matrix $P$ and a matrix $C$ of the form 
$C=\begin{pmatrix}a & -b\\b & a\end{pmatrix}$
such that the given matrix $A$ has the form $A = PCP^{-1}$
$A=\begin{pmatrix}5 & -2\\1 & 3\end{pmatrix}$
The first thing i tried to do was to find the eigenvectors of matrix $A$ and i got these vectors (which i glued together to get matrix $P$ and  $P^{-1}$)
$P=\begin{pmatrix}1+ i& 1-i\\1 & 1\end{pmatrix}$
$P^{-1}=\begin{pmatrix}\frac{1}{2i} & \frac{-1+i}{2i}\\-\frac{1}{2i} & \frac{1+i}{2i}\end{pmatrix}$
Im not sure how to find the matrix $C$, i thought at first i could plug in the eigenvalues in the $C$ matrix, but i don't think that is what they problem i asking me to do.
Any help will be appreciated
 [/INST] To find $P$ and $C$, note that
$$A = PCP^{-1}\iff AP=PC$$
since A and C are similar we have that


*

*$Tr(A)=Tr(C) \implies 2a=8 \implies a=4$

*$\det(A)=\det(C) \implies a^2+b^2=17 \implies b=\pm1$


then let $P=[v_1\, v_2]$ and we have


*

*$Av_1=av_1+bv_2$

*$Av_2=-bv_1+av_2$


and with $v_1=(x,y)\quad v_2=(z,w)$ we have for $b=1$


*

*$5x-2y=4x+z\implies x-2y-z=0$

*$x+3y=4y+w\implies x-y-w=0$

*$5z-2w=-x+4z\implies x+z-2w=0$

*$z+3w=-y+4w\implies y+z-w=0$


and we find $v_1=(2,1)\, v_2=(0,1)$ and finally
$$C=\begin{pmatrix}4 & -1\\1 & 4\end{pmatrix}\quad P=\begin{pmatrix}2 & 0\\1 & 1\end{pmatrix}\quad P^{-1}=\begin{pmatrix}\frac12 & 0\\-\frac12 & 1\end{pmatrix}$$
</s>