strange eigenvalue/eigenvector output

17 views
Skip to first unread message

John Cremona

unread,
Feb 27, 2012, 7:30:09 AM2/27/12
to SAGE devel
In 4.8, I have a 3x3 matrix T over a quadratic number field but when I
ask for T.eigenvalues() I get a list of 6 elements of QQbar, and
T.eigenmatrix_right() returns a pair of 6x6 matrices.

Please tell me that this is a bug and not a feature!

John

sage: TK.parent()
Full MatrixSpace of 3 by 3 dense matrices over Number Field in a with
defining polynomial x^2 + 7
sage: TK
[ 1 -a 2]
[ -1 1/2*a - 1/2 -1]
[ -1 1/2*a - 3/2 -1]
sage: len(TK.eigenvalues())
6
sage: TK.eigenmatrix_left()[0].parent()
Full MatrixSpace of 6 by 6 sparse matrices over Algebraic Field

Jason Grout

unread,
Feb 27, 2012, 9:46:09 AM2/27/12
to sage-...@googlegroups.com


Further, look at the dimension of the eigenvector matrix:

sage: R=QuadraticField(-7,'a')
sage: a=R.0
sage: TK=matrix(3,[1,-a,2,-1,a/2-1/2,-1,-1,a/2-3/2,-1])
sage: D,P=TK.eigenmatrix_left()
sage: D.parent()


Full MatrixSpace of 6 by 6 sparse matrices over Algebraic Field

sage: P.parent()
Full MatrixSpace of 6 by 3 dense matrices over Algebraic Field

Jason

John Cremona

unread,
Feb 28, 2012, 11:57:06 AM2/28/12
to sage-...@googlegroups.com
It's a bug in the eigenvalues() function in sage/matrix/matrix2.pyx.
It takes the chapr poly, factors it, and for any factor of degree > 1
it constructs the root-field and then finds all the Galois conjugates
of that in QQbar. The problem is that that gives all the conjugates
over QQ, not just the ones over the field of definition.

A ticket will be created...but I can see a problem if the base field
does not have an emebdding into QQbar (i.e. into CC) already, since
then the eigenvalues are not well-defined as elements of QQbar. This
will create ambiguities whenever the base field is not Galois.

John

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

Reply all
Reply to author
Forward
0 new messages