Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)
- To: mathgroup at smc.vnet.net
- Subject: [mg48448] Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)
- From: Marcus Stollsteimer <marcus314 at yahoo.com>
- Date: Sun, 30 May 2004 06:12:09 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello, for those of you that work with complex matrices and have not upgraded to 5.0.1 so far, this might be interesting: Eigensystem[] does not give the correct eigenvalues / eigenvectors for complex matrices bigger than 256x256. (this bug has been reported to WRI and is fixed in 5.0.1) You might want to play with the following code: myrand:=Random[Complex]; estest[dimension_] := Module[{m,evals,evecs}, m = Table[myrand,{dimension},{dimension}]; m = (m+Transpose[Conjugate[m]])/2; {evals,evecs} = Eigensystem[m]; Conjugate[evecs].m.Transpose[evecs]-DiagonalMatrix[evals]//Chop ] testdims[min_, max_]:= Module[{res}, Do[res = estest[dim]; If[res == Table[0,{dim},{dim}], Print[dim, ": ok"], Print[dim, ": ", Norm[res]]] ,{dim,min,max} ] ] estest[d] tests the Eigensystem[] function by diagonalizing a dxd random hermitian matrix. The result of estest[] should be a zero matrix. If it is not, testdims[] prints the Norm of the matrix. In the interesting range it gives for example: In:= testdims[252,262] 252: ok 253: ok 254: ok 255: ok 256: ok 257: 28.0521 258: 16.3056 259: 23.794 260: 18.0421 261: 25.0661 262: 26.4264 With myrand:=Random[Real] there doesn't seem to be a problem, at least not in this range of matrix dimensions. Or am I missing something...? Regards, Marcus -- Sometimes the delete key is your greatest friend. -- Steve Martin