# Fast calculation of eigenvalues

### Background:

Now I have a symmetric matrix A. I need to find the first n eigenvalues and eigenvectors. (I have not actually started to write code, but in the algorithm process I observed the need to solve the eigenvalues and eigenvectors of matrix A.)

On the details of matrix A:

• A should be a Laplace matrix.
• The size of A may be 100,000 × 100,000.
• A is a symmetric positive semidefinite matrix.
• The matrix A that I get from calculation is usually dense, and it is not a sparse matrix.
(If you have some suggestions for solving sparse matrix in the same situation, it is also possible)

### Question:

My question is which method can be used for quick solution ? (including parallel computing with GPU or multi-core processor)

So far as I know, there are the following ways to achieve my goal in Julia:

• using LinearAlgebra: eigvals(A) and eigvecs(A)
• using Arpack: eigs(A)
• using KrylovKit: eigsolve(A)

At present, I don’t know which of the three methods is the fastest (for large symmetric matrix). Or is there any faster calculation method besides the above methods?

Any reply is highly appreciated!

1 Like

Properties of the matrix?

Sorry for the lack of detailed information , I’ve updated the questions so far.

The important point is: is it sparse or dense? If dense, you can’t easily beat eigen. If it’s sparse and you only need a couple of eigenpairs, use Lanczos from Arpack/KrylovKit, or LOBPCG from IterativeSolvers.

6 Likes

Also, “large” is somewhat subjective, so it would be useful to know the typical size.

An MWE with a function that generates a matrix that reflects the structure of your matrix may result in more concrete answers.

2 Likes

You have the option ishermitian in KrylovKit.jl. It should not speed things up too much though.

Thank you for your advice, I have updated the question.