Documentation

TauCeti.Analysis.Matrix.GeometricMean

The positive semidefinite solution of A * S * A = T #

The Loewner order on square matrices makes Matrix n n π•œ an algebra with a continuous functional calculus, so TauCeti.geometricMean applies to it: for S positive definite and T positive semidefinite there is exactly one positive semidefinite A with A * S * A = T, namely TauCeti.geometricMean S⁻¹ʳ T, which is the classical matrix √(S⁻¹) * √(√S * T * √S) * √(S⁻¹).

Read through covariance matrices, that matrix is the linear map pushing a centred Gaussian law of covariance S forward to one of covariance T, that is, the Brenier map between two Gaussians.

The solution is Hermitian, so for positive definite S and positive semidefinite T it solves the congruence equation A * S * Aᴴ = T as well; when T is positive definite the solution is positive definite itself, and its inverse is the solution TauCeti.geometricMean T⁻¹ʳ S of the reversed equation.

Main results #

theorem Matrix.PosDef.existsUnique_posSemidef_mul_mul {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] {S T : Matrix n n π•œ} (hS : S.PosDef) (hT : T.PosSemidef) :
βˆƒ! A : Matrix n n π•œ, A.PosSemidef ∧ A * S * A = T

For a positive definite S and a positive semidefinite T there is exactly one positive semidefinite matrix A with A * S * A = T; it is TauCeti.geometricMean S⁻¹ʳ T.

The standard positive matrix, its Hermitian symmetry, and its inverse #

The standard positive matrix. For a positive-definite S the matrix geometricMean S⁻¹ʳ T is the congruence (√S)⁻¹ * √(√S * T * √S) * (√S)⁻¹ of the positive square root of √S * T * √S by the inverse (√S)⁻¹ of the positive square root of S; when T is positive semidefinite it is the solution A of A * S * A = T.

theorem Matrix.isHermitian_geometricMean {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] [DecidableEq n] {a b : Matrix n n π•œ} :

The solution is Hermitian. The geometric mean √a * √(√a⁻¹ * b * √a⁻¹) * √a is a Hermitian matrix sandwiched between two copies of a Hermitian matrix: each square root is nonnegative, hence Hermitian. No positivity hypothesis is needed, so this is a statement about geometricMean a b for every a and b; in particular the solution A of A * S * A = T is Hermitian whenever S is positive definite and T is positive semidefinite.

theorem Matrix.PosDef.posDef_geometricMean_ringInverse {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] {S T : Matrix n n π•œ} [DecidableEq n] (hS : S.PosDef) (hT : T.PosDef) :

The standard positive matrix of two positive-definite matrices is positive definite: the geometric mean of a strictly positive and of a strictly positive element is strictly positive.

@[simp]
theorem Matrix.PosDef.mul_mul_conjTranspose_geometricMean {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] {S T : Matrix n n π•œ} [DecidableEq n] (hS : S.PosDef) (hT : T.PosSemidef) :

The congruence form. The solution A of A * S * A = T for positive-definite S and positive-semidefinite T is Hermitian by isHermitian_geometricMean, so it solves the congruence A * S * Aα΄΄ = T as well. This is the form in which a covariance matrix transforms under a change of variables; over the reals Aα΄΄ is the transpose Aα΅€.

theorem Matrix.PosDef.trace_geometricMean_ringInverse_mul {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] {S T : Matrix n n π•œ} [DecidableEq n] (hS : S.PosDef) :

An algebraic trace identity for geometricMean S⁻¹ʳ T. When T is positive semidefinite, the geometric mean is the standard positive solution and the right-hand side is the trace of the positive square root of the covariance sandwich.

The trace of the covariance transformed by 1 - A, for the standard positive solution A * S * A = T, is the Bures covariance expression.

@[simp]
theorem Matrix.PosDef.inv_geometricMean_ringInverse {n : Type u_1} {π•œ : Type u_2} [RCLike π•œ] [Fintype n] {S T : Matrix n n π•œ} [DecidableEq n] (hS : S.PosDef) (hT : T.PosDef) :

Reversing the equation inverts the solution. The solution of A * S * A = T, inverted, is the solution of B * T * B = S: the geometric mean commutes with inversion and is symmetric in its two arguments.