# Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1.

matA = DiagonalMatrix[ConstantArray[1, 3]];

matB = Normal[SparseArray[{Band[{1, 1}] -> 200, Band[{1, 2}] -> -100,
Band[{2, 1}] -> -100}, {3, 3}]];


{matA, matB} gives

{{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {{200, -100, 0}, {-100, 200, -100}, {0, -100, 200}}}


e1 = Eigenvalues[{matB, matA}] gives an error:

Eigenvalues::exnum: Eigenvalues has received a matrix with non-numerical or exact elements. >>

e2 = Eigenvalues[N@{matB, matA}] gives the answer:

{341.421, 200., 58.5786}


Question: Why would e1 give an error when both matrices are numerical? I don't understand why N@{matB, matA} is needed to get their eigenvalues.

• The phrase is "non-numerical or exact". Since the elements do not have decimal places, Mathematica is loathe to introduce imprecision which is required by the algorithm, hence the message. So, by using N you tell it you deliberately add the imprecision, making the decision for it. – rcollyer Feb 9 '14 at 20:45
• @rcollyer You should probably make that an answer. It is the answer. – Szabolcs Feb 9 '14 at 20:50
• @user11946 Can you please choose a display name? The generic "user11946" is hard to remember ... – Szabolcs Feb 9 '14 at 20:51
• @rcollyer - It is subtle but I can see it now. Thanks for the insight. – user11946 Feb 9 '14 at 21:12
• @user11946. No one is asking you to display your real name. Just change your username to something memorable. – RunnyKine Feb 9 '14 at 22:01