# Using algebraically smallest eigenvalues to find smallest in magnitude eigenvalues

I have a symmetric indefinite matrix, $H$. I also have a routine that can compute the algebraically smallest eigenvalues of a symmetric indefinite matrix. I would like to compute the eigenvalues with smallest magnitude using my existing code.

One way I can do this is to use my routine to compute the algebraically smallest eigenpairs of $H^2$. Then I can use Rayleigh quotients to figure the smallest magnitude eigenvalues of $H$. This works great but is very slow since $cond(H^2) = cond(H)^2$.

Is there a better way?

• What does "algebraically smallest" mean?
– Dan
Commented Mar 29, 2012 at 20:08
• from his way of currently solving it one can infer that it means "absolutely smallest" Commented Mar 29, 2012 at 20:13
• By algebraically smaller I mean closer to $-\infty$. I don't know the proper term. Commented Mar 29, 2012 at 22:21
• What you say here is just termed ''smallest'' (in your case = most negative). You'd get this by running the Lanczos algorithm. But the smallest eigenvalue of H^2 gives you the eigenvalue closest to 0 (the absolutely smallest), not to -infty, so I inferred that you meant that. So what do you really mean? If the spectrum were 2,1,-2,-5, which eigenvalue should be returned? Commented Mar 30, 2012 at 7:43
• The current code will return -5. I would like a way to get 1. Commented Mar 30, 2012 at 18:05

If you can afford a single factorization of $H$ you can find the absolute largest eigenvalue of $H^{-1}$ by the Lanczos algorithm, using the factorization to calculate matrix-vector products with $H^{-1}$. The inverse then gives the absolutely smallest eigenvalue of $H$.