Eigenvalue order

asked 2024-01-09 01:54:44 +0200

Pickle gravatar image

I notice that Sage orders $A.eigenvalues()$ from lowest to highest (ascending order). Where does this functionality come from? Is NUMPY used in the backend?

I am trying to understand how to diagonalize a real symmetric matrix $A$ with orthogonal $Q$ such that $Q^T A Q = D$ where $D$ is diagonal and always in a specific order (say ascending or descending).

edit retag flag offensive close merge delete

Comments

The ordering of the eigenvalues has a meanoing if and only if all these values belong in a "reasonably ordered" set. What do you think of complex eigenvalues ? and what about :

sage: R1=MatrixSpace(GF(Integer(123).next_prime()), 3, 3) ; R1
Full MatrixSpace of 3 by 3 dense matrices over Finite Field of size 127
sage: foo=R1.random_element() ; foo
[ 35  10  66]
[117  26  62]
[  3 108  50]
sage: bar=foo.eigenvalues() ; bar
[73*z3^2 + 49*z3 + 56, 79*z3^2 + 123*z3 + 68, 102*z3^2 + 82*z3 + 114]
sage: bar[0].parent()
Algebraic closure of Finite Field of size 127

HTH,

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-01-09 09:06:19 +0200 )edit