The Induced Dimension Reduction method is a family of simple and fast Krylov subspace algorithms for solving large nonsymmetric linear systems. The idea behind the IDR(s) variant is to generate residuals that are in the nested subspaces of shrinking dimensions.


idrs(A, b; s = 8) -> x, [history]

Same as idrs!, but allocates a solution vector x initialized with zeros.

idrs!(x, A, b; s = 8) -> x, [history]

Solve the problem $Ax = b$ approximately with IDR(s), where s is the dimension of the shadow space.


  • x: Initial guess, will be updated in-place;
  • A: linear operator;
  • b: right-hand side.


  • s::Integer = 8: dimension of the shadow space;
  • tol: relative tolerance;
  • maxiter::Int = size(A, 2): maximum number of iterations;
  • log::Bool: keep track of the residual norm in each iteration;
  • verbose::Bool: print convergence information during the iterations.

Return values

if log is false

  • x: approximate solution.

if log is true

  • x: approximate solution;
  • history: convergence history.

Implementation details

The current implementation is based on the MATLAB version by Van Gijzen and Sonneveld. For background see [Sonneveld2008], [VanGijzen2011] and the IDR(s) webpage.


IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. P. Sonneveld and M. B. van Gijzen SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035–1062, 2008


Algorithm 913: An Elegant IDR(s) Variant that Efficiently Exploits Bi-orthogonality Properties. M. B. van Gijzen and P. Sonneveld ACM Trans. Math. Software,, Vol. 38, No. 1, pp. 5:1-5:19, 2011