Can I use Lapack for calculating the eigenvalues and eigenvectors of large sparse matrices?

Spencer picture Spencer · Jul 20, 2010 · Viewed 9.4k times · Source

If I had a square matrix that is 1,000 by 1,000 could Lapack calculate the eigenvectors and eigenvalues for this matrix? And if it can how long would it take? Also what about for a 10,000 by 10,000 matrix or even a 1,000,000 by 1,000,000 matrix?

Please note these are going to be sparse matrices primarily populated by 0s (the matrices will be graphs representing social networks). Are there any special procedures in Lapack for dealing with sparse matrices? I see the Arpack recommendation. But would this allow for calculating very large matrices?

Answer

Larry Wang picture Larry Wang · Jul 20, 2010

LAPACK does not have special support built in for sparse matrices, but ARPACK does. Depending on the machine you plan to run this on, this could rule out use of LAPACK, as you may run out of memory for very large matrices. See http://www.netlib.org/utk/people/JackDongarra/la-sw.html for a summary of various linear algebra libraries.

There is no way to give you a meaningful estimate for how long these computations would take without details of what matrices you expect (symmetric ones will be many times faster), what processor you plan to run this on, how much memory you have available, etc.

Based on your other questions, I would recommend sticking with MATLAB. It has sparse matrix support and is good for linear algebra in general.