The areas / V16. Normed spaces and functional analysis
Mathlib.Analysis.Matrix.LDL
13 declarations. Mathlib docs · Source
LDL decomposition
This file proves the LDL-decomposition of matrices: Any positive definite matrix S can be
decomposed as S = LDLᴴ where L is a lower-triangular matrix and D is a diagonal matrix.
Main definitions
LDL.loweris the lower triangular matrixL.LDL.lowerInvis the inverse of the lower triangular matrixL.LDL.diagis the diagonal matrixD.
Main result
LDL.lower_conj_diagstates that any positive definite matrix can be decomposed asLDLᴴ.LDL.isLowerTriangular_lowerstates thatLis lower triangular.
theorem LDL.diagEntries.congr_simp E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S S_1 : Matrix n n 𝕜} (e_S : S = S_1) [inst_3 : Fintype n] (hS : S.PosDef) (a a_1 : n),
a = a_1 → LDL.diagEntries hS a = LDL.diagEntries ⋯ a_1
theorem LDL.lowerInv.congr_simp E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S S_1 : Matrix n n 𝕜} (e_S : S = S_1) [inst_3 : Fintype n] (hS : S.PosDef) (a a_1 : n),
a = a_1 → ∀ (a_2 a_3 : n), a_2 = a_3 → LDL.lowerInv hS a a_2 = LDL.lowerInv ⋯ a_1 a_3
def LDL.lowerInv E3 #
{𝕜 : Type u_1} →
[inst : RCLike 𝕜] →
{n : Type u_2} →
[inst_1 : LinearOrder n] → [LocallyFiniteOrderBot n] → {S : Matrix n n 𝕜} → [Fintype n] → S.PosDef → Matrix n n 𝕜
The inverse of the lower triangular matrix L of the LDL-decomposition. It is obtained by
applying Gram-Schmidt-Orthogonalization w.r.t. the inner product induced by Sᵀ on the standard
basis vectors Pi.basisFun.
theorem LDL.lowerInv_eq_gramSchmidtBasis E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef),
LDL.lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(InnerProductSpace.gramSchmidtBasis (Pi.basisFun 𝕜 n))).transpose
instance LDL.invertibleLowerInv E0 #
{𝕜 : Type u_1} →
[inst : RCLike 𝕜] →
{n : Type u_2} →
[inst_1 : LinearOrder n] →
[inst_2 : LocallyFiniteOrderBot n] →
{S : Matrix n n 𝕜} → [inst_3 : Fintype n] → (hS : S.PosDef) → Invertible (LDL.lowerInv hS)
theorem LDL.lowerInv_orthogonal E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef) {i j : n},
i ≠ j → inner 𝕜 (WithLp.toLp 2 (LDL.lowerInv hS i)) (WithLp.toLp 2 (S.transpose.mulVec (LDL.lowerInv hS j))) = 0
def LDL.diagEntries E1 #
{𝕜 : Type u_1} →
[inst : RCLike 𝕜] →
{n : Type u_2} →
[inst_1 : LinearOrder n] → [LocallyFiniteOrderBot n] → {S : Matrix n n 𝕜} → [Fintype n] → S.PosDef → n → 𝕜
The entries of the diagonal matrix D of the LDL decomposition.
def LDL.diag E3 #
{𝕜 : Type u_1} →
[inst : RCLike 𝕜] →
{n : Type u_2} →
[inst_1 : LinearOrder n] → [LocallyFiniteOrderBot n] → {S : Matrix n n 𝕜} → [Fintype n] → S.PosDef → Matrix n n 𝕜
The diagonal matrix D of the LDL decomposition.
theorem LDL.isLowerTriangular_lowerInv E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef), (LDL.lowerInv hS).IsLowerTriangular
theorem LDL.diag_eq_lowerInv_conj E1 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef),
LDL.diag hS = LDL.lowerInv hS * S * (LDL.lowerInv hS).conjTranspose
Inverse statement of LDL decomposition: we can conjugate a positive definite matrix by some lower triangular matrix and get a diagonal matrix.
def LDL.lower E3 #
{𝕜 : Type u_1} →
[inst : RCLike 𝕜] →
{n : Type u_2} →
[inst_1 : LinearOrder n] → [LocallyFiniteOrderBot n] → {S : Matrix n n 𝕜} → [Fintype n] → S.PosDef → Matrix n n 𝕜
The lower triangular matrix L of the LDL decomposition.
theorem LDL.isLowerTriangular_lower E3 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef), (LDL.lower hS).IsLowerTriangular
theorem LDL.lower_conj_diag E3 #
∀ {𝕜 : Type u_1} [inst : RCLike 𝕜] {n : Type u_2} [inst_1 : LinearOrder n] [inst_2 : LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜} [inst_3 : Fintype n] (hS : S.PosDef), LDL.lower hS * LDL.diag hS * (LDL.lower hS).conjTranspose = S
LDL decomposition: any positive definite matrix S can be
decomposed as S = LDLᴴ where L is a lower-triangular matrix and D is a diagonal matrix.