ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 27 Mar 2015 08:22:54 -0500eigenvalues of matrices in AAhttp://ask.sagemath.org/question/26357/eigenvalues-of-matrices-in-aa/ M=matrix(AA,[[0,-1],[1,0]])
M.eigenvectors_right()
raises an error "eigenvectors are not implemented for matrices with eigenvalues that are not in the fraction field of the base ring or in QQbar" which is just wrong because the eigenvalues of M are certainly in QQbar.
Can someone please explain how to avoid this problem?
Thanks,
Jaume
Fri, 27 Mar 2015 04:41:04 -0500http://ask.sagemath.org/question/26357/eigenvalues-of-matrices-in-aa/Answer by tmonteil for <pre><code>M=matrix(AA,[[0,-1],[1,0]])
M.eigenvectors_right()
</code></pre>
<p>raises an error "eigenvectors are not implemented for matrices with eigenvalues that are not in the fraction field of the base ring or in QQbar" which is just wrong because the eigenvalues of M are certainly in QQbar.</p>
<p>Can someone please explain how to avoid this problem?</p>
<p>Thanks,</p>
<p>Jaume</p>
http://ask.sagemath.org/question/26357/eigenvalues-of-matrices-in-aa/?answer=26358#post-id-26358Thanks for reporting, this is now [trac ticket 18071](http://trac.sagemath.org/ticket/18071) .There seems that `eigenvectors_right()` is not implemented for the *real* algebraic field `AA`. The workaround is to define your matrix in `QQbar`:
sage: M = M.change_ring(QQbar)
sage: M.eigenvectors_right()
[(1*I, [
(1, -1*I)
], 1), (-1*I, [
(1, 1*I)
], 1)]
It also works in `ZZ`:
sage: M = M.change_ring(ZZ)
sage: M.eigenvectors_right()
[(-1*I, [(1, 1*I)], 1), (1*I, [(1, -1*I)], 1)]
Fri, 27 Mar 2015 08:22:54 -0500http://ask.sagemath.org/question/26357/eigenvalues-of-matrices-in-aa/?answer=26358#post-id-26358