# Unitary matrix - linear alg

I am going over old practice exams and came across this question:

Find the unitary matrix which diagonalizes the matrix

.......i 1 0
A = (-1 i 0 )
...... 0 0 -i

First off, can someone explain to me about unitary matrices and get me started on this question? I do not know where to begin solving it. Thank you!

Related Calculus and Beyond Homework Help News on Phys.org
Cyosis
Homework Helper
A unitary matrix is a matrix for which $U^{\dagger}U^{-1}=U^{-1}U^\dagger=I$. So $U^\dagger=U^{-1}$. A matrix B is diagonalizable if there exists a matrix C such that $C^{-1}BC$ is diagonal.

so i found the conjugate transpose of the matrix and got

(-i -1 0)
(1 -i 0)
(0 0 i)

is that a start?

Cyosis
Homework Helper
No, the idea is that you find $U^\dagger A U$. A need not be unitary. The first step is to find the eigenvalues of A and their respective eigenvectors. You can however use $A^\dagger$ to check if A is unitarily diagonalizable. A matrix A is unitarily diagonalizable if and only if $A^\dagger A=A A^\dagger$. Perhaps it's nice to check this for A, although of course A is unitarily diagonalizable.

After you have the eigenvectors check if they form an orthonormal set. If they don't you have to make an orthonormal set by the Gram-Schmidt process. Now make a matrix with its columns being the eigenvectors.

Last edited:
so i came up with the equation:
-h(h^2+1)+h^2 i

so the eigenvalues are 0, -i, and something else but i dont know how to find that. 0 = ih^2

the eigenvectors are (1,- i,0) , (0,0,1), and something..

Cyosis
Homework Helper
That equation doesn't look right to me. I got $(-i-\lambda)[(i-\lambda)(i-\lambda)+1]=0$

so its
$$\left|\begin{array}{ccc}i-\lambda & 1 & 0 \\ -1 & i-\lambda & 0 \\ 0 & 0 & -i-\lambda\end{array}\right|$$

so then
$[(i-\lambda)(i-\lambda)(-i-\lambda)]-[(-1)(1)(-i-\lambda)]=0$
oo.. i forgot the lambda for the last (-i) before.. ok so
$(i-\lambda)(i-\lambda)(-i-\lambda)-(i+\lambda)=0$
and so
$(-i-\lambda)[(i-\lambda)(i-\lambda)+1]=0$
is right

so eigenvalues are 0, -i, 2i
with eigenvectors: (1,- i,0), (0,0,1), (1, i,0)

ok... so as for orthonormal set:
(1,- i,0), (0,0,1) are perpendicular
(0,0,1), (1, i,0) are perpendicular

then? lost from there

Cyosis
Homework Helper
Well this set of eigenvectors is orthogonal and we want an orthonormal set. So you need to normalize them. After that you can simply form a matrix with the eigenvectors as columns. Then test if it's unitary and diagonalize the matrix A.

A tip when it comes to calculating determinants. You don't always have to start from the top left and work to the top right when you write a 3x3 determinant as the sum of 2x2 determinants. Like in this case the fastest way is:

$$\left|\begin{array}{ccc}i-\lambda & 1 & 0 \\ -1 & i-\lambda & 0 \\ 0 & 0 & -i-\lambda\end{array}\right|=(-i-\lambda)\left|\begin{array}{cc}i-\lambda & 1 \\ -1 & i-\lambda & \end{array}\right|$$

Start at the bottom right, because that row/column has the most zeros.

u1 = (1,- i,0)
u2 = (0,0,1) - (0+0+0)/... doesnt matter
u3 = (1, i,0) - (0+0+0)/... doesnt matter

so then i would divide by ||u||
u1: squareroot(1^2+(-i)^2+0) = 0 --well then itd be undef if u divide by 0
u2: 1
u3: 0

Cyosis
Homework Helper
A normalized vector has length 1. So $||u_1||=\sqrt{(u_1,u_1)}=\sqrt{2}$. Normalizing u1 gives $1/\sqrt{2}(1,-i,0)$. It works the same for the others.

ok. i ended up with the vectors
$(1/\sqrt{2}, -i/\sqrt{2}, 0), (0, 0, 1), (1/\sqrt{2}, i/\sqrt{2}, 0)$

which gives me the matrix
$$\left|\begin{array}{ccc}1/\sqrt{2} & 0 & 1/\sqrt{2} \\ -i/\sqrt{2} & 0 & i/\sqrt{2} \\ 0 & 1 & 0\end{array}\right|$$

and the conjugate transpose is
$$\left|\begin{array}{ccc}1/\sqrt{2} & i/\sqrt{2} & 0 \\ 0 & 0 & 1 \\ 1/\sqrt{2} & -i/\sqrt{2} & 0\end{array}\right|$$

then
$$\left|\begin{array}{ccc}1/\sqrt{2} & 0 & 1/\sqrt{2} \\ -i/\sqrt{2} & 0 & i/\sqrt{2} \\ 0 & 1 & 0\end{array}\right|$$ * $$\left|\begin{array}{ccc}1/\sqrt{2} & i/\sqrt{2} & 0 \\ 0 & 0 & 1 \\ 1/\sqrt{2} & -i/\sqrt{2} & 0\end{array}\right|$$ = $$\left|\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right|$$

so then the unitary matrix/answer is:
$$\left|\begin{array}{ccc}1/\sqrt{2} & i/\sqrt{2} & 0 \\ 0 & 0 & 1 \\ 1/\sqrt{2} & -i/\sqrt{2} & 0\end{array}\right|$$
?

Cyosis
Homework Helper
Yep that is correct. You've shown that $U^\dagger U=I$. Therefore U is unitary. You can test if U indeed diagonalizes A by calculating $U^\dagger A U$.

ok. thank you!