#2217 Symmetric matrix yields complex eigenvalues


When using eigenvectors command in wxMaxima, the following symmetric matrix yields complex eigenvalues:

All eigenvalues of a symmetric matrix should be real: http://en.wikipedia.org/wiki/Symmetric_matrix

Maxima version: 5.24.0
Maxima build date: 20:39 4/5/2011
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8


  • Barton Willis

    Barton Willis - 2011-06-28

    I think the problem is that the default value of ratepsilon is too small; try this:
    (also do this same with ratepsilon : 1.0e-8)

    (%i1) load(hypergeometric)$
    (%i2) ratepsilon : 1.0e-18$
    (%i3) m : matrix([2621.4397,-7823.3599,-1111.2726],[-7823.3599,23347.842,3316.4543],[-1111.2726,3316.4543,471.08722])$
    (%i4) first(eigenvalues(m)), ratprint : false$
    (%i5) nfloat(% - conjugate(%),[],100);
    (%o5) [8.0266455652163197256568351091[46 digits]5913348171925384517960952b-197*%i-1.3377742608693866209428058515[46 digits]0985558028654230752993492b-197,-5.3510970434775464837712234061[46 digits]3942232114616923011973968b-197*%i-1.3377742608693866209428058515[46 digits]0985558028654230752993492b-197,-1.9934389902195135071021405630[46 digits]0374693317196116973450023b-205*%i-2.6755485217387732418856117030[46 digits]1971116057308461505986984b-197]

    See also http://en.wikipedia.org/wiki/Casus_irreducibilis

  • Dženan Zukić

    Dženan Zukić - 2011-06-28

    Thanks for suggestions, but I was using Maxima trying to verify some results obtained using numeric library. However after getting this nonsensical result from Maxima I used another numeric library and obtained similar results (difference was after some decimal points).

    I am not a frequent user of Maxima, and this problem has significantly lowered my faith in it.

  • Barton Willis

    Barton Willis - 2011-06-29

    For a floating point evaluation of eigenvalues, you should use a purely numeric
    method, not a symbolic method. One (not the only) option is eigens_by_jacobi
    (symmetric and either binary64 or bigfloat entries).

  • Raymond Toy

    Raymond Toy - 2012-08-18
    • status: open --> pending
  • Raymond Toy

    Raymond Toy - 2012-08-18

    In addition, I think algorithms for symmetric matrices should be used, instead of a general eigen solver.

    I don't consider this a bug in maxima.

    Marking as pending/wontfix.

  • Raymond Toy

    Raymond Toy - 2012-09-21
    • status: pending --> closed

Log in to post a comment.