AFTD Auto-Formalizing Theoretical Domains

invertible_real_matrix_polar_decomposition

theoremverified

Every invertible real 3 by 3 matrix is the product of an orthogonal matrix and a positive definite matrix.

Statement

theorem invertible_real_matrix_polar_decomposition (L : Matrix (Fin 3) (Fin 3) ℝ) (hL : L.det ≠ 0) : ∃ O P : Matrix (Fin 3) (Fin 3) ℝ, O.transpose * O = 1 ∧ P.PosDef ∧ L = O * P
Source
arXiv:2611.19367v1, Lemma 3; standard polar decomposition used in its proof.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The polar decomposition of an invertible real 3 by 3 matrix L is obtained by setting S = Lᵀ L, which is positive semidefinite and invertible. Defining P = √S via the continuous functional calculus yields a positive definite symmetric matrix satisfying P² = Lᵀ L. Setting O = L P⁻¹, orthogonality Oᵀ O = 1 follows from P⁻¹ (Lᵀ L) P⁻¹ = P⁻¹ P² P⁻¹ = 1, and the factorisation L = O P holds by cancellation of P⁻¹ P.

  1. Equip the real matrix algebra with order and functional calculus structures, and define S = Lᵀ L

    To use the continuous functional calculus for real matrices, we introduce the required typeclass instances (partial order, star-ordered ring, and non-negative spectrum) on M₃(ℝ), and define the symmetric matrix S = Lᵀ L.

    lines 2–5

    uses Matrix.instPartialOrder, Matrix.instStarOrderedRing, Matrix.instNonnegSpectrumClass

      let _ : PartialOrder (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instPartialOrder
      let _ : StarOrderedRing (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instStarOrderedRing
      let _ : NonnegSpectrumClass ℝ (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instNonnegSpectrumClass
      let S : Matrix (Fin 3) (Fin 3) ℝ := L.transpose * L
  2. S is positive semidefinite and non-negative (0 ≤ S)

    For real matrices, the conjugate transpose equals the transpose (Matrix.conjTranspose_eq_transpose_of_trivial). Since A* A is always positive semidefinite (Matrix.posSemidef_conjTranspose_mul_self), S = Lᵀ L is positive semidefinite, which in a star-ordered matrix ring implies 0 ≤ S.

    lines 6–10

    uses Matrix.conjTranspose_eq_transpose_of_trivial, Matrix.posSemidef_conjTranspose_mul_self

      have hS_semi : S.PosSemidef := by
        change (L.transpose * L).PosSemidef
        rw [← Matrix.conjTranspose_eq_transpose_of_trivial L]
        exact Matrix.posSemidef_conjTranspose_mul_self L
      have hS_nonneg : 0 ≤ S := hS_semi.nonneg
  3. Both L and S are invertible (units)

    A matrix is invertible if and only if its determinant is invertible (Matrix.isUnit_iff_isUnit_det), and any non-zero real number is invertible (isUnit_iff_ne_zero.mpr). Since det L ≠ 0, L is invertible. Since transposition preserves invertibility (Matrix.isUnit_transpose), Lᵀ is also invertible, making S = Lᵀ L invertible as the product of two units.

    lines 11–14

    uses Matrix.isUnit_iff_isUnit_det, isUnit_iff_ne_zero.mpr, Matrix.isUnit_transpose

      have hL_unit : IsUnit L := by
        rw [Matrix.isUnit_iff_isUnit_det]
        exact isUnit_iff_ne_zero.mpr hL
      have hS_unit : IsUnit S := ((Matrix.isUnit_transpose L).mpr hL_unit).mul hL_unit
  4. Define P = √S; then P is positive definite

    Using the continuous functional calculus, we define P = √S (CFC.sqrt). Because S is non-negative, P is non-negative (CFC.sqrt_nonneg), hence positive semidefinite (Matrix.nonneg_iff_posSemidef.mp). Moreover, because S is invertible, its square root P is invertible (CFC.isUnit_sqrt_iff). A positive semidefinite matrix that is invertible is positive definite.

    lines 15–19

    uses CFC.sqrt, CFC.sqrt_nonneg, Matrix.nonneg_iff_posSemidef.mp, CFC.isUnit_sqrt_iff

      let P : Matrix (Fin 3) (Fin 3) ℝ := CFC.sqrt S
      have hP_nonneg : 0 ≤ P := CFC.sqrt_nonneg S
      have hP_semi : P.PosSemidef := Matrix.nonneg_iff_posSemidef.mp hP_nonneg
      have hP_unit : IsUnit P := (CFC.isUnit_sqrt_iff S hS_nonneg).mpr hS_unit
      have hP_posdef : P.PosDef := hP_semi.posDef_iff_isUnit.mpr hP_unit
  5. P satisfies P² = Lᵀ L and is symmetric (Pᵀ = P)

    Squaring the functional calculus square root of a non-negative element recovers the element (CFC.sq_sqrt with sq), so P * P = S = Lᵀ L. Since P is positive semidefinite, it is Hermitian (P* = P); for real matrices, conjugate transpose coincides with transpose (Matrix.conjTranspose_eq_transpose_of_trivial), so Pᵀ = P.

    lines 20–27

    uses sq, CFC.sq_sqrt, Matrix.conjTranspose_eq_transpose_of_trivial

      have hP_sq : P * P = L.transpose * L := by
        change P * P = S
        rw [← sq P]
        exact CFC.sq_sqrt S hS_nonneg
      have hP_symm : P.transpose = P := by
        have h_herm : P.conjTranspose = P := hP_semi.1
        rw [← Matrix.conjTranspose_eq_transpose_of_trivial P]
        exact h_herm
  6. Define O = L P⁻¹; providing the pair (O, P) reduces the goal to showing Oᵀ O = 1 and L = O P

    We define O = L P⁻¹. Having already established that P is positive definite, supplying the pair (O, P) leaves two sub-goals: verifying that O is orthogonal (Oᵀ O = 1) and that L = O P.

    lines 28–29

      let O : Matrix (Fin 3) (Fin 3) ℝ := L * P⁻¹
      refine ⟨O, P, ?_, hP_posdef, ?_⟩
  7. O is orthogonal: Oᵀ O = 1

    Since P is invertible, det P is a unit (Matrix.isUnit_iff_isUnit_det). Symmetry of P implies (P⁻¹)ᵀ = P⁻¹ (Matrix.transpose_nonsing_inv). Using the transpose product formula (Matrix.transpose_mul) and associativity (Matrix.mul_assoc), we expand (L P⁻¹)ᵀ (L P⁻¹) into P⁻¹ (Lᵀ L) P⁻¹. Substituting Lᵀ L = P * P and regrouping gives (P⁻¹ P)(P P⁻¹). Since P is invertible, both terms evaluate to 1 (Matrix.nonsing_inv_mul, Matrix.mul_nonsing_inv), leaving the identity matrix (Matrix.mul_one).

    lines 30–41

    uses Matrix.isUnit_iff_isUnit_det, Matrix.transpose_nonsing_inv, Matrix.transpose_mul, Matrix.mul_assoc, Matrix.nonsing_inv_mul, Matrix.mul_nonsing_inv, Matrix.mul_one

      · have hdet : IsUnit P.det := (Matrix.isUnit_iff_isUnit_det P).mp hP_unit
        have hP_inv_symm : (P⁻¹).transpose = P⁻¹ := by
          rw [Matrix.transpose_nonsing_inv, hP_symm]
        change (L * P⁻¹).transpose * (L * P⁻¹) = 1
        rw [Matrix.transpose_mul, hP_inv_symm]
        have h1 : P⁻¹ * L.transpose * (L * P⁻¹) = P⁻¹ * (L.transpose * L) * P⁻¹ := by
          simp only [Matrix.mul_assoc]
        rw [h1, ← hP_sq]
        have h2 : P⁻¹ * (P * P) * P⁻¹ = (P⁻¹ * P) * (P * P⁻¹) := by
          simp only [Matrix.mul_assoc]
        rw [h2]
        rw [Matrix.nonsing_inv_mul P hdet, Matrix.mul_nonsing_inv P hdet, Matrix.mul_one]
  8. The factorisation holds: L = O P

    By definition O P = (L P⁻¹) P. Since det P is a unit (Matrix.isUnit_iff_isUnit_det), right multiplication by P⁻¹ followed by P cancels out, leaving L (Matrix.nonsing_inv_mul_cancel_right).

    lines 42–44

    uses Matrix.isUnit_iff_isUnit_det, Matrix.nonsing_inv_mul_cancel_right

      · have hdet : IsUnit P.det := (Matrix.isUnit_iff_isUnit_det P).mp hP_unit
        change L = (L * P⁻¹) * P
        exact (Matrix.nonsing_inv_mul_cancel_right P L hdet).symm
sq
square of an element a is defined as a * a
CFC.sqrt
continuous functional calculus square root operation on a topological star algebra
CFC.sqrt_nonneg
the functional calculus square root of any element is non-negative
CFC.isUnit_sqrt_iff
for a non-negative element a, its square root is invertible if and only if a is invertible
CFC.sq_sqrt
squaring the functional calculus square root of a non-negative element recovers the element
Matrix.instPartialOrder
the standard partial order instance on square matrices over an RCLike field
Matrix.instStarOrderedRing
the star-ordered ring structure on square matrices over an RCLike field
Matrix.instNonnegSpectrumClass
the instance asserting that non-negative matrices over an RCLike field have non-negative spectrum
Matrix.conjTranspose_eq_transpose_of_trivial
for matrices with trivial star operation (such as real matrices), the conjugate transpose equals the transpose
Matrix.posSemidef_conjTranspose_mul_self
for any matrix A, the product of its conjugate transpose and itself is positive semidefinite
Matrix.isUnit_iff_isUnit_det
a square matrix over a commutative ring is invertible if and only if its determinant is invertible
isUnit_iff_ne_zero.mpr
in a field, every non-zero element is invertible (a unit)
Matrix.isUnit_transpose
a square matrix is invertible if and only if its transpose is invertible
Matrix.nonneg_iff_posSemidef.mp
in the matrix partial order, a non-negative matrix is positive semidefinite
Matrix.transpose_nonsing_inv
the transpose of the inverse of a matrix equals the inverse of its transpose
Matrix.transpose_mul
the transpose of a product of matrices is the product of the transposes in reverse order
Matrix.mul_assoc
matrix multiplication is associative
Matrix.nonsing_inv_mul
multiplying an invertible matrix on the left by its inverse yields the identity matrix
Matrix.mul_nonsing_inv
multiplying an invertible matrix on the right by its inverse yields the identity matrix
Matrix.mul_one
multiplying a matrix on the right by the identity matrix leaves it unchanged
Matrix.nonsing_inv_mul_cancel_right
multiplying a matrix B by A⁻¹ and then by A on the right yields B, provided det A is invertible

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem invertible_real_matrix_polar_decomposition (L : Matrix (Fin 3) (Fin 3) ℝ) (hL : L.det ≠ 0) : ∃ O P : Matrix (Fin 3) (Fin 3) ℝ, O.transpose * O = 1 ∧ P.PosDef ∧ L = O * P := by  let _ : PartialOrder (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instPartialOrder  let _ : StarOrderedRing (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instStarOrderedRing  let _ : NonnegSpectrumClass ℝ (Matrix (Fin 3) (Fin 3) ℝ) := Matrix.instNonnegSpectrumClass  let S : Matrix (Fin 3) (Fin 3) ℝ := L.transpose * L  have hS_semi : S.PosSemidef := by    change (L.transpose * L).PosSemidef    rw [← Matrix.conjTranspose_eq_transpose_of_trivial L]    exact Matrix.posSemidef_conjTranspose_mul_self L  have hS_nonneg : 0 ≤ S := hS_semi.nonneg  have hL_unit : IsUnit L := by    rw [Matrix.isUnit_iff_isUnit_det]    exact isUnit_iff_ne_zero.mpr hL  have hS_unit : IsUnit S := ((Matrix.isUnit_transpose L).mpr hL_unit).mul hL_unit  let P : Matrix (Fin 3) (Fin 3) ℝ := CFC.sqrt S  have hP_nonneg : 0 ≤ P := CFC.sqrt_nonneg S  have hP_semi : P.PosSemidef := Matrix.nonneg_iff_posSemidef.mp hP_nonneg  have hP_unit : IsUnit P := (CFC.isUnit_sqrt_iff S hS_nonneg).mpr hS_unit  have hP_posdef : P.PosDef := hP_semi.posDef_iff_isUnit.mpr hP_unit  have hP_sq : P * P = L.transpose * L := by    change P * P = S    rw [← sq P]    exact CFC.sq_sqrt S hS_nonneg  have hP_symm : P.transpose = P := by    have h_herm : P.conjTranspose = P := hP_semi.1    rw [← Matrix.conjTranspose_eq_transpose_of_trivial P]    exact h_herm  let O : Matrix (Fin 3) (Fin 3) ℝ := L * P⁻¹  refine ⟨O, P, ?_, hP_posdef, ?_⟩  · have hdet : IsUnit P.det := (Matrix.isUnit_iff_isUnit_det P).mp hP_unit    have hP_inv_symm : (P⁻¹).transpose = P⁻¹ := by      rw [Matrix.transpose_nonsing_inv, hP_symm]    change (L * P⁻¹).transpose * (L * P⁻¹) = 1    rw [Matrix.transpose_mul, hP_inv_symm]    have h1 : P⁻¹ * L.transpose * (L * P⁻¹) = P⁻¹ * (L.transpose * L) * P⁻¹ := by      simp only [Matrix.mul_assoc]    rw [h1, ← hP_sq]    have h2 : P⁻¹ * (P * P) * P⁻¹ = (P⁻¹ * P) * (P * P⁻¹) := by      simp only [Matrix.mul_assoc]    rw [h2]    rw [Matrix.nonsing_inv_mul P hdet, Matrix.mul_nonsing_inv P hdet, Matrix.mul_one]  · have hdet : IsUnit P.det := (Matrix.isUnit_iff_isUnit_det P).mp hP_unit    change L = (L * P⁻¹) * P    exact (Matrix.nonsing_inv_mul_cancel_right P L hdet).symm
See it in the graphDiscuss this resultChallenge it