1
$\begingroup$

One short question. If we have two matrices in fractional form, how to obtain the Eigenvalues[{A,B}] with maximum precision or get it also in fraction form?

2 Answers 2

5

The problem is that Eigenvalues[] does not support matrices with exact entries for the case of the generalized eigenproblem $\mathbf A\mathbf x=\lambda\mathbf B\mathbf x$. If you want to get exact solutions, and $\mathbf B$ is invertible, just execute RootReduce[Eigenvalues[Inverse[B].A]]; here, one does not have to worry about ill-conditioning as in the inexact case. If $\mathbf B$ is not invertible, but $\mathbf A$ is, then you need RootReduce[1/Eigenvalues[Inverse[A].B]] (the proof that this works is left as an exercise); if both $\mathbf A$ and $\mathbf B$ are singular, things are more complicated, and I'll just tell you to search for "singular pencils" in your favorite search engine.

  • 0
    No, exact is in form which I can not see, but I was afraid that numerical has an error. So I wanted solution without error, but now I can not see. Actually I am not sure on which decimal is error when I just use command Eigenvalues. Thank you again very much Mr J.M. for this effort. Big respect anyway!2011-12-03
2

The Mathematica command Eigenvalues[{M,A}] finds the generalized eigenvalues $\lambda$ that satisfy the equation $ M v = \lambda A v$, for eigenvectors $v$. Unfortunately, this version of Eigenvalues does not support calculations with exact numbers or symbolic variables.

One way to proceed is to rearrange the generalized eigenvalue equation to $ A^{-1} M v = \lambda v$, then you can just use Eigenvalues[Inverse[A].M], provided $A$ is invertible.

Another way to get exact results is to solve it numerically with high precision then use an integer relation algorithm such as RootApproximant to identify the polynomial.

eVals = Eigenvalues[N[{M, A}, 100]]; RootApproximant[eVals, Method -> {"DegreeCost" -> 3}] 

but this probably isn't a very sensible way to approach the problem!

  • 0
    @Simon Yes you are right very small error. There is just message "General::unfl: Underflow occurred in computation." when I use Eigenvalues[N[{A, B}, 50]] but I got the solution and think that it is not serious.2011-12-03