7
$\begingroup$

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

  1. Is this now expected behavior?
  2. 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.
  3. Observing that Eigensystem[#][[1]]& returns different Root objects than Eigenvalues and Diagonal[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. Eigenvalues vs Eigensystem

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. Eigenvalues using numerics

$\endgroup$
9
  • 2
    $\begingroup$ Yes, that seems to be a version 12 change. I have no idea why Eigensystem[] would return a weird format, even if they are algebraically equivalent to the results of Eigenvalues[]. $\endgroup$ Commented May 13, 2020 at 10:30
  • 3
    $\begingroup$ Don't know about others, but my V12.0.0.0 on Linux x86 gives True for all in the first block. $\endgroup$
    – Max1
    Commented May 13, 2020 at 14:13
  • $\begingroup$ @Max1 Very strange! I am in fact on v12.1.0.0---perhaps this is the difference? Window 10, x86-64 for reference $\endgroup$
    – erfink
    Commented May 13, 2020 at 20:24
  • 2
    $\begingroup$ If you change one of the integer 1 to 1.0, then you get False,True,True,True,True. $\endgroup$
    – bill s
    Commented May 13, 2020 at 22:01
  • 1
    $\begingroup$ @CATrevillian v12.1.0 for Microsoft Windows (64-bit) (March 14, 2020). Machine type PC Windows 10 Home 64-bit, x86-64 processor (Intel Core i7-6700K, Skylake 14nm). $\endgroup$
    – erfink
    Commented May 15, 2020 at 21:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.