What is the residual defined in eigs?
Show older comments
I try to use
to solve a generalized eigenvalue problem,
, for the few smallest eigenvalues in modulus and corresponding eigenvectors. The
claims the eigenpairs returned have converged in tol=1e-13, but when I examine the residual by
, the residual is still around 1e-3. What is happening? Is the residual defined in
being so much different from the one I use causes this problem?. I have read the official document of
, but no details about the residual defined in
.
Accepted Answer
More Answers (1)
Christine Tobler
on 2 Apr 2024
The issue is likely that eigs doesn't use the residual as you describe it: The iterative algorithm used inside of eigs when computing the eigenvalues of smallest absolute value is transforming the generalized eigenvalue problem into a simple eigenvalue problem, of which it computes a few eigenvalues of largest absolute value.
So issues with the residual are likely due to the transformations applied to matrices A and B to achieve this. You can find out which simple eigenvalue problem is being solved underneath for your case by using the Display option:
eigs(sprandn(1e3, 1e3, 1e3), sprandn(1e3, 1e3, 1e3), 5, "smallestabs", Display=true)
The display in this case shows the problem being solved underneath as
Find eigenvalues of A\(B*x) = mu*x.
So in this case, the residual being used internally will be norm(A\(B*x) - mu*x) / mu, where mu is the inverse of the eigenvalues being returned.
By the way, eigs doesn't use the ARPACK library anymore, although we still reference it in our documentation since many of the treatments of the various cases are still strongly based on the original implementation of eigs that used ARPACK, and on the recommendations of the ARPACK user's guide.
Categories
Find more on Linear Algebra in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!