# Homework Help: Find a unitary matrix U such that U*AU is diagonal

1. May 10, 2012

### Kiefer

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

I found the eigenvalues to be -1,-1,-1,7
and the eigenvectors to be (v1)=(-1,1,0,0),(v2)=(-1,0,1,0),(v3)=(-1,0,0,1),(v4)=(1,1,1,1)
Normalize these vectors: ||(v1)||=sqrt(2),||(v2)||=sqrt(2), ||(v3)||=sqrt(2), ||(v4)||=2
So a unitary matrix is
U=
1/sqrt(2) -1/sqrt(2) -1/sqrt(2) -1/sqrt(2)
1/sqrt(2) 0 0 1/2
0 1/sqrt(2) 0 1/2
0 0 1/sqrt(2) 1/2

But this does not satisfy U*AU is diagonal, so I'm thinking I want to change the order of the vectors. But how do I know which one is satisfies the condition? (trial and error is rather tedious)

2. May 10, 2012

### sharks

U is simply the columns of eigenvectors arranged one next to the other, in the same order as the eigenvalues for the diagonal matrix.

For example, if the diagonal matrix:
$$D=U^{-1}AU= \displaystyle\left[ {\begin{array}{*{20}{c}} -1&0&0&0 \\ 0&-1&0&0 \\ 0&0&-1&0 \\ 0&0&0&7 \end{array}} \right]$$
Then, the corresponding matrix U will have the first column as the eigenvector corresponding the eigenvalue, $\lambda_1 = -1$, and so on, with the last column of matrix U as the eigenvector corresponding to $\lambda_4 = 7$.

Last edited: May 10, 2012