Unitary matrix U to diagonalize matrix A

diagonalizationgram-schmidtlinear algebraunitary-matrices

I'm working on this exercise and I got stuck.

Find a unitary matrix $U$ and a diagonal matrix $D$ such that $A=U^{*}DU$ for

$$A=\begin{pmatrix}1&i\\-i&1\end{pmatrix}$$

So what I decided to do was:

1) Find the characteristic polynomial and the eigenvalues:

$$p(\lambda)= det(A-\lambda I) = (1-\lambda^2)-1 = \lambda^2-2\lambda = \lambda(\lambda-2)$$
$$\lambda_1=0; \lambda_2=2$$

2) Find the eigenvectors:

$E_1$ for $\lambda_1=0$:

$\begin{pmatrix}1&i\\-i&1\end{pmatrix}$ $\begin{pmatrix}x\\y\end{pmatrix}$ $= \begin{pmatrix}0\\0\end{pmatrix}$

Endind up with $E_1=\begin{pmatrix}1\\-i\end{pmatrix}$

Similarly for $\lambda_2=2$, $E_2=\begin{pmatrix}1\\i\end{pmatrix}$

Finally getting $$P=\begin{pmatrix}1&1\\-i&i\end{pmatrix}$$

Then I decided to check if $P^{-1}AP=D$ holds true:

$\begin{pmatrix}1/2&-1/2i\\1/2&1/2i\end{pmatrix}$ $\begin{pmatrix}1&i\\-i&1\end{pmatrix}$ $\begin{pmatrix}1&1\\-i&i\end{pmatrix}$ = $\begin{pmatrix}2&0\\0&0\end{pmatrix}$

So with this computation, my next step would be apply the Gram-Schmidt process to the columns of $P$ to make it unitary, which is where I got stuck at the following:

Taking $v_1=\begin{pmatrix}1\\-i\end{pmatrix}$ I thought I had to normalize it, but then as I tried:
$\parallel v_1\parallel = \sqrt{1+(i)^2} = \sqrt{0}$.

Did I do a wrong computation? Is my process to find $U$ incorrect? Are there easier ways to do it?

Any help would be appreciated.

Best Answer

I think everything is fine, except that for a vector $v \in \mathbb{C}^n$, the definition of the norm is $||v|| = \sqrt{v^* v}$. So $||v_1|| = \sqrt{\bar 1 \cdot 1 + \bar i \cdot i} = \sqrt{2}$