construct a unitary matrix

584 Views Asked by At

Iam trying to construct a unitary matrix $V_{5x5}$ i.e $V*\overline{V^{*}}=I$. My supervisor said I have to choose a random matrix with real eigenvalues then the matrix of all eigenvectors is unitary(Why is this right?)

For example here is my random matrix $F=\left( \begin{array}{ccccc}1& 2& 3 &4 &5\\2& 2& 3& 4& 5\\1 &1& 0& 0 &0\\ 3& 4 &3& 4 &3\\3 &3& 3 &3 &7\end{array} \right)$,

I used Matlab to calculate the eigenvectors and the eigenvalues by $[V,D]=eig(F)$. Is $V$ the unitary matrix? I used $V*\overline{V^{*}}$ but it is not equal to the identity? I appreciate any help:)

1

There are 1 best solutions below

1
On BEST ANSWER

I'm under the impression it isn't returning orthogonal eigenvectors. It only is the case if it is a normal matrix. This isn't the case most of the time. In general you can take a matrix of "random" numbers like so.

F = [1,2,3,4,5; 2,2,3,4,5;1,1,0,0,0; 3,4,3,4,3;3,3,3,3,7]
[V,D] = eig(F)
[Q,R] = qr(V)

I = Q*Q.'

I =

    1.0000   -0.0000    0.0000   -0.0000    0.0000
   -0.0000    1.0000    0.0000    0.0000   -0.0000
    0.0000    0.0000    1.0000    0.0000   -0.0000
   -0.0000    0.0000    0.0000    1.0000    0.0000
    0.0000   -0.0000   -0.0000    0.0000    1.0000

n=5;
A = randn(n,n)
[Q,R] =qr(A);
I1 = Q*Q.'

I1 =

    1.0000    0.0000   -0.0000   -0.0000   -0.0000
    0.0000    1.0000    0.0000   -0.0000   -0.0000
   -0.0000    0.0000    1.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000    1.0000    0.0000
   -0.0000   -0.0000   -0.0000    0.0000    1.0000