0
$\begingroup$

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.

  • 0
    It seems to me that OP wants nothing more than a sim$p$le *$p$ower method* im$p$lementation, and the answers given thus far do quite a bit more than that... [NAPACK](http://www.netlib.org/napack/) has [a power method implementation](http://www.netlib.org/napack/power.f) (in FORTRAN of course); translation to other computing environments shouldn't be too hard...2012-04-25

3 Answers 3

2

You should check out a Computer Algebra System (CAS) and pick one that you like the interface for. There are commercial to open sourced - freeware ones and here is a comparison (many of the responses refer to these, but this is a nice list.

For example, Mathematica ($) or Maxima or SAGE (both free).

See: http://en.wikipedia.org/wiki/Comparison_of_computer_algebra_systems

Enjoy - A

  • 0
    $+\left(\text{multiplicative identity in}\; \mathbb R\right)$2013-05-18
1

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.

1

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.

  • 0
    Using eigen($A$) in R gives an odd result, not the one I'm expecting, anyhow, so I'll try my hand at Octave, see what comes out. Thanks again for your help.2012-04-25