Question: Generating GUE Random Matrices and their eigenvalues - problems

I have been trying to do this for some while now but am not having much luck.

Basically what I need is a hermitian matrix, with real values on the diagonals X~N(0,1) and complex values on the off diagonals X~N(0,1/2)+i*N(0,1/2)

Obviously as its hermitian I need Xij = Xji*

I have tried a few things but can't get anything to work correctly, in my latest attempt I decided to try and construct the 2x2 case from scratch using if and for loops;

for i to n do

for j to n do

if i <> j then

A[i, j] := I*Generate(distribution(Normal(0, .5)));

A[j, i] := -A[i, j]; B[i, j] := Generate(distribution(Normal(0, .5)));

B[j, i] := B[i, j] end if;

if i = j then B[i, j] := Generate(distribution(Normal(0, 1))) end if

end do end do;

C := A+B

Where C gives me the hermitian matrix but when I try to work out the Eigenvalues using the maple command Eigenvalues(C) it gives me completely wrong values (gives complex numbers when should be real).

I have had this problem (Eigenvalue computation) with several other methods I have tried please can you help me find a way to make this work properly??

Please Wait...