I was given as an assignment to diagonalize the following matrix:
$\left(\begin{array}{cc} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{array}\right)$
I started by finding the eigenvectors and got:
$v_{1}=\left(\begin{array}{c} 1\\ -i \end{array}\right)$, $v_{2}=\left(\begin{array}{c} 1\\ i \end{array}\right)$
then I normalized the vectors and composed a unitary matrix:
$U=(v_1|v_2)=\frac{1}{\sqrt{2}}\left(\begin{array}{cc} 1 & 1\\ -i & i \end{array}\right)$
The problem is in the final step:
$U^{*}AU=\left(\frac{1}{\sqrt{2}}\left(\begin{array}{cc} 1 & i\\ 1 & -i \end{array}\right)\right)\left(\begin{array}{cc} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{array}\right)\left(\frac{1}{\sqrt{2}}\left(\begin{array}{cc} 1 & 1\\ -i & i \end{array}\right)\right)$
This doesn't produce a diagonal matrix.
Is there any mistake in these stages?
Many thanks.
I think it's just a matter of computational mistake:
$$P=\frac1{\sqrt 2}\begin{pmatrix}\;1&1\\\!\!-i&i\end{pmatrix}\implies P^{-1}=\frac1{\sqrt 2}\begin{pmatrix}1&\;i\\1&\!\!-i\end{pmatrix}$$
And now check that you indeed get
$$P^{-1}AP=\begin{pmatrix}e^{i\theta}&0\\0&e^{-i\theta}\end{pmatrix}$$
as expected.