Sandwiches by the square root of a positive-semidefinite matrix #
The continuous-functional-calculus square root CFC.sqrt S of a matrix S is positive
semidefinite (CFC.sqrt_nonneg), hence Hermitian. Sandwiching a Hermitian matrix Θ between
two copies of it gives the Hermitian matrix CFC.sqrt S * Θ * CFC.sqrt S, whose quadratic form
is the pullback of the quadratic form of Θ along CFC.sqrt S. For positive-semidefinite S,
its pencils 1 - c • (CFC.sqrt S * Θ * CFC.sqrt S) have the same determinant as those of
Θ * S, by Sylvester's determinant identity and CFC.sqrt S * CFC.sqrt S = S; by cyclicity, the
sandwich and its square also have the same traces as Θ * S and Θ * S * Θ * S.
Over the reals the square root is symmetric, so for a positive-definite T the identity
CFC.sqrt T * CFC.sqrt T = T exhibits T as C * Cᵀ with C invertible.
The sandwich is the matrix whose eigenvalues govern the exponential moments of a Gaussian quadratic form, and the determinant identity is what turns its spectral formula into a formula in the original parameters.
When S is positive definite the same pencil has a scale form: for any X, the matrix S⁻¹ - X
is the congruence of 1 - CFC.sqrt S * X * CFC.sqrt S by (CFC.sqrt S)⁻¹, so the two are positive
definite together. Taking X to be a scaled matrix c • Θ gives the form that appears in an
exponential weight exp (-trace ((S⁻¹ - c • Θ) * A) / 2), where S is a scale matrix and c • Θ
the tilt of a trace statistic. Its determinant needs no positivity at all, and is computed over a
commutative ring in TauCeti/LinearAlgebra/Matrix/InvSub.lean.
Main results #
Matrix.isHermitian_sqrt_mul_mul_sqrt— the sandwich of a Hermitian matrix by a square root is Hermitian;Matrix.PosSemidef.rank_sqrt— the square root of a positive-semidefinite matrix has the same rank;Matrix.inner_toEuclideanCLM_sqrt_toEuclideanLin— the quadratic form ofΘatCFC.sqrt S xis the quadratic form of the sandwich atx;Matrix.PosSemidef.det_one_sub_smul_sqrt_mul_mul_sqrt_eq_det_one_sub_smul_mul— for positive-semidefiniteS, the pencil determinants of the sandwich and ofΘ * Sagree;Matrix.PosSemidef.trace_sqrt_mul_mul_sqrtandMatrix.PosSemidef.trace_sqrt_mul_mul_sqrt_mul_self— for positive-semidefiniteS, the traces of the sandwich and of its square are those ofΘ * SandΘ * S * Θ * S;Matrix.PosDef.inv_sub_eq_conjugateandMatrix.PosDef.posDef_inv_sub_iff— the scale formS⁻¹ - Xof the pencil and its positive-definiteness;Matrix.PosDef.inv_sub_smul_eq_conjugateandMatrix.PosDef.posDef_inv_sub_smul_iff— the same two statements for a scaled perturbationc • Θ;Matrix.PosDef.exists_generalLinearGroup_mul_transpose_eq— every positive-definite real matrix isC * Cᵀfor an invertibleC.
Sandwiching a Hermitian matrix between two copies of a square root gives a Hermitian matrix.
The quadratic form of Θ at CFC.sqrt S x is the quadratic form of the sandwich
CFC.sqrt S * Θ * CFC.sqrt S at x.
For positive-semidefinite S, the pencils of the sandwich CFC.sqrt S * Θ * CFC.sqrt S and
of the product Θ * S have the same determinant.
For positive-semidefinite S, the trace of the sandwich CFC.sqrt S * M * CFC.sqrt S is the
trace of M * S.
For positive-semidefinite S, the trace of the square of the sandwich
CFC.sqrt S * M * CFC.sqrt S is the trace of M * S * M * S.
The scale form of the pencil #
The scale form of the pencil. For positive-definite S and any X, the matrix S⁻¹ - X
is the congruence of the sandwich pencil 1 - CFC.sqrt S * X * CFC.sqrt S by (CFC.sqrt S)⁻¹.
The scale pencil S⁻¹ - X is positive definite exactly when the sandwich pencil
1 - CFC.sqrt S * X * CFC.sqrt S is. X needs no hypothesis: congruence by the invertible
Hermitian matrix (CFC.sqrt S)⁻¹ transports positive definiteness in both directions.
The scale form of the pencil, for a scaled perturbation: S⁻¹ - c • Θ is the congruence of
1 - c • (CFC.sqrt S * Θ * CFC.sqrt S) by (CFC.sqrt S)⁻¹.
The scale pencil S⁻¹ - c • Θ is positive definite exactly when the sandwich pencil
1 - c • (CFC.sqrt S * Θ * CFC.sqrt S) is. Neither Θ nor c needs a hypothesis.
The square-root factorization over the reals #
Every positive-definite real matrix is C * Cᵀ for an invertible C, namely its square
root, which is symmetric. Congruence by that C is what absorbs a positive-definite scale
matrix into the positive-definite cone.