How to obtain Eigenvalues with maximum precision in Mathematica 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?   
 A: 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.
A: 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!
