# MINRES

Implementation of a conjugate-gradient type method for solving sparse linear equations: Solve Ax=b or (A−sI)x=b. The matrix A−sI must be symmetric but it may be definite or indefinite or singular. The scalar s is a shifting parameter -- it may be any number. The method is based on Lanczos tridiagonalization. You may provide a preconditioner, but it must be positive definite. MINRES is really solving one of the least-squares problems minimize ||Ax−b|| or ||(A−sI)x−b||. If A is singular (and s=0), MINRES returns a least-squares solution with small ||Ar|| (where r=b−Ax), but in general it is not the minimum-length solution. To get the min-length solution, use MINRES-QLP [2,3]. Similarly if A−sI is singular.