Generalised Eigenvalue Problem in Mathematica

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 9K views
Messages
9,621
Reaction score
9
I have a generalised eigenvalue problem of the form

[tex]A\boldsymbol{u} = \lambda B\boldsymbol{u}\;,[/tex]

where A and B are symmetric matrices with real symbolic entries. I'm trying to compute the eigenvalues with Mathematica using the command

Code:
Eigenvalues[{A,B}]

which according to the documentation should work. However, when I do, Mathematica returns the following error

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

The documentation is of no help. Does anyone have any suggestions?
 
on Phys.org
This
Eigenvalues[{{{1, 2}, {4, 3}}, {{5, 6}, {4, 3}}}]
fails.

This
Eigenvalues[{{{1, 2}, {4, 3}}, {{5, 6}, {4, 3.}}}]
succeeds. Note that lone ".' means that at least one machine precision value shows up in every calculation and thus not all items are exact.

Is it possible that all the entries you have are exact integers or rationals or complex?

Toss in a few decimal points or add 0. to few entries and see if your error message disappears.
 
Since you want to do the calculation with symbolic entries, try

Code:
Eigenvalues[Inverse[ B].A]

It's a little bit slower for real, nonexact matrices - but it will work for matrices with symbolic entries.

Of course, it might be better if you calculate the adjugate instead of the inverse (dividing by the determinant is unnecessary).

Or even just calculate the characteristic polynomial det(A - x B)=0 and solve for x.

I'm not sure why the generalized eigenvector command in Mathematica only works for non-exact (complex) numbers. http://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix#Generalized_eigenvalue_problem". You'd think that this would at least get a mention in the "Possible Issues" section...
 
Last edited by a moderator: