# Eigenvalues broken in 11.2?

Bug introduced in 11.1.0 and fixed in 11.3.0

The code

M = Flatten[Table[Flatten[Transpose[{{1, a, a, -1}[[i]]
UnitVector[4, i]}].{{1, a, a, -1}[[j]]
UnitVector[4, j]}],   {i, 1, 4}, {j, 1, 4}], 1]


creates the diagonal matrix with diagonal

{1,a,a,-1,a,a^2,a^2,-a,a,a^2,a^2,-a,-1,-a,-a,1}


However, in Mathematica 11.2, Eigenvalues[M] returns me

{-1,-a,-a,-1,-a,-a,a,a,a,a,a,a,a,a^2,a^2,a}


Is this only me or is it a bug? In Mathematica 11.0.x, it works fine.

• It looks like a bug to me ... did you report it to Wolfram? Feb 7, 2018 at 13:13
• If you don't report it, don't expect it to get fixed ... Feb 7, 2018 at 13:26
• The bug is under investigation; thanks for the example. Feb 7, 2018 at 16:13
• The fix will be available in the next release. Feb 7, 2018 at 18:28
• The workaround is to unpack, as in the answer. Feb 7, 2018 at 19:07

This is a bug.

The problem seems to be related to the fact that some rows of your matrix are packed arrays and some are not.

DeveloperPackedArrayQ /@ M
(* {True, False, False, True, False, False, False, False, False, False, False, False, True, False, False, True} *)


Unpacking seems to avoid the problem.

Eigenvalues@DeveloperFromPackedArray[M]
(* {-1, -1, 1, 1, -a, -a, -a, -a, a, a, a, a, a^2, a^2, a^2, a^2} *)

• By any chance, do you know a way to disable packed arrays as a workaround? Feb 7, 2018 at 13:46
• @Matthias I do not think packed arrays can be disabled. Please do report it to WRI for the sake of everyone who may be affected by it. Feb 7, 2018 at 13:57
• This answer really doesn't deserve upvotes ... it was just an observation that it is a bug. Feb 7, 2018 at 17:50
• @Szabolcs - it deserves upvotes because it identifies the cause of the problem and provides a workaround. Feb 7, 2018 at 19:07
• "Use every man after his desert, and who should 'scape whipping? Use them after your own honor and dignity. The less they deserve, the more merit is in your bounty." (Hamlet II.ii) -- Good luck getting SE voting to correspond to the degree of deserving. Feb 8, 2018 at 3:04