mathlib documentation

linear_algebra.matrix.schur_complement

2×2 block matrices and the Schur complement #

This file proves properties of 2×2 block matrices [A B; C D] that relate to the Schur complement D - C⬝A⁻¹⬝B.

Main results #

theorem matrix.from_blocks_eq_of_invertible₁₁ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype l] [fintype m] [fintype n] [decidable_eq l] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m m α) (B : matrix m n α) (C : matrix l m α) (D : matrix l n α) [invertible A] :
matrix.from_blocks A B C D = ((matrix.from_blocks 1 0 (C.mul ( A)) 1).mul (matrix.from_blocks A 0 0 (D - (C.mul ( A)).mul B))).mul (matrix.from_blocks 1 (( A).mul B) 0 1)

LDU decomposition of a block matrix with an invertible top-left corner, using the Schur complement.

theorem matrix.from_blocks_eq_of_invertible₂₂ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype l] [fintype m] [fintype n] [decidable_eq l] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix l m α) (B : matrix l n α) (C : matrix n m α) (D : matrix n n α) [invertible D] :
matrix.from_blocks A B C D = ((matrix.from_blocks 1 (B.mul ( D)) 0 1).mul (matrix.from_blocks (A - (B.mul ( D)).mul C) 0 0 D)).mul (matrix.from_blocks 1 0 (( D).mul C) 1)

LDU decomposition of a block matrix with an invertible bottom-right corner, using the Schur complement.

Lemmas about matrix.det #

theorem matrix.det_from_blocks₁₁ {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m m α) (B : matrix m n α) (C : matrix n m α) (D : matrix n n α) [invertible A] :
(matrix.from_blocks A B C D).det = A.det * (D - (C.mul ( A)).mul B).det

Determinant of a 2×2 block matrix, expanded around an invertible top left element in terms of the Schur complement.

@[simp]
theorem matrix.det_from_blocks_one₁₁ {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (B : matrix m n α) (C : matrix n m α) (D : matrix n n α) :
(matrix.from_blocks 1 B C D).det = (D - C.mul B).det
theorem matrix.det_from_blocks₂₂ {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m m α) (B : matrix m n α) (C : matrix n m α) (D : matrix n n α) [invertible D] :
(matrix.from_blocks A B C D).det = D.det * (A - (B.mul ( D)).mul C).det

Determinant of a 2×2 block matrix, expanded around an invertible bottom right element in terms of the Schur complement.

@[simp]
theorem matrix.det_from_blocks_one₂₂ {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m m α) (B : matrix m n α) (C : matrix n m α) :
(matrix.from_blocks A B C 1).det = (A - B.mul C).det
theorem matrix.det_one_add_mul_comm {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m n α) (B : matrix n m α) :
(1 + A.mul B).det = (1 + B.mul A).det

The Weinstein–Aronszajn identity. Note the 1 on the LHS is of shape m×m, while the 1 on the RHS is of shape n×n.

theorem matrix.det_mul_add_one_comm {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m n α) (B : matrix n m α) :
(A.mul B + 1).det = (B.mul A + 1).det

Alternate statement of the Weinstein–Aronszajn identity

theorem matrix.det_one_sub_mul_comm {m : Type u_2} {n : Type u_3} {α : Type u_4} [fintype m] [fintype n] [decidable_eq m] [decidable_eq n] [comm_ring α] (A : matrix m n α) (B : matrix n m α) :
(1 - A.mul B).det = (1 - B.mul A).det
theorem matrix.det_one_add_col_mul_row {m : Type u_2} {α : Type u_4} [fintype m] [decidable_eq m] [comm_ring α] (u v : m α) :

A special case of the Matrix determinant lemma for when A = I.

TODO: show this more generally.

Lemmas about and #

theorem matrix.schur_complement_eq₁₁ {m : Type u_2} {n : Type u_3} {𝕜 : Type u_5} [is_R_or_C 𝕜] [fintype m] [decidable_eq m] [fintype n] {A : matrix m m 𝕜} (B : matrix m n 𝕜) (D : matrix n n 𝕜) (x : m 𝕜) (y : n 𝕜) [invertible A] (hA : A.is_hermitian) :
theorem matrix.is_hermitian.from_blocks₁₁ {m : Type u_2} {n : Type u_3} {𝕜 : Type u_5} [is_R_or_C 𝕜] [fintype m] [decidable_eq m] {A : matrix m m 𝕜} (B : matrix m n 𝕜) (D : matrix n n 𝕜) (hA : A.is_hermitian) :
theorem matrix.is_hermitian.from_blocks₂₂ {m : Type u_2} {n : Type u_3} {𝕜 : Type u_5} [is_R_or_C 𝕜] [fintype n] [decidable_eq n] (A : matrix m m 𝕜) (B : matrix m n 𝕜) {D : matrix n n 𝕜} (hD : D.is_hermitian) :
theorem matrix.pos_semidef.from_blocks₁₁ {m : Type u_2} {n : Type u_3} {𝕜 : Type u_5} [is_R_or_C 𝕜] [fintype m] [decidable_eq m] [fintype n] {A : matrix m m 𝕜} (B : matrix m n 𝕜) (D : matrix n n 𝕜) (hA : A.pos_def) [invertible A] :
theorem matrix.pos_semidef.from_blocks₂₂ {m : Type u_2} {n : Type u_3} {𝕜 : Type u_5} [is_R_or_C 𝕜] [fintype m] [fintype n] [decidable_eq n] (A : matrix m m 𝕜) (B : matrix m n 𝕜) {D : matrix n n 𝕜} (hD : D.pos_def) [invertible D] :