The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.PosDef
97 declarations. Mathlib docs · Source
Positive Definite Matrices
This file defines positive (semi)definite matrices and connects the notion to positive definiteness
of quadratic forms.
In Mathlib/Analysis/Matrix/Order.lean, positive semi-definiteness is used to define the partial
order on matrices on ℝ or ℂ.
Main definitions
Matrix.PosSemidef: a matrixM : Matrix n n Ris positive semidefinite if it is Hermitian andxᴴMxis nonnegative for allx.Matrix.PosDef: a matrixM : Matrix n n Ris positive definite if it is Hermitian andxᴴMxis greater than zero for all nonzerox.
Main results
Matrix.PosSemidef.dotProduct_mulVec_zero_iff: for a positive semi-definite matrixA, we havex⋆ A x = 0iffA x = 0.Matrix.PosSemidef.fromBlocks₁₁andMatrix.PosSemidef.fromBlocks₂₂: If a matrixAis positive definite, then[A B; Bᴴ D]is positive semidefinite if and only ifD - Bᴴ A⁻¹ Bis positive semidefinite.Matrix.PosDef.isUnit: A positive definite matrix in a field is invertible.
Positive semidefinite matrices
Positive definite matrices
Finite positive semidefinite matrices
Finite Positive definite matrices
def Matrix.PosSemidef E3 #
{n : Type u_2} → {R : Type u_3} → [inst : Ring R] → [PartialOrder R] → [StarRing R] → Matrix n n R → Prop
A matrix M : Matrix n n R is positive semidefinite if it is Hermitian and xᴴ * M * x is
nonnegative for all x of finite support.
theorem Matrix.PosSemidef.diagonal E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] {d : n → R}, 0 ≤ d → (Matrix.diagonal d).PosSemidef
theorem Matrix.posSemidef_diagonal_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] {d : n → R}, (Matrix.diagonal d).PosSemidef ↔ ∀ (i : n), 0 ≤ d i
A diagonal matrix is positive semidefinite iff its diagonal entries are nonnegative.
theorem Matrix.PosSemidef.isHermitian E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosSemidef → M.IsHermitian
theorem Matrix.PosSemidef.submatrix E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
{M : Matrix n n R}, M.PosSemidef → ∀ (e : m → n), (M.submatrix e e).PosSemidef
theorem Matrix.PosSemidef.transpose E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
{M : Matrix n n R'}, M.PosSemidef → M.transpose.PosSemidef
theorem Matrix.posSemidef_transpose_iff E0 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
{M : Matrix n n R'}, M.transpose.PosSemidef ↔ M.PosSemidef
theorem Matrix.PosSemidef.conjTranspose E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosSemidef → M.conjTranspose.PosSemidef
theorem Matrix.posSemidef_conjTranspose_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.conjTranspose.PosSemidef ↔ M.PosSemidef
theorem Matrix.PosSemidef.add E1 #
∀ {m : Type u_1} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [AddLeftMono R]
{A B : Matrix m m R}, A.PosSemidef → B.PosSemidef → (A + B).PosSemidef
theorem Matrix.PosSemidef.smul E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {α : Type u_5}
[inst_3 : CommSemiring α] [inst_4 : PartialOrder α] [inst_5 : StarRing α] [StarOrderedRing α] [inst_7 : Algebra α R]
[StarModule α R] [PosSMulMono α R] {x : Matrix n n R}, x.PosSemidef → ∀ {a : α}, 0 ≤ a → (a • x).PosSemidef
theorem Matrix.PosSemidef.zero E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R], Matrix.PosSemidef 0
theorem Matrix.PosSemidef.one E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n], Matrix.PosSemidef 1
theorem Matrix.PosSemidef.natCast E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] (d : ℕ), (↑d).PosSemidef
theorem Matrix.PosSemidef.ofNat E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] (d : ℕ) [inst_5 : d.AtLeastTwo], (OfNat.ofNat d).PosSemidef
theorem Matrix.PosSemidef.intCast E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] (d : ℤ), 0 ≤ d → (↑d).PosSemidef
theorem Matrix.posSemidef_intCast_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [Nonempty n] [Nontrivial R] (d : ℤ), (↑d).PosSemidef ↔ 0 ≤ d
theorem Matrix.PosSemidef.diag_nonneg E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {A : Matrix n n R},
A.PosSemidef → ∀ {i : n}, 0 ≤ A i i
def Matrix.PosSemidef.addSubmonoid E1 #
(n : Type u_2) →
(R : Type u_3) →
[inst : Ring R] → [inst_1 : PartialOrder R] → [StarRing R] → [AddLeftMono R] → AddSubmonoid (Matrix n n R)
The set of matrices that are positive semidefinite form an additive submonoid.
theorem Matrix.PosSemidef.coe_addSubmonoid E0 #
∀ (n : Type u_2) (R : Type u_3) [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : AddLeftMono R], ↑(Matrix.PosSemidef.addSubmonoid n R) = Set.ofPred Matrix.PosSemidef
theorem Matrix.PosSemidef.mem_addSubmonoid E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : AddLeftMono R]
{A : Matrix n n R}, A ∈ Matrix.PosSemidef.addSubmonoid n R ↔ A.PosSemidef
theorem Matrix.posSemidef_submatrix_equiv E0 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
{M : Matrix n n R} (e : m ≃ n), (M.submatrix ⇑e ⇑e).PosSemidef ↔ M.PosSemidef
theorem Matrix.posSemidef_sum E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {ι : Type u_5}
[AddLeftMono R] {x : ι → Matrix n n R} (s : Finset ι), (∀ i ∈ s, (x i).PosSemidef) → (∑ i ∈ s, x i).PosSemidef
def Matrix.PosDef E3 #
{n : Type u_2} → {R : Type u_3} → [inst : Ring R] → [PartialOrder R] → [StarRing R] → Matrix n n R → Prop
A matrix M : Matrix n n R is positive definite if it is Hermitian
and xᴴMx is greater than zero for all nonzero x.
theorem Matrix.PosDef.isHermitian E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosDef → M.IsHermitian
theorem Matrix.PosDef.posSemidef E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosDef → M.PosSemidef
theorem Matrix.PosDef.submatrix E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
{M : Matrix n n R}, M.PosDef → ∀ {e : m → n}, Function.Injective e → (M.submatrix e e).PosDef
theorem Matrix.PosDef.transpose E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
{M : Matrix n n R'}, M.PosDef → M.transpose.PosDef
theorem Matrix.PosDef.transpose_iff E0 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
{M : Matrix n n R'}, M.transpose.PosDef ↔ M.PosDef
theorem Matrix.PosDef.diagonal E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] {d : n → R}, (∀ (i : n), 0 < d i) → (Matrix.diagonal d).PosDef
theorem Matrix.posDef_diagonal_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] [Nontrivial R] {d : n → R},
(Matrix.diagonal d).PosDef ↔ ∀ (i : n), 0 < d i
theorem Matrix.PosDef.of_subsingleton E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R],
Subsingleton R → ∀ (M : Matrix n n R), M.PosDef
theorem Matrix.PosDef.one E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [IsProperStar R], Matrix.PosDef 1
theorem Matrix.PosDef.natCast E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] (d : ℕ), d ≠ 0 → (↑d).PosDef
theorem Matrix.posDef_natCast_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] [Nonempty n] [Nontrivial R] {d : ℕ}, (↑d).PosDef ↔ 0 < d
theorem Matrix.PosDef.ofNat E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] (d : ℕ) [inst_6 : d.AtLeastTwo], (OfNat.ofNat d).PosDef
theorem Matrix.PosDef.intCast E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] (d : ℤ), 0 < d → (↑d).PosDef
theorem Matrix.posDef_intCast_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
[inst_4 : DecidableEq n] [NoZeroDivisors R] [Nonempty n] [Nontrivial R] {d : ℤ}, (↑d).PosDef ↔ 0 < d
theorem Matrix.PosDef.add_posSemidef E1 #
∀ {m : Type u_1} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [AddLeftMono R]
{A B : Matrix m m R}, A.PosDef → B.PosSemidef → (A + B).PosDef
theorem Matrix.PosDef.posSemidef_add E1 #
∀ {m : Type u_1} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [AddLeftMono R]
{A B : Matrix m m R}, A.PosSemidef → B.PosDef → (A + B).PosDef
theorem Matrix.PosDef.add E1 #
∀ {m : Type u_1} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [AddLeftMono R]
{A B : Matrix m m R}, A.PosDef → B.PosDef → (A + B).PosDef
theorem Matrix.posDef_sum E1 #
∀ {m : Type u_1} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {ι : Type u_5}
[AddLeftMono R] {A : ι → Matrix m m R} {s : Finset ι}, s.Nonempty → (∀ i ∈ s, (A i).PosDef) → (∑ i ∈ s, A i).PosDef
theorem Matrix.PosDef.smul E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {α : Type u_5}
[inst_3 : CommSemiring α] [inst_4 : PartialOrder α] [inst_5 : StarRing α] [StarOrderedRing α] [inst_7 : Algebra α R]
[StarModule α R] [PosSMulStrictMono α R] {x : Matrix n n R}, x.PosDef → ∀ {a : α}, 0 < a → (a • x).PosDef
theorem Matrix.PosDef.conjTranspose E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosDef → M.conjTranspose.PosDef
theorem Matrix.posDef_conjTranspose_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.conjTranspose.PosDef ↔ M.PosDef
theorem Matrix.PosDef.diag_pos E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [Nontrivial R]
{A : Matrix n n R}, A.PosDef → ∀ {i : n}, 0 < A i i
theorem Matrix.posSemidef_iff_dotProduct_mulVec E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.PosSemidef ↔ M.IsHermitian ∧ ∀ (x : n → R), 0 ≤ star x ⬝ᵥ M.mulVec x
A finite matrix M : Matrix n n R is positive semidefinite iff it is
Hermitian and xᴴ * M * x is nonnegative for all x.
theorem Matrix.PosSemidef.dotProduct_mulVec_nonneg E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.PosSemidef → ∀ (x : n → R), 0 ≤ star x ⬝ᵥ M.mulVec x
theorem Matrix.PosSemidef.of_dotProduct_mulVec_nonneg E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.IsHermitian → (∀ (x : n → R), 0 ≤ star x ⬝ᵥ M.mulVec x) → M.PosSemidef
theorem Matrix.posSemidef_iff_submatrix_finset E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosSemidef ↔ ∀ (s : Finset n), (M.submatrix Subtype.val Subtype.val).PosSemidef
A matrix M : Matrix n n R is positive semidefinite iff every finite principal submatrix is
positive semidefinite.
theorem Matrix.posSemidef_iff_submatrix_of_forall_finset E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {ι : Type u_5}
{κ : ι → Type u_6} (f : (i : ι) → κ i → n),
(∀ (s : Finset n), ∃ i, ↑s ⊆ Set.range (f i)) →
∀ {M : Matrix n n R}, M.PosSemidef ↔ ∀ (i : ι), (M.submatrix (f i) (f i)).PosSemidef
A matrix M : Matrix n n R is positive semidefinite iff M.submatrix (f i) (f i) is positive
semidefinite for a family of maps f whose ranges cover every finite subset of n.
theorem Matrix.PosSemidef.conjTranspose_mul_mul_same E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] {A : Matrix n n R}, A.PosSemidef → ∀ (B : Matrix n m R), (B.conjTranspose * A * B).PosSemidef
theorem Matrix.PosSemidef.mul_mul_conjTranspose_same E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] {A : Matrix n n R}, A.PosSemidef → ∀ (B : Matrix m n R), (B * A * B.conjTranspose).PosSemidef
theorem Matrix.PosSemidef.pow E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[StarOrderedRing R] [inst_5 : DecidableEq n] {M : Matrix n n R}, M.PosSemidef → ∀ (k : ℕ), (M ^ k).PosSemidef
theorem Matrix.PosSemidef.inv E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [inst_4 : DecidableEq n] {M : Matrix n n R'}, M.PosSemidef → M⁻¹.PosSemidef
theorem Matrix.PosSemidef.zpow E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [inst_5 : DecidableEq n] {M : Matrix n n R'},
M.PosSemidef → ∀ (z : ℤ), (M ^ z).PosSemidef
theorem Matrix.PosSemidef.trace_nonneg E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[AddLeftMono R] {A : Matrix n n R}, A.PosSemidef → 0 ≤ A.trace
theorem Matrix.PosSemidef.dotProduct_mulVec_zero_iff E3 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [IsProperStar R'] {A : Matrix n n R'},
A.PosSemidef → ∀ {x : n → R'}, star x ⬝ᵥ A.mulVec x = 0 ↔ A.mulVec x = 0
For A positive semidefinite, we have x⋆ A x = 0 iff A x = 0.
theorem Matrix.PosSemidef.toLinearMap₂'_zero_iff E0 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [IsProperStar R'] [inst_6 : DecidableEq n] {A : Matrix n n R'},
A.PosSemidef → ∀ {x : n → R'}, (((Matrix.toLinearMap₂' R') A) (star x)) x = 0 ↔ A.mulVec x = 0
For A positive semidefinite, we have x⋆ A x = 0 iff A x = 0 (linear maps version).
theorem Matrix.posSemidef_conjTranspose_mul_self E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype m] [StarOrderedRing R] (A : Matrix m n R), (A.conjTranspose * A).PosSemidef
The conjugate transpose of a matrix multiplied by the matrix is positive semidefinite
theorem Matrix.posSemidef_self_mul_conjTranspose E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] [StarOrderedRing R] (A : Matrix m n R), (A * A.conjTranspose).PosSemidef
A matrix multiplied by its conjugate transpose is positive semidefinite
theorem Matrix.trace_conjTranspose_mul_self_eq_zero_iff E0 #
∀ {m : Type u_1} {n : Type u_2} [inst : Fintype n] [inst_1 : Fintype m] {R : Type u_5} [inst_2 : PartialOrder R]
[inst_3 : NonUnitalRing R] [inst_4 : StarRing R] [StarOrderedRing R] [IsProperStar R] {A : Matrix m n R},
(A.conjTranspose * A).trace = 0 ↔ A = 0
theorem Matrix.trace_mul_conjTranspose_self_eq_zero_iff E0 #
∀ {m : Type u_1} {n : Type u_2} [inst : Fintype n] [inst_1 : Fintype m] {R : Type u_5} [inst_2 : PartialOrder R]
[inst_3 : NonUnitalRing R] [inst_4 : StarRing R] [StarOrderedRing R] [IsProperStar R] {A : Matrix m n R},
(A * A.conjTranspose).trace = 0 ↔ A = 0
theorem Matrix.IsUnit.posSemidef_star_left_conjugate_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[inst_4 : DecidableEq n] {U x : Matrix n n R}, IsUnit U → ((star U * x * U).PosSemidef ↔ x.PosSemidef)
For an invertible matrix U, star U * x * U is positive semi-definite iff x is.
This works on any ⋆-ring with a partial order.
See IsUnit.star_left_conjugate_nonneg_iff for a similar statement for star-ordered rings.
theorem Matrix.IsUnit.posSemidef_star_right_conjugate_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[inst_4 : DecidableEq n] {U x : Matrix n n R}, IsUnit U → ((U * x * star U).PosSemidef ↔ x.PosSemidef)
For an invertible matrix U, U * x * star U is positive semi-definite iff x is.
This works on any ⋆-ring with a partial order.
See IsUnit.star_right_conjugate_nonneg_iff for a similar statement for star-ordered rings.
theorem Matrix.posSemidef_vecMulVec_self_star E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
(a : n → R), (Matrix.vecMulVec a (star a)).PosSemidef
The matrix vecMulVec a (star a) is always positive semi-definite.
theorem Matrix.posSemidef_vecMulVec_star_self E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [StarOrderedRing R]
(a : n → R), (Matrix.vecMulVec (star a) a).PosSemidef
The matrix vecMulVec (star a) a is always positive semi-definite.
theorem Matrix.posDef_iff_dotProduct_mulVec E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.PosDef ↔ M.IsHermitian ∧ ∀ ⦃x : n → R⦄, x ≠ 0 → 0 < star x ⬝ᵥ M.mulVec x
theorem Matrix.PosDef.dotProduct_mulVec_pos E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.PosDef → ∀ {x : n → R}, x ≠ 0 → 0 < star x ⬝ᵥ M.mulVec x
A matrix M : Matrix n n R is positive definite if it is Hermitian
and xᴴMx is greater than zero for all nonzero x.
theorem Matrix.PosDef.of_dotProduct_mulVec_pos E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.IsHermitian → (∀ ⦃x : n → R⦄, x ≠ 0 → 0 < star x ⬝ᵥ M.mulVec x) → M.PosDef
theorem Matrix.posDef_iff_submatrix_finset E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {M : Matrix n n R},
M.PosDef ↔ ∀ (s : Finset n), (M.submatrix Subtype.val Subtype.val).PosDef
A matrix M : Matrix n n R is positive definite iff every finite principal submatrix is
positive definite.
theorem Matrix.posDef_iff_submatrix_of_forall_finset E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] {ι : Type u_5}
{κ : ι → Type u_6} (f : (i : ι) → κ i → n),
(∀ (i : ι), Function.Injective (f i)) →
(∀ (s : Finset n), ∃ i, ↑s ⊆ Set.range (f i)) →
∀ {M : Matrix n n R}, M.PosDef ↔ ∀ (i : ι), (M.submatrix (f i) (f i)).PosDef
A matrix M : Matrix n n R is positive definite iff M.submatrix (f i) (f i) is positive
definite for a family of injective maps f whose ranges cover every finite subset of n.
theorem Matrix.PosDef.conjTranspose_mul_mul_same E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] [inst_4 : Fintype m] {A : Matrix n n R} {B : Matrix n m R},
A.PosDef → Function.Injective B.mulVec → (B.conjTranspose * A * B).PosDef
theorem Matrix.PosDef.mul_mul_conjTranspose_same E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] [inst_4 : Fintype m] {A : Matrix n n R} {B : Matrix m n R},
A.PosDef → (Function.Injective fun v ↦ Matrix.vecMul v B) → (B * A * B.conjTranspose).PosDef
theorem Matrix.PosDef.conjTranspose_mul_self E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] [inst_4 : Fintype m] [StarOrderedRing R] [IsProperStar R] (A : Matrix m n R),
Function.Injective A.mulVec → (A.conjTranspose * A).PosDef
theorem Matrix.PosDef.mul_conjTranspose_self E1 #
∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R]
[inst_3 : Fintype n] [inst_4 : Fintype m] [StarOrderedRing R] [IsProperStar R] (A : Matrix m n R),
(Function.Injective fun v ↦ Matrix.vecMul v A) → (A * A.conjTranspose).PosDef
theorem Matrix.PosDef.mulVec_injective E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
{M : Matrix n n R}, M.PosDef → Function.Injective M.mulVec
theorem Matrix.posDef_iff_posSemidef_and_mulVec_injective E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [IsProperStar R'] {A : Matrix n n R'},
A.PosDef ↔ A.PosSemidef ∧ Function.Injective A.mulVec
theorem Matrix.PosSemidef.posDef_iff_mulVec_injective E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [IsProperStar R'] {A : Matrix n n R'},
A.PosSemidef → (A.PosDef ↔ Function.Injective A.mulVec)
theorem Matrix.PosDef.of_toQuadraticForm' E1 #
∀ {n : Type u_2} [inst : Fintype n] {R : Type u_5} [inst_1 : CommRing R] [inst_2 : PartialOrder R] [inst_3 : StarRing R]
[TrivialStar R] [inst_5 : DecidableEq n] {M : Matrix n n R},
M.IsSymm → QuadraticMap.PosDef M.toQuadraticForm' → M.PosDef
theorem Matrix.PosDef.toQuadraticForm' E1 #
∀ {n : Type u_2} [inst : Fintype n] {R : Type u_5} [inst_1 : CommRing R] [inst_2 : PartialOrder R] [inst_3 : StarRing R]
[TrivialStar R] [inst_5 : DecidableEq n] {M : Matrix n n R}, M.PosDef → QuadraticMap.PosDef M.toQuadraticForm'
theorem LinearMap.BilinForm.posDef_toQuadraticMap_iff_matrix E1 #
∀ {n : Type u_2} [inst : Fintype n] {R : Type u_5} {M : Type u_6} [inst_1 : CommRing R] [inst_2 : PartialOrder R]
[inst_3 : StarRing R] [TrivialStar R] [inst_5 : AddCommGroup M] [inst_6 : Module R M] [inst_7 : DecidableEq n]
(b : Module.Basis n R M) (B : LinearMap.BilinForm R M),
B.IsSymm → ((LinearMap.BilinMap.toQuadraticMap B).PosDef ↔ ((LinearMap.BilinForm.toMatrix b) B).PosDef)
See also LinearMap.isPosSemidef_iff_posSemidef_toMatrix for the semi-definite case.
theorem Matrix.PosDef.trace_pos E1 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[Nontrivial R] [IsOrderedCancelAddMonoid R] [Nonempty n] {A : Matrix n n R}, A.PosDef → 0 < A.trace
theorem Matrix.PosDef.det_pos E1 #
∀ {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [inst_4 : DecidableEq n] [Nontrivial R'] [IsOrderedRing R'] [PosMulReflectLT R']
{A : Matrix n n R'}, A.PosDef → 0 < A.det
theorem Matrix.PosDef.isUnit E3 #
∀ {n : Type u_2} [inst : Fintype n] {K : Type u_5} [inst_1 : Field K] [inst_2 : PartialOrder K] [inst_3 : StarRing K]
[inst_4 : DecidableEq n] {M : Matrix n n K}, M.PosDef → IsUnit M
theorem Matrix.PosDef.inv E1 #
∀ {n : Type u_2} [inst : Fintype n] {K : Type u_5} [inst_1 : Field K] [inst_2 : PartialOrder K] [inst_3 : StarRing K]
[inst_4 : DecidableEq n] {M : Matrix n n K}, M.PosDef → M⁻¹.PosDef
theorem Matrix.posDef_inv_iff E0 #
∀ {n : Type u_2} [inst : Fintype n] {K : Type u_5} [inst_1 : Field K] [inst_2 : PartialOrder K] [inst_3 : StarRing K]
[inst_4 : DecidableEq n] {M : Matrix n n K}, M⁻¹.PosDef ↔ M.PosDef
theorem Matrix.PosSemidef.posDef_iff_isUnit E1 #
∀ {n : Type u_2} [inst : Fintype n] {K : Type u_5} [inst_1 : Field K] [inst_2 : PartialOrder K] [inst_3 : StarRing K]
[inst_4 : DecidableEq n] [StarOrderedRing K] {A : Matrix n n K}, A.PosSemidef → (A.PosDef ↔ IsUnit A)
A positive semi-definite matrix is positive definite if and only if it is invertible.
theorem Matrix.PosSemidef.posDef_iff_det_ne_zero E1 #
∀ {n : Type u_2} [inst : Fintype n] {K : Type u_5} [inst_1 : Field K] [inst_2 : PartialOrder K] [inst_3 : StarRing K]
[inst_4 : DecidableEq n] [StarOrderedRing K] {A : Matrix n n K}, A.PosSemidef → (A.PosDef ↔ A.det ≠ 0)
theorem Matrix.IsUnit.posDef_star_left_conjugate_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[inst_4 : DecidableEq n] {x U : Matrix n n R}, IsUnit U → ((star U * x * U).PosDef ↔ x.PosDef)
For an invertible matrix U, star U * x * U is positive definite iff x is.
This works on any ⋆-ring with a partial order.
See IsUnit.isStrictlyPositive_star_left_conjugate_iff' for a similar statement for star-ordered
rings. For matrices, positive definiteness is equivalent to strict positivity when the underlying
field is ℝ or ℂ (see Matrix.isStrictlyPositive_iff_posDef).
theorem Matrix.IsUnit.posDef_star_right_conjugate_iff E0 #
∀ {n : Type u_2} {R : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : StarRing R] [inst_3 : Fintype n]
[inst_4 : DecidableEq n] {x U : Matrix n n R}, IsUnit U → ((U * x * star U).PosDef ↔ x.PosDef)
For an invertible matrix U, U * x * star U is positive definite iff x is.
This works on any ⋆-ring with a partial order.
See IsUnit.isStrictlyPositive_star_right_conjugate_iff for a similar statement for star-ordered
rings. For matrices, positive definiteness is equivalent to strict positivity when the underlying
field is ℝ or ℂ (see Matrix.isStrictlyPositive_iff_posDef).
theorem Matrix.PosDef.fromBlocks₁₁ E1 #
∀ {m : Type u_1} {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype m] [StarOrderedRing R'] [inst_5 : DecidableEq m] {A : Matrix m m R'} (B : Matrix m n R')
(D : Matrix n n R'),
A.PosDef →
∀ [Invertible A], (Matrix.fromBlocks A B B.conjTranspose D).PosSemidef ↔ (D - B.conjTranspose * A⁻¹ * B).PosSemidef
theorem Matrix.PosDef.fromBlocks₂₂ E1 #
∀ {m : Type u_1} {n : Type u_2} {R' : Type u_4} [inst : CommRing R'] [inst_1 : PartialOrder R'] [inst_2 : StarRing R']
[inst_3 : Fintype n] [StarOrderedRing R'] [inst_5 : DecidableEq n] (A : Matrix m m R') (B : Matrix m n R')
{D : Matrix n n R'},
D.PosDef →
∀ [Invertible D], (Matrix.fromBlocks A B B.conjTranspose D).PosSemidef ↔ (A - B * D⁻¹ * B.conjTranspose).PosSemidef
theorem Matrix.PosDef.star_dotProduct_mulVec_mul_le E2 #
∀ {n : Type u_2} [inst : Fintype n] {R : Type u_5} [inst_1 : CommRing R] [inst_2 : PartialOrder R] [inst_3 : StarRing R]
[IsOrderedRing R] [PosMulReflectLE R] {A : Matrix n n R},
A.PosDef →
∀ (x y : n → R), star (star x ⬝ᵥ A.mulVec y) * star x ⬝ᵥ A.mulVec y ≤ star x ⬝ᵥ A.mulVec x * star y ⬝ᵥ A.mulVec y
The Cauchy-Schwarz inequality for a positive definite matrix.
theorem Matrix.PosDef.finite_setOfPred_dotProduct_mulVec_le E1 #
∀ {n : Type u_2} [inst : Fintype n] {A : Matrix n n ℤ}, A.PosDef → ∀ (r : ℤ), {v | v ⬝ᵥ A.mulVec v ≤ r}.Finite
theorem QuadraticForm.posDef_of_toMatrix' E1 #
∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {Q : QuadraticForm ℝ (n → ℝ)},
Q.toMatrix'.PosDef → QuadraticMap.PosDef Q
theorem QuadraticForm.posDef_toMatrix' E1 #
∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {Q : QuadraticForm ℝ (n → ℝ)},
QuadraticMap.PosDef Q → Q.toMatrix'.PosDef