Skip to content

Commit c3b95a7

Browse files
committed
feat(LinearAlgebra/Matrix/PosDef): Matrix.PosSemidef.det_nonneg (#24725)
The determinant of a PSD matrix is nonnegative.
1 parent 6034096 commit c3b95a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Mathlib/LinearAlgebra/Matrix/PosDef.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ lemma eigenvalues_nonneg [DecidableEq n] {A : Matrix n n 𝕜}
171171
(hA : Matrix.PosSemidef A) (i : n) : 0 ≤ hA.1.eigenvalues i :=
172172
(hA.re_dotProduct_nonneg _).trans_eq (hA.1.eigenvalues_eq _).symm
173173

174+
theorem det_nonneg [DecidableEq n] {M : Matrix n n 𝕜} (hM : M.PosSemidef) :
175+
0 ≤ M.det := by
176+
rw [hM.isHermitian.det_eq_prod_eigenvalues]
177+
exact Finset.prod_nonneg fun i _ ↦ by simpa using hM.eigenvalues_nonneg i
178+
174179
section sqrt
175180

176181
variable [DecidableEq n] {A : Matrix n n 𝕜} (hA : PosSemidef A)

0 commit comments

Comments
 (0)