# Krylov.jl: A Julia basket of hand-picked Krylov methods

Documentation |
Linux/macOS/Windows/FreeBSD |
Coverage |
DOI |
Downloads |
---|---|---|---|---|

## How to Cite

If you use Krylov.jl in your work, please cite using the format given in `CITATION.bib`

.

## Content

This package provides implementations of certain of the most useful Krylov method for a variety of problems:

- Square or rectangular full-rank systems

*Ax = b*

should be solved when ** b** lies in the range space of

**. This situation occurs when**

*A*is square and nonsingular,*A*is tall and has full column rank and*A*lies in the range of*b*.*A*

- Linear least-squares problems

minimize ‖** b** -

**‖**

*Ax*should be solved when ** b** is not in the range of

**(inconsistent systems), regardless of the shape and rank of**

*A***. This situation mainly occurs when**

*A*is square and singular,*A*is tall and thin.*A*

Underdetermined systems are less common but also occur.

If there are infinitely many such ** x** (because

**is column rank-deficient), one with minimum norm is identified**

*A*
minimize ‖** x**‖ subject to

**∈ argmin ‖**

*x***-**

*b***‖.**

*Ax*- Linear least-norm problems

minimize ‖** x**‖ subject to

*Ax = b*should be solved when ** A** is column rank-deficient but

**is in the range of**

*b***(consistent systems), regardless of the shape of**

*A***. This situation mainly occurs when**

*A*is square and singular,*A*is short and wide.*A*

Overdetermined systems are less common but also occur.

- Adjoint systems

** Ax = b** and

*Aᴴy = c*where ** A** can have any shape.

- Saddle-point and Hermitian quasi-definite systems

[*M *** A**] [

**] = [**

*x***]**

*b*[

*Aᴴ***] [**

*-N***] [**

*y***]**

*c*where ** A** can have any shape.

- Generalized saddle-point and non-Hermitian partitioned systems

[*M*** A**] [

**] = [**

*x***]**

*b*[

*B***] [**

*N***] [**

*y***]**

*c*where ** A** can have any shape and

**has the shape of**

*B***.**

*Aᴴ***,**

*A***,**

*B***and**

*b***must be all nonzero.**

*c*Krylov solvers are particularly appropriate in situations where such problems must be solved but a factorization is not possible, either because:

is not available explicitly,*A*would be dense or would consume an excessive amount of memory if it were materialized,*A*- factors would consume an excessive amount of memory.

Iterative methods are recommended in either of the following situations:

- the problem is sufficiently large that a factorization is not feasible or would be slow,
- an effective preconditioner is known in cases where the problem has unfavorable spectral structure,
- the operator can be represented efficiently as a sparse matrix,
- the operator is
*fast*, i.e., can be applied with better complexity than if it were materialized as a matrix. Certain fast operators would materialize as*dense*matrices.

## Features

All solvers in Krylov.jl have in-place version, are compatible with **GPU** and work in any floating-point data type.

## How to Install

Krylov can be installed and tested through the Julia package manager:

```
julia> ]
pkg> add Krylov
pkg> test Krylov
```

## Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.