IterativeSolvers.jl is a Julia package that provides efficient iterative algorithms for solving large linear systems, eigenproblems, and singular value problems. Most of the methods can be used matrix-free.

For bug reports, feature requests and questions please submit an issue. If you're interested in contributing, please see the Contributing guide.

For more information on future methods have a look at the package roadmap.

What method should I use for linear systems?

Square linear systems

When solving linear systems $Ax = b$ for a square matrix $A$ there are quite some options. The typical choices are listed below:

MethodWhen to use it
Conjugate GradientsBest choice for symmetric, positive-definite matrices
MINRESFor symmetric, indefinite matrices
GMRESFor nonsymmetric matrices when a good preconditioner is available
IDR(s)For nonsymmetric, strongly indefinite problems without a good preconditioner
BiCGStab(l)Otherwise for nonsymmetric problems

We also offer Chebyshev iteration as an alternative to Conjugate Gradients when bounds on the spectrum are known.

Stationary methods like Jacobi, Gauss-Seidel, SOR and SSOR can be used as smoothers to reduce high-frequency components in the error in just a few iterations.

Non-square systems: least squares

When solving least-squares problems we currently offer LSMR and LSQR. LSMR generally converges more quickly than LSQR.

Eigenproblems and SVD

For the Singular Value Decomposition we offer SVDL, which is the Golub-Kahan-Lanczos procedure.

For eigenvalue problems we have at this point just the Power Method and some convenience wrappers to do shift-and-invert.