Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.PosSemidefTrace

Traces of products of positive semidefinite matrices #

The product of positive semidefinite matrices need not be positive semidefinite, but its trace is nonnegative. Factor one matrix as Cᴴ C and rotate the trace to the positive sandwich C A Cᴴ. For complex matrices, nonnegativity in ComplexOrder also asserts that the imaginary part is zero.

Main results #

theorem Matrix.PosSemidef.trace_mul_nonneg {ι : Type u_1} {𝕜 : Type u_2} [Fintype ι] [RCLike 𝕜] {A B : Matrix ι ι 𝕜} (hA : A.PosSemidef) (hB : B.PosSemidef) :
0 ≤ (A * B).trace

The trace of the product of two positive semidefinite matrices is nonnegative.

theorem Matrix.PosSemidef.trace_mul_eq_zero_iff {ι : Type u_1} {𝕜 : Type u_2} [Fintype ι] [RCLike 𝕜] {A B : Matrix ι ι 𝕜} (hA : A.PosSemidef) (hB : B.PosSemidef) :
(A * B).trace = 0 ↔ A * B = 0

Two positive semidefinite matrices have zero product exactly when it has zero trace.