Solution (source code)

= Solution

The <characteristic polynomial> is
$$
\det(A-\lambda I)=(1-\lambda)(-1-\lambda)+2=\lambda^2+1.
$$
Thus the <eigenvalues> are $i$ and $-i$. There is no real <diagonalization>, because a real <diagonal matrix> would have real <eigenvalues>. Over the <complex numbers>, the two distinct <eigenvalues> give <linearly independent> <eigenvectors>, so the <matrix> is diagonalizable.

For $\lambda=i$, the first row gives $(1-i)x+2y=0$. Choose $x=2$, giving $y=-1+i$. Its standard complex <norm> is $\sqrt{|2|^2+|-1+i|^2}=\sqrt6$; the conjugate <eigenvector> belongs to $-i$. Hence normalized <eigenvectors> and a suitable <change of basis> are
$$
\boxed{\mathbf p_+=\frac1{\sqrt6}\begin{pmatrix}2\\-1+i\end{pmatrix},\qquad
\mathbf p_-=\frac1{\sqrt6}\begin{pmatrix}2\\-1-i\end{pmatrix},\qquad
P=\frac1{\sqrt6}\begin{pmatrix}2&2\\-1+i&-1-i\end{pmatrix}.}
$$
Directly, $AP=P\operatorname{diag}(i,-i)$ and $\det P=-2i/3\ne0$, so
$$
\boxed{P^{-1}AP=\begin{pmatrix}i&0\\0&-i\end{pmatrix}.}
$$
Normalization does not assert that these <eigenvectors> are <orthogonal>.