Shing Hing Man wrote: > In Sage, the eigenvalues and vectors (over a Rational matrix) returns > the answer in numerical format.
It's not really numerical format. It's the same as the Root objects in Mathematica or Maple. Recent versions of Mathematica even print out the numeric approximations of the roots; Sage just prints that out the numerical approximation by default. For example: sage: sageMatrix = matrix(QQ,[[1,4],[4,2]]) sage: sageMatrix.eigenvalues() [-2.531128874149275?, 5.531128874149275?] sage: eig=sageMatrix.eigenvalues() sage: eig[0] -2.531128874149275? sage: a=eig[0] Now, "a" is *not* a numeric value, though it is approximately equal to the number displayed above. It is an exact root of a polynomial: sage: a.minpoly() x^2 - 3*x - 14 sage: a^2-3*a-14 0 You see the advantages to displaying things this way once you get matrices that have eigenvalues which are roots of 3rd degree or higher polynomials. Instead of the huge long "Root[]" displays that Mathematica does, Sage just displays the numeric approximation for the exact eigenvalue. There has been discussion of displaying a square root if the exact eigenvalue is actually a square root (or, more generally, in technical terms, if an element of QQbar has minpoly() or some easily-calculatable approximation of minpoly() showing that we have a root of a quadratic, then display the square root). However, if you do that, then you still have the problem of not knowing approximately what the value is. Which is easier to see and make sense of: sqrt(47)/3 or 2.285218200133682? (we get that from: sage: QQbar(sqrt(47)/3) 2.285218200133682? ) Note that the two are *exactly* equal---there are no numeric issues involved. Would you still like to see sqrt(47)/3 as an eigenvalue, rather than the exactly same thing, but printed out as a numerical approximation? Thanks, Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
