# program for eigenvalue calculation

I have a n x n matrix. I would like to

(a) take successively higher powers of the matrix and then multiply by projection vectors until the resulting vectors differ by only a scalar factor.

(b) calculate the dominant eigenvalue of the matrix to compare to (a)

and (c) calculate, using the same tactic as in (a), the dominant right and left eigenvectors.

This is too much work to do by hand, so my question is: can anyone recommend a program/language or package that would be ideal for the above calculations?

Thanks.

-
It seems to me that OP wants nothing more than a simple power method implementation, and the answers given thus far do quite a bit more than that... NAPACK has a power method implementation (in FORTRAN of course); translation to other computing environments shouldn't be too hard... –  Guess who it is. Apr 25 '12 at 12:07

For example, Mathematica ($) or Maxima or SAGE (both free). Enjoy - A - $$+\left(\text{multiplicative identity in}\; \mathbb R\right)$$ – amWhy May 18 '13 at 0:50 There are various standardized answers for your question. The most obvious solution would be to use a computer algebra system, e.g., Mathematica, Matlab or Maple (both commercial), as well as Axiom or Octave (free). If you prefer to use a certain programming language, there are a number of linear algebra libraries that may help. For C and Fortran, the classic library to use is probably BLAS (basic linear algebra) in conjunction with something like LINPACK for more advanced operations. - High Level: For a high level interface, you may use any commercial or free software including: • MATLAB/Octave/SciLab and the many other clones • Maple/Mathematica/R • NumPy/SciPy Low Level: You might want to study LAPACK a little closely. There are many many libraries which provide support for what you wish to achieve. Including Boost, GSL, Eigen etc. - Is it possible to compute steps a-c above in R, if I have a small sparse matrix (6 x 6)? I have tried using the basic functions svd() and qr() to get dominant eigenvalues and decomposition of the matrix, but the results are not ideal (i.e., wrong or not iterated enough to converge on a plausible answer). – eric Apr 25 '12 at 14:48 I haven't tried it myself but I don't see any reason why. Regd. (a), Computing$A^2\$ is trivial in R. Calculating dominant eigenvalue is also trivial (using eigen(A)). I'm not as knowledgeable about (c). Also, it is not difficult to "extend" R to behave like MATLAB. Check out this and this. –  Inquest Apr 25 '12 at 14:56