Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Mathematica 6 obtains imaginary eigenvalues for a Hermitian matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86124] Re: Mathematica 6 obtains imaginary eigenvalues for a Hermitian matrix
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Sun, 2 Mar 2008 13:58:05 -0500 (EST)
  • References: <fqb9ai$na0$1@smc.vnet.net>

Sebastian Meznaric wrote:
> I have a 14x14 Hermitian matrix, posted at the bottom of this message.
> The eigenvalues that Mathematica obtains using the
> N[Eigenvalues[matrix]] include non-real numbers:
> {-9.41358 + 0.88758 \[ImaginaryI], -9.41358 -
>   0.88758 \[ImaginaryI], -7.37965 + 2.32729 \[ImaginaryI], -7.37965 -
>   2.32729 \[ImaginaryI], -4.46655 + 2.59738 \[ImaginaryI], -4.46655 -
>   2.59738 \[ImaginaryI], 4.36971, 3.21081, -2.32456 +
>   2.10914 \[ImaginaryI], -2.32456 - 2.10914 \[ImaginaryI],
>  2.04366+ 0.552265 \[ImaginaryI],
>  2.04366- 0.552265 \[ImaginaryI], -0.249588 +
>   1.29034 \[ImaginaryI], -0.249588 - 1.29034 \[ImaginaryI]}.
> However, if you do Eigenvalues[N[matrix]] it obtains different results
> {-9.09122, -7.41855, -7.41855, -7.2915, 4.33734, -4., -4., 3.2915, \
> -3.24612, -2.38787, -2.38787, 1.80642, 1.80642, 0}.
> 
> These results agree with Solve[CharacteristicPolynomial[matrix,x],x].
> Therefore I assume that the latter are correct. Has anyone seen this?
> I am using 6.0.0.
> 
I am guessing here, but if you display the matrix it contains terms like 
Sqrt[3] which has two possible answers +1.73.. and -1.73.... Although 
this will not matter if you apply N to the matrix first, and then take 
the eigenvalues, if you start by taking eigenvalues of the matrix you 
get a horrendous expression involving Root objects (try it) and perhaps 
the above confusion has arisen in that process.

In any case, for both efficiency and accuracy reasons it is preferable 
to use use N as early as possible - EigenValues[N[matrix]]

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Changing the positions of limits on displayed mathematical notation
  • Next by Date: Re: Version 6.0.2
  • Previous by thread: Re: Mathematica 6 obtains imaginary eigenvalues for a Hermitian
  • Next by thread: Re: Re: Using Fourier and InverseFourier instead of Convolve