NLA-lib Explorer

Golub–Kahan process

Build a right basis \mathbf{V} and a left basis \mathbf{U} for a rectangular matrix \mathbf{A}\in\Bbbk^{m\times n} from a start block \mathbf\Omega\in\Bbbk^{n\times\ell}, together with banded coefficient matrices \mathbf{R} and \mathbf{S} such that

\mathbf{A}\mathbf{V}_{<q}=\mathbf{U}\mathbf{R},\qquad\mathbf{A}^{\mathsf{H}}\mathbf{U}=\mathbf{V}\mathbf{S}.

The process alternates products with \mathbf{A} and \mathbf{A}^{\mathsf{H}}. It is a shared Krylov factorization for a rectangular operator, as the Lanczos process is for a Hermitian one; randomized block Krylov iteration specifies how to use it for low-rank approximation. The library states the block form, with block width \ell (named b in the Lean statements); \ell=1 gives bidiagonalization from a single start vector.

This page holds the exact mathematical process and its theory. The program, its certificate, and the bounds for a rounded run are on the implementation page.

Implementation guides

Implementations

Definition

The process is defined over an orthogonalization step given by a contract, not by a formula.

Definition (Exact extension of a basis by a block). Let \mathbf{Q} be a stored basis with n rows and \mathbf{W} a block of \ell columns. A new block \mathbf{Q}' with coefficients \mathbf{H} and \mathbf{R} is an exact extension of \mathbf{Q} by \mathbf{W} when

  1. \mathbf{W}=\mathbf{Q}\mathbf{H}+\mathbf{Q}'\mathbf{R} with \mathbf{R} upper triangular;
  2. the columns of \mathbf{Q}' are combinations of the columns of \mathbf{Q} and \mathbf{W};
  3. a zero column of \mathbf{W} gives a zero column of \mathbf{Q}';
  4. the rows of \mathbf{H} and \mathbf{R} at zero columns of \mathbf{Q} and \mathbf{Q}' are zero;
  5. if the nonzero columns of \mathbf{Q} are orthonormal, so are the nonzero columns of [\mathbf{Q},\mathbf{Q}'].

This is a relation, not a function: the scheme decides which columns of \mathbf{Q}' are zero, so dependent columns may be dropped. No condition is imposed on \mathbf{Q} itself.

Lean statement and details
NLAlib.IsBasisExtension.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {n k b : ℕ} (Q : Matrix (Fin n) (Fin k) 𝕜)
  (W Q' : Matrix (Fin n) (Fin b) 𝕜) (H : Matrix (Fin k) (Fin b) 𝕜) (R : Matrix (Fin b) (Fin b) 𝕜) :
  Prop

Full source on GitHub

Copy link

Definition (Block Golub–Kahan process). Write \operatorname{extend}(\mathbf{Q},\mathbf{W}) for any exact extension of \mathbf{Q} by \mathbf{W}. All blocks have width \ell and are stored side by side.

  1. \mathbf{V}_0,\ \mathbf{R}_0=\operatorname{extend}(\emptyset,\mathbf\Omega).
  2. For j=0,\ldots,q-1:
    1. \mathbf{U}_j=\operatorname{extend}(\mathbf{U}_{<j},\ \mathbf{A}\mathbf{V}_j), with coefficients stored in block column j of \mathbf{R};
    2. \mathbf{V}_{j+1}=\operatorname{extend}(\mathbf{V}_{\le j},\ \mathbf{A}^{\mathsf{H}}\mathbf{U}_j), with coefficients stored in block column j of \mathbf{S}.

The output is \mathbf{U}\in\Bbbk^{m\times q\ell}, \mathbf{V}\in\Bbbk^{n\times(q+1)\ell}, \mathbf{R}_0\in\Bbbk^{\ell\times \ell}, \mathbf{R}\in\Bbbk^{q\ell\times q\ell}, and \mathbf{S}\in\Bbbk^{(q+1)\ell\times q\ell}; the rows of each coefficient block column below the newly extended block are zero. Every block is extended against all earlier blocks of its side. Because an extension is a relation, the process is a relation between the input (\mathbf{A},\mathbf\Omega,q) and the stored matrices (\mathbf{U},\mathbf{V},\mathbf{R}_0,\mathbf{R},\mathbf{S}), over real or complex scalars. An exact run is any output related to the input; the statements below hold for every exact run.

Lean statement and details
NLAlib.IsBlockGolubKahan.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ} (A : Matrix (Fin m) (Fin n) 𝕜)
  (Ω : Matrix (Fin n) (Fin b) 𝕜) (q : ℕ) (U : Matrix (Fin m) (Fin (q * b)) 𝕜)
  (V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜) (R₀ : Matrix (Fin b) (Fin b) 𝕜)
  (R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜) (S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜) : Prop

Full source on GitHub

Copy link

Mathematical guarantees

These statements hold in exact arithmetic, for every \mathbf{A}, every start block, and every exact extension scheme. Dependent start columns, rank-deficient \mathbf{A}, and breakdown inside the run are included: a dropped direction is a zero column of the stored basis.

Theorem (First block relation). For an exact run, with \mathbf{V}_{<q} the first q blocks of the right basis,

\mathbf{A}\mathbf{V}_{<q}=\mathbf{U}\mathbf{R}.

Lean statement and details
NLAlib.IsBlockGolubKahan.mul_blockPrefix_right_eq.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  A * blockPrefix b V q = U * R

Full source on GitHub

Copy link

Theorem (Second block relation). For an exact run, with \mathbf{V} the right basis of all q+1 blocks,

\mathbf{A}^{\mathsf{H}}\mathbf{U}=\mathbf{V}\mathbf{S}.

Lean statement and details
NLAlib.IsBlockGolubKahan.conjTranspose_mul_left_eq.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  Aᴴ * U = V * S

Full source on GitHub

Copy link

Theorem (Orthonormal bases). For an exact run, the nonzero columns of the right basis are orthonormal:

\mathbf{V}^{\mathsf{H}}\mathbf{V}=\operatorname{diag}(\mathbf{s}),\qquad s_c=0\ \text{at a zero column of }\mathbf{V},\quad s_c=1\ \text{otherwise}.

The library states the same identity for the left basis \mathbf{U}.

Lean statement and details
NLAlib.IsBlockGolubKahan.gramDefect_right_eq_zero.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  gramDefect V = 0

Full source on GitHub

Copy link

Theorem (The right basis spans the block Krylov spaces). For an exact run and every j\le q, the first j+1 blocks of \mathbf{V} span

\mathcal{K}_{j+1}(\mathbf{A}^{\mathsf{H}}\mathbf{A},\mathbf\Omega)=\operatorname{range}[\mathbf\Omega,\ \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf\Omega,\ldots,(\mathbf{A}^{\mathsf{H}}\mathbf{A})^{j}\mathbf\Omega].

Zero columns are included in the stored blocks and contribute nothing to the range. The same result group, listed under Further results, states that the first j blocks of \mathbf{U} span \mathbf{A}\,\mathcal{K}_j(\mathbf{A}^{\mathsf{H}}\mathbf{A},\mathbf\Omega) and that \mathbf{U}\mathbf{U}^{\mathsf{H}} is the orthogonal projector onto the range of \mathbf{A}[\mathbf\Omega,\ldots,(\mathbf{A}^{\mathsf{H}}\mathbf{A})^{q-1}\mathbf\Omega].

Lean statement and details
NLAlib.IsBlockGolubKahan.range_blockPrefix_right.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) {j : ℕ}
  (hj : j ≤ q) : (blockPrefix b V (j + 1)).mulVecLin.range = blockKrylovSpace (Aᴴ * A) Ω (j + 1)

