Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Schur complement formula for a diagonal entry of (GG⊤)−1(GG^\top)^{-1}(GG⊤)−1: ((GG⊤)−1)ii=1/∥(I−Pi)gi∥2((GG^\top)^{-1})_{ii} = 1/\|(I-P_i)g_i\|^2((GG⊤)−1)ii​=1/∥(I−Pi​)gi​∥2

Proved
GaussianMatrix.schur_diag_inv

by tc · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-algebramatrix-inverserandom-matricesschur-complement

Let G∈R(n+1)×kG \in \mathbb{R}^{(n+1)\times k}G∈R(n+1)×k be a real matrix, fix a row index i∈{0,…,n}i \in \{0,\dots,n\}i∈{0,…,n}, let g=Gi,:∈Rkg = G_{i,:} \in \mathbb{R}^kg=Gi,:​∈Rk be the iii-th row of GGG, and let H∈Rn×kH \in \mathbb{R}^{n\times k}H∈Rn×k be the matrix obtained from GGG by deleting row iii (its rows are Gi′,:G_{i',:}Gi′,:​, i′≠ii' \neq ii′=i, in their original order). Assume that the Gram matrix HH⊤∈Rn×nHH^\top \in \mathbb{R}^{n\times n}HH⊤∈Rn×n is invertible. Then

((GG⊤)−1)ii  =  (g⊤g−(Hg)⊤(HH⊤)−1(Hg))−1  =  1∥(I−PH) g∥22,\big((GG^\top)^{-1}\big)_{ii} \;=\; \Big(g^\top g - (Hg)^\top (HH^\top)^{-1}(Hg)\Big)^{-1} \;=\; \frac{1}{\|(I-P_H)\,g\|_2^2},((GG⊤)−1)ii​=(g⊤g−(Hg)⊤(HH⊤)−1(Hg))−1=∥(I−PH​)g∥22​1​,

where PH=H⊤(HH⊤)−1HP_H = H^\top (HH^\top)^{-1} HPH​=H⊤(HH⊤)−1H is the orthogonal projector of Rk\mathbb{R}^kRk onto the row space of HHH, so that (I−PH)g(I-P_H)g(I−PH​)g is the residual of ggg after projection onto the span of the other rows. The quantity g⊤g−(Hg)⊤(HH⊤)−1(Hg)g^\top g - (Hg)^\top (HH^\top)^{-1}(Hg)g⊤g−(Hg)⊤(HH⊤)−1(Hg) is the Schur complement of the block HH⊤HH^\topHH⊤ in GG⊤GG^\topGG⊤.

This is the deterministic linear-algebra step in the classical computation of the mean of an inverse Wishart matrix: it expresses each diagonal entry of (GG⊤)−1(GG^\top)^{-1}(GG⊤)−1 through the squared distance from one row to the span of the others, which for a Gaussian matrix has a chi-square law.

Formalization Note. Lean's matrix inverse is total (A−1=0A^{-1} = 0A−1=0 when det⁡A=0\det A = 0detA=0) and 0−1=00^{-1} = 00−1=0 in R\mathbb{R}R; the identity holds under the sole hypothesis det⁡(HH⊤)≠0\det(HH^\top) \ne 0det(HH⊤)=0, including the degenerate case where ggg lies in the row space of HHH (then both sides are 000). The matrix HHH is written G.submatrix i.succAbove id.

Preamble
import Definitions.Def_GaussianMatrix_basic

open MeasureTheory ProbabilityTheory
open scoped Matrix
Formal statement
namespace GaussianMatrix

theorem schur_diag_inv {n k : ℕ} (G : Matrix (Fin (n + 1)) (Fin k) ℝ) (i : Fin (n + 1))
    (hH : (G.submatrix i.succAbove id * (G.submatrix i.succAbove id)ᵀ).det ≠ 0) :
    (G * Gᵀ)⁻¹ i i =
      (G i ⬝ᵥ G i - (G.submatrix i.succAbove id *ᵥ G i) ⬝ᵥ
        ((G.submatrix i.succAbove id * (G.submatrix i.succAbove id)ᵀ)⁻¹ *ᵥ
          (G.submatrix i.succAbove id *ᵥ G i)))⁻¹ := by sorry

end GaussianMatrix
Source
standard fact (inverse of a partitioned matrix / Schur complement): for M=(ab⊤bC)M=\begin{pmatrix} a & b^\top \\ b & C\end{pmatrix}M=(ab​b⊤C​) with CCC invertible, (M−1)11=(a−b⊤C−1b)−1(M^{-1})_{11} = (a - b^\top C^{-1} b)^{-1}(M−1)11​=(a−b⊤C−1b)−1; see R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed., Cambridge Univ. Press 2013, Section 0.7.3.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me