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.
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) π
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)
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
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
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
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].