With the update to v12.0, I seem to be getting different behavior of eigenvalues returned by Eigenvalues
and Eigensystem
(oddly, this managed to break some older code of mine that I revisited). Here's a MWE:
A={{1,1,1},{1,0,0},{0,1,0}};
Eigenvalues[A]===Eigensystem[A][[1]]
(*False*)
Eigenvalues[A]==Eigensystem[A][[1]]
(*Giant equation*)
Eigenvalues[A]==Eigensystem[A][[1]]//Simplify
(*Same giant equation*)
Eigenvalues[A]==Eigensystem[A][[1]]//FullSimplify
(*True*)
Eigenvalues[A]==Eigensystem[A][[1]]//Reduce
(*True*)
I could swear that all of these returned (*True*)
in v11, but I don't have an install to verify this.
In comparison,
Sort[Diagonal[JordanDecomposition[A][[2]]]] == Sort[Eigenvalues[A]]
(*True*)
Sort[Diagonal[JordanDecomposition[A][[2]]]] == Eigenvalues[A]
(*False*)
despite Eigenvalues
purportedly returning a sorted list of eigenvalues (appears to be a simple matter of reordering the complex conjugate roots).
Questions
- Is this now expected behavior?
- What changed? I assume that this has to do with the new front end for irrational numbers, which is admittedly much prettier than
Root
objects. - Observing that
Eigensystem[#][[1]]&
returns differentRoot
objects thanEigenvalues
andDiagonal[JordanDecomposition[#][[1]]]&
, is Mathematica really using a different backend algorithm? If so, why? Should I be concerned about any numerical stability impacts?
Edit
Including a screenshot with a fresh kernel to further document this difference.
Edit 2
Following a comment from @bills, slight differences persist using numerical arithmetic as well. This introduces a whole slew of other test cases that produce differing behavior, as shown below.
Eigensystem[]
would return a weird format, even if they are algebraically equivalent to the results ofEigenvalues[]
. $\endgroup$True
for all in the first block. $\endgroup$