This is a more practical question. In Pari/GP I have difficulties to use mateigen for some real matrices because of extreme long computation time and frequently "missing eigenspace" due to too low float precision. Say, the (real) matrix M is $48x48$ (a modified Vandermonde matrix), float precision of $1200$ decimal digits, then mateigen quits after some minutes, calling for more initial accuracy for the float computations.
However, using charpoly, polsturm (to check whether I've indeed 48 real eigenvalues) and then polroots I can get the eigenvalues with that parameters (they come out to be real, which is what I've expected). Now I thought I can proceed with some application of the much simpler method of matrix-solve or the like, for instance solve $ (M-\lambda I)*X = \text{
[edit] In the comment to Pedro's answer I mentioned a procedure which I just found in my own old scripts. Unfortunately it seems to be the same way numerically insufficient as the original mateigen-procedure of Pari/GP with that problem constellation. The method works as follows:
- Construct a list matrix L containing of the first rows of the consecutive powers of M $ \text{for }k=1,dim, L[k,]=M^k[1,] $
- Construct a vandermondematrix V containing the powers of the eigenvalues $\lambda_k$
$ \text{for }r=1,dim, \text{for }c=1,dim V[r,c]=\lambda_c^r $ - Then the matrix of eigenvectors is $W = L^{-1}*V $
In the current configuration with accuracy of 1200 digits I can solve this correctly for instance for $dim \le 16$ or the like.
But for $dim=48$ the error is inacceptable and may require to increase the accuracy the same way as the Pari/GP-inherent routine - so this does not help for my case now. The biggest dimension solvable with the standard mateigen-procedure with accuracy=1200 was $dim=32$ so far, maybe the accuracy requirement increases quadratically with the dimension. For $dim=48$ accuracy=1600 was not yet enough. The condition of the matrix (ratio of biggest to smallest eigenvalue) is $ \approx {1.0 e16 \over 1.0 e-13 }$ for $dim=32$ and $ \approx {1.0 e26 \over 1.0 e-19 }$ for $dim=48$ (it increases with the size of the testmatrix M)
So if there were another possibly relatively simple method I would be happy to try it.