6
$\begingroup$

How does one diagonalize a large sparse symmetric matrix to get the eigenvalues and the eigenvectors?

The problem is the matrix could be very large (though it is sparse), at most $2500\times 2500$. Is there a good algorithm to do that and most importantly, one that I can implement it into my own code? Thanks a lot!

  • 0
    @Pete: It might interest you to know that sparse matrix storage techniques borrow a lot from graph theory, but not being a graph theory expert, that's all I can say about it. For tridiagonalizing a symmetric matrix with a neat pattern, I suppose judicious use of rotations might work, but if one tries Jacobi's scheme for diagonalization on a sparse matrix, you get a lot of fill-in in the first few iterations (even though theoretically the off-diagonal elements should converge to zero in the limit).2010-11-28

1 Answers 1

8

$2500 \times 2500$ is a small matrix by current standards. The standard eig command of matlab should be able to handle this size with ease. Iterative sparse matrix eigensolvers like those implemented in ARPACK, or SLEPc will become more preferable if the matrix is much larger.

Also, if you want to implement an eigensolver into your own code, just use the LAPACK library that comes with very well developed routines for such purpose. Matlab also ultimately invokes LAPACK routines for doing most of its numerical linear algebra.

Semi-related note: the matrix need not be explicitly available for the large sparse solvers, because they usually just depend on being able to compute $A*x$ and A'*x.

  • 0
    yes, I think your question to him/her regarding whether he/she really needs all eigenvals+vecs is a very important one. one setting where one may require (in the worst case) all might be when having to repeatedly ensure positive-definiteness of a matrix during an iterative process.2010-11-28