During the discusion about ticket 8974
https://webmail.unizar.es/horde/imp/login.php
i noted that the behaviour of eigenvectors, eigenspaces and
eigenvalues method of matrices is not mathematically correct. Or being
more precise, it does not translate directly into mathematically
correct methods for endomorphisms of vector spaces; since these
methods work in an extension of the base field (if necessary), while
vector spaces are defned with a precise base field.

Since David Loeffler insists that the methods implemented for
endomorphism objects must be the same as the ones for the underlying
matrices (and i agree that it is a good thing), i suggest to include
an option in these methods that allows to distinguish if you want the
result in a field extension or if you want to stick to the base field.

Something like this:

sage: M=matrix(QQ,[[1,2,3],[4,5,6],[7,8,9]])
sage: M.eigenvalues(base_extend=True)
[0, -1.116843969807043?, 16.11684396980705?]
sage: M.eigenvalues(base_extend=False)
[0]
sage: M.eigenspaces(base_extend=True)
[
(0, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[ 1 -2  1]),
(a1, Vector space of degree 3 and dimension 1 over Number Field in a1
with defining polynomial x^2 - 15*x - 18
User basis matrix:
[            1 1/18*a1 + 1/3  1/9*a1 - 1/3])
]
sage: M.eigenspaces(base_extend=True)
[
(0, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[ 1 -2  1])]


So, what do you think?

Miguel

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to