Full source on GitHub

Copy link

Theorem (Band structure of the coefficients). For an exact run with block width \ell:

  1. \mathbf{R} is upper triangular and vanishes above its \ell-th superdiagonal: R_{ic}=0 for i>c and for c>i+\ell.
  2. \mathbf{S} vanishes above its diagonal and below its \ell-th subdiagonal: S_{ic}=0 for i<c and for i>c+\ell.

Thus \mathbf{R} and \mathbf{S}^{\mathsf{H}} are zero outside the band 0\le\text{column}-\text{row}\le \ell. For \ell=1, \mathbf{S}^{\mathsf{H}} is upper bidiagonal.

Lean statement and details
NLAlib.IsBlockGolubKahan.blockTriangular_left.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  R.BlockTriangular id

Full source on GitHub

Copy link

Theorem (A run exists for every input). For every \mathbf{A}, every start block \mathbf\Omega, and every q, there are matrices \mathbf{U},\mathbf{V},\mathbf{R}_0,\mathbf{R},\mathbf{S} forming an exact run. The definition is therefore never vacuous.

Lean statement and details
NLAlib.exists_isBlockGolubKahan.{u_1} {𝕜 : Type u_1} [RCLike 𝕜] {m n b : ℕ}
  (A : Matrix (Fin m) (Fin n) 𝕜) (Ω : Matrix (Fin n) (Fin b) 𝕜) (q : ℕ) :
  ∃ U V R₀ R S, IsBlockGolubKahan A Ω q U V R₀ R S

