NLA-lib Explorer

Arnoldi process

Build an orthonormal Krylov basis and an upper-Hessenberg compression. This is a shared Krylov factorization; FOM, GMRES, and other algorithms specify how to use it for a particular task.

Implementations

Definition

Definition (Arnoldi process). For a square matrix \mathbf{A} and starting vector \mathbf{b}, construct a graded orthonormal basis \mathbf{Q}_k of \mathcal{K}_k(\mathbf{A},\mathbf{b}). Orthogonalize \mathbf{A}\mathbf{q}_j against the current basis to obtain the next column. The compression \mathbf{H}_k=\mathbf{Q}_k^{\mathsf{H}}\mathbf{A}\mathbf{Q}_k is upper Hessenberg. A zero residual signals that the Krylov space has stopped growing; no further nonzero basis column is available.

Lean statement and details
NLAlib.arnoldiMatrix.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] [DecidableEq n]
  (A : Matrix n n π•œ) (b : n β†’ π•œ) (q : β„•) : Matrix n (Fin q) π•œ

Full source on GitHub

Copy link

Mathematical guarantees

Theorem (Arnoldi relation). For the library's canonical Krylov bases \mathbf{Q}_j, including their zero-column convention after breakdown,

\mathbf{A}\mathbf{Q}_k=\mathbf{Q}_{k+1}(\mathbf{Q}_{k+1}^{\mathsf{H}}\mathbf{A}\mathbf{Q}_k).

Thus applying the full operator to the current basis is represented in the next Krylov space by a small coefficient matrix.

Lean statement and details
NLAlib.mul_arnoldiMatrix.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n]
  [DecidableEq n] (A : Matrix n n π•œ) (b : n β†’ π•œ) (q : β„•) :
  A * arnoldiMatrix A b q =
    arnoldiMatrix A b (q + 1) * ((arnoldiMatrix A b (q + 1))α΄΄ * A * arnoldiMatrix A b q)

Full source on GitHub

Copy link

Further results

Theorem (Canonical Arnoldi basis is graded and unique).

a graded basis whose matrix \mathbf{Q}^{\mathsf{H}}\mathbf{K}_q(\mathbf{A}, \mathbf{b}) has positive diagonal (in the order of \Bbbk, so real positive) is the canonical one: an orthonormal \mathbf{Q} with q columns whose first j + 1 columns span \mathcal{K}_{j+1}(\mathbf{A}, \mathbf{b}) for each j < q is \mathsf{arnoldiMatrix}(\mathbf{A}, \mathbf{b}, q).

Lean statement and details
NLAlib.IsGradedKrylovBasis.eq_arnoldiMatrix.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2}
  [Fintype n] [DecidableEq n] {A : Matrix n n π•œ} {b : n β†’ π•œ} {q : β„•} {Q : Matrix n (Fin q) π•œ}
  (hQ : IsGradedKrylovBasis A b Q) (hpos : βˆ€ (j : Fin q), 0 < (Qα΄΄ * krylovMatrix A b q) j j) :
  Q = arnoldiMatrix A b q

Full source on GitHub

Copy link

Theorem (Arnoldi breaks down exactly at the grade).

h_{j+1,j} = 0 iff \nu \le j + 1, for every \mathbf{A}. [Saad2003, Proposition 6.6].

Lean statement and details
NLAlib.mgsArnoldiHessenberg_apply_succ_eq_zero_iff.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ]
  {n : Type u_2} [Fintype n] [DecidableEq n] (A : Matrix n n π•œ) (b : n β†’ π•œ) {q : β„•} (j : Fin q) :
  mgsArnoldiHessenberg A b q j.succ j = 0 ↔ krylovGrade A b ≀ ↑j + 1

Full source on GitHub

Copy link

Theorem (Arnoldi compression is upper Hessenberg).

[Saad2003, Β§6.3].

Lean statement and details
NLAlib.IsGradedKrylovBasis.isUpperHessenberg.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2}
  [Fintype n] [DecidableEq n] {A : Matrix n n π•œ} {b : n β†’ π•œ} {q : β„•} {Q : Matrix n (Fin q) π•œ}
  (hQ : IsGradedKrylovBasis A b Q) : IsUpperHessenberg (Qα΄΄ * A * Q)

Full source on GitHub

Copy link

Theorem (The Arnoldi process computes the Hessenberg matrix).

for every \mathbf{A} and q, the matrix computed by q steps from \mathbf{b} is \underline{\mathbf{H}}_q = \mathbf{Q}_{q+1}^{\mathsf{H}}\mathbf{A}\mathbf{Q}_q for the canonical bases \mathbf{Q}_j = \mathsf{arnoldiMatrix}(\mathbf{A}, \mathbf{b}, j). [Saad2003, Β§6.3].

Lean statement and details
NLAlib.mgsArnoldiHessenberg_eq.{u_1, u_2} {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n]
  [DecidableEq n] (A : Matrix n n π•œ) (b : n β†’ π•œ) (q : β„•) :
  mgsArnoldiHessenberg A b q = (arnoldiMatrix A b (q + 1))α΄΄ * A * arnoldiMatrix A b q

Full source on GitHub

Copy link

Theorem (Arnoldi basis of a Hessenberg reduction).

With positive real subdiagonal entries, the unitary factor is exactly \mathsf{arnoldiMatrix}(\mathbf{A},\mathbf{Q}_{:,0},k+1). [GolubVanLoan2013, Β§7.4.3].

Lean statement and details
NLAlib.HasOrthonormalCols.eq_arnoldiMatrix_of_isUpperHessenberg.{u_1} {π•œ : Type u_1} [RCLike π•œ]
  {k : β„•} {A Q : Matrix (Fin (k + 1)) (Fin (k + 1)) π•œ} (hQ : HasOrthonormalCols Q)
  (hH : IsUpperHessenberg (Qα΄΄ * A * Q)) (hpos : βˆ€ (i : Fin k), 0 < (Qα΄΄ * A * Q) i.succ i.castSucc) :
  Q = arnoldiMatrix A (Q.col 0) (k + 1)

Full source on GitHub

Copy link

Components

Used by other algorithms

Mathematical background

Appears under these tasks