Polar decomposition for invertible matrices #
A = Q * P with Q unitary and P positive definite, over RCLike scalars.
Mathlib has no polar decomposition for matrices at the pinned revision
(8a178386) — a search for polarDecomposition across the whole library
returns nothing. This file supplies the case this repo needs, in the
ForMathlib pattern this repository uses for Mathlib gaps, and is written to be
upstreamable rather than to be convenient here.
Why it costs almost nothing now #
The classical proof needs a square root of the positive-definite matrix
Aᴴ A, and historically that meant the spectral theorem. It no longer does:
Mathlib's continuous functional calculus applies to real matrices once the
Loewner order is in scope (open scoped MatrixOrder), so CFC.sqrt is
available directly and CFC.sqrt_mul_sqrt_self is the only property needed.
That is the whole trick. P := √(Aᴴ A), Q := A P⁻¹, and
Qᴴ Q = P⁻¹ Aᴴ A P⁻¹ = P⁻¹ (P P) P⁻¹ = 1.
Uniqueness #
Both factors are unique. If A = Q P with Q unitary and P positive
definite then Pᴴ Qᴴ Q P = P P, so P is a nonnegative square root of
Aᴴ A — and the nonnegative square root is unique (CFC.sqrt_unique), so it
is the one. Q = A P⁻¹ then follows.
The positive-definite factor #
The positive-definite factor of the polar decomposition, √(Aᴴ A).
Equations
- A.polarFactor = CFC.sqrt (A.conjTranspose * A)
Instances For
√(Aᴴ A) squares to Aᴴ A. This is the only property of the square root
the construction uses.
With A invertible the factor is positive definite, not merely
semidefinite.
The orthogonal factor #
The unitary factor of the polar decomposition, A · √(Aᴴ A)⁻¹.
Equations
- A.polarUnitary = A * A.polarFactor⁻¹
Instances For
Polar decomposition. Every invertible matrix factors as a unitary matrix times a positive-definite one.
Uniqueness #
The positive-definite factor is unique.
The unitary factor is unique.