Full source on GitHub

Copy link

Theorem (The factored output is the block Krylov approximation). For an exact run,

\mathbf{U}\mathbf{S}^{\mathsf{H}}\mathbf{V}^{\mathsf{H}}=\mathsf{rbki}(\mathbf{A},\mathbf\Omega,q),

the projection of \mathbf{A} onto the range of \mathbf{A}[\mathbf\Omega,\mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf\Omega,\ldots,(\mathbf{A}^{\mathsf{H}}\mathbf{A})^{q-1}\mathbf\Omega]. Here \mathbf{V} has all q+1 blocks. The same result group states the identity for the factors assembled from the packed coefficient blocks of an exact stored run of the program, over the reals.

Lean statement and details
NLAlib.IsBlockGolubKahan.mul_conjTranspose_mul_conjTranspose_eq_rbki.{u_1} {𝕜 : Type u_1} [RCLike 𝕜]
  {m n b q : ℕ} {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  U * Sᴴ * Vᴴ = rbki A Ω q

Full source on GitHub

Copy link

Components

The orthogonalization step is a parameter of the process. The scheme the library supplies for it is a column-wise two-pass classical Gram–Schmidt extension with threshold deflation, described as an implementation of Gram–Schmidt orthogonalization.

Gram–Schmidt orthogonalization

Construct an orthonormal basis from input vectors.

Uses and composed algorithms

Further results

Theorem (The left basis of block Golub–Kahan bidiagonalization gives the range projector).

The left basis \mathbf{U} of block Golub–Kahan bidiagonalization in exact arithmetic gives the orthogonal projector onto the range of \mathbf{A}\mathbf{K}_q, where \mathbf{K}_q = [\mathbf{\Omega}, \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf{\Omega}, \dots, (\mathbf{A}^{\mathsf{H}}\mathbf{A})^{q-1}\mathbf{\Omega}] is the block Krylov matrix: \mathbf{U}\mathbf{U}^{\mathsf{H}} = \mathbf{P}_{\mathbf{A}\mathbf{K}_q}\,. No printed source.

Lean statement and details
NLAlib.IsBlockGolubKahan.mul_conjTranspose_left_eq_rangeProjector.{u_1} {𝕜 : Type u_1} [RCLike 𝕜]
  {m n b : ℕ} {A : Matrix (Fin m) (Fin n) 𝕜} {Ω : Matrix (Fin n) (Fin b) 𝕜} {q : ℕ}
  {U : Matrix (Fin m) (Fin (q * b)) 𝕜} {V : Matrix (Fin n) (Fin ((q + 1) * b)) 𝕜}
  {R₀ : Matrix (Fin b) (Fin b) 𝕜} {R : Matrix (Fin (q * b)) (Fin (q * b)) 𝕜}
  {S : Matrix (Fin ((q + 1) * b)) (Fin (q * b)) 𝕜} (h : IsBlockGolubKahan A Ω q U V R₀ R S) :
  U * Uᴴ = rangeProjector (A * blockKrylovMatrix (Aᴴ * A) Ω q)

Full source on GitHub

Copy link

Mathematical background

Appears under these tasks