# Math Help - Find a unitary matrix U such that U*AU is diagonal

1. ## Find a unitary matrix U such that U*AU is diagonal

For the following matrix A, find a unitary matrix U such that U*AU is diagonal:
A =
1 2 2 2
2 1 2 2
2 2 1 2
2 2 2 1

2. ## Re: Find a unitary matrix U such that U*AU is diagonal

I would think that, if you are asked to do a problem like this, you would know that you need to create U by taking the eigenvectors of A as columns.

3. ## Re: Find a unitary matrix U such that U*AU is diagonal

I found the following eigenvectors: (v1)=(1;1;1;1), (v2)=(-1;0;0;1), (v3)=(-1;0;1;0), (v4)=(-1;1;0;0).
I normalized them: ||(v1)|| = 2, ||(v2)|| = sqrt(2), ||(v3)|| = sqrt(2), ||(v4)|| = sqrt(2)
U=
1/2 -1/sqrt(2) -1/sqrt(2) -1/sqrt(2)
1/2 0 0 1/sqrt(2)
1/2 0 1/sqrt(2) 0
1/2 1/sqrt(2) 0 0

But as far as I can tell, this does not satisfy U*AU being diagonal.

4. ## Re: Find a unitary matrix U such that U*AU is diagonal

the trouble is, v2 and v3 are not orthogonal to each other, so your matrix U is NOT unitary.

try replacing v3 with (0,-1,1,0) (with is also an eigenvector corresponding to the eigenvalue -1).

now we need to find an eigenvector v4, corresponding to the eigenvalue -1 such that:

<v1,v4> = 0
<v2,v4> = 0
<v3,v4> = 0

the first equation tells us that if v4 = (a,b,c,d) that a+b+c+d = 0.

the second equation tells us that a = d, and the third tells us that b = c. so a logical choice is v4 = (1,-1,-1,1).

normalizing vectors, we get:

$U = \begin{bmatrix}1/2&-1/\sqrt{2}&0&1/2\\1/2&0&-1/\sqrt{2}&-1/2\\1/2&0&1/\sqrt{2}&-1/2\\1/2&1/\sqrt{2}&0&1/2 \end{bmatrix}$

a (somewhat tedious but) straight-forward calculation shows that:

U*AU = UTAU =

$\begin{bmatrix}7&0&0&0\\0&-1&0&0\\0&0&-1&0\\0&0&0&-1 \end{bmatrix}$

which is diagonal.