Re: Bug or feature in Eigensystem[]?
- To: mathgroup@smc.vnet.net
- Subject: [mg11727] Re: [mg11691] Bug or feature in Eigensystem[]?
- From: David Withoff <withoff@wolfram.com>
- Date: Thu, 26 Mar 1998 03:08:55 -0500
> Dear Mathematica users > > Usually, given a real symmetric matrix, Eigensystem[] returns what > anyone would expect: real eigenvectors. But about one time in a > thousand (for my example matrices, see below), it turns out that > Eigensystem[] returns complex eigenvectors. > > This behavior occurs sporadically even for real numerical matrices that > are nonsingular, symmetric, and diagonally dominant, with sparse > off-diagonal entries -- these are exactly the matrices that > Eigensystem[] *should* handle most easily. The matrices need not be > large -- my examples are dimension {18,18}. > > Because of this bug -- or is it a "feature"? -- better call it a > "behavior" -- there seems to be no reliable way on my platform (a Mac > PowerBook G3) to compute the real orthonormal eigenvectors of a real > symmetric matrix -- so I am quite distressed & would welcome > suggestions. I would particularly appreciate it if other people would > try to reproduce this behavior on their platforms. > > I have posted a notebook which duscusses this behavior at: > > ftp://ftp.u.washington.edu/public/sidles/EigenBug.nb > > It does not seem to be discussed on the Mathematica support page: > > http://www.mathematica.com/support/Math > > but it *should* be discussed there -- this behavior can really can > really mess up a quantum mechanical calculation. And even if you know > it is present, it is not clear how to fix it. Advice is welcome. > > Thanks ... JAS > > --------------------------------------------------------------------- > John A. Sidles, Ph.D. email: sidles@u.washington.edu > Associate Professor phone: (206) 543-3690 Department of > Orthopaedics FAX: (206) 685-3139 Box 356500, School of > Medicine PAGE: (206) 989-9462 (to page me, University of > Washington dial, await "beep", enter Seattle WA > 98195-6500 USA phone number, press "#") > --------------------------------------------------------------------- This is just a guess, but this behavior looks suspiciously similar to other behaviors that are known to be normal effects of numerical error. A good method in nearly all such examples, both for solving the problem and for testing if it is an effect of numerical error, is to redo the calculation using Mathematica infinite precision arithmetic instead of machine arithmetic. Machine arithmetic has lots of idiosyncracies. Since Mathematica provides an alternative, you may as well use it. Dave Withoff Wolfram Research