MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)

  • To: mathgroup at
  • Subject: [mg48448] Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)
  • From: Marcus Stollsteimer <marcus314 at>
  • Date: Sun, 30 May 2004 06:12:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


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:


estest[dimension_] := Module[{m,evals,evecs},
  m = Table[myrand,{dimension},{dimension}];
  m = (m+Transpose[Conjugate[m]])/2;
  {evals,evecs} = Eigensystem[m];

testdims[min_, max_]:= Module[{res},
  Do[res = estest[dim];
     If[res == Table[0,{dim},{dim}],
        Print[dim, ": ok"], Print[dim, ": ", Norm[res]]]

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...?


Sometimes the delete key is your greatest friend. -- Steve Martin

  • Prev by Date: Re: Ted Ersek's Mathematica Tips Updated
  • Next by Date: Re: Number of roots from Solve?
  • Previous by thread: Plot Feature Concerning Number of Points Generated With Zero Function
  • Next by thread: Re: Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)