Definition (Cholesky factorization). For Hermitian positive-definite \mathbf{A}, a Cholesky factorization has the form \mathbf{A}=\mathbf{L}\mathbf{L}^{\mathsf{H}}, where \mathbf{L} is lower triangular with positive real diagonal. The upper-triangular convention uses \mathbf{A}=\mathbf{R}^{\mathsf{H}}\mathbf{R}. Solving with these factors requires two triangular solves.
Cholesky factorization
Construct a triangular factor of a positive-definite matrix.
Definition
Mathematical guarantees
Theorem (Existence of Cholesky factors). A square matrix admits a Cholesky factor with positive real diagonal exactly when it is positive definite. This characterizes existence of the mathematical factorization; a rounded implementation needs a separate execution and accuracy result.
Lean statement and details
NLAlib.exists_isCholesky_iff_posDef.{u_1, u_2} {๐ : Type u_1} [RCLike ๐] {n : Type u_2}
[LinearOrder n] [Fintype n] (A : Matrix n n ๐) : (โ L, IsCholesky A L) โ A.PosDefFurther results
Theorem (Cholesky in the standard model: no breakdown and backward error).
Let \mathbf{A} be positive definite of order n, read as a_{ij}, j \le i, with relative error v \ge 0, and let l be a trace of left-looking Cholesky on a at unit roundoff u \ge 0, with 4(n + 1)^2(u + v)\kappa(\mathbf{A}) \le 1. Then every computed pivot is positive and \|\mathbf{A} - \mathbf{L}\mathbf{L}^{\mathsf{T}}\|_2 \le 2(n + 1)^2(u + v)\|\mathbf{A}\|_2 . [Higham2002, Theorem 10.3, Theorem 10.7]; normwise, with these constants.
Lean statement and details
NLAlib.Computation.IsCholTrace.pos_and_specNorm_sub_le {n : โ} {A : Matrix (Fin n) (Fin n) โ}
{a L : โ โ โ โ โ} {u v : โ} (h : Computation.IsCholTrace u a L n) (hA : A.PosDef) (hu : 0 โค u)
(hv : 0 โค v) (ha : โ (i j : Fin n), j โค i โ |a โi โj - A i j| โค v * |A i j|)
(hsmall : 4 * (โn + 1) ^ 2 * (u + v) * pseudoConditionNumber A โค 1) :
(โ j < n, 0 < L j j) โง
specNorm (A - Computation.lowerOf L n * (Computation.lowerOf L n)แต) โค
2 * (โn + 1) ^ 2 * (u + v) * specNorm A