Documentation

Mathlib.LinearAlgebra.Matrix.PosDef

Positive Definite Matrices #

This file defines positive (semi)definite matrices and connects the notion to positive definiteness of quadratic forms. Most results require π•œ = ℝ or β„‚.

Main definitions #

##Β Main results

Positive semidefinite matrices #

def Matrix.PosSemidef {n : Type u_2} {R : Type u_3} [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] (M : Matrix n n R) :

A matrix M : Matrix n n R is positive semidefinite if it is Hermitian and xα΄΄ * M * x is nonnegative for all x.

Equations
Instances For
    theorem Matrix.posSemidef_diagonal_iff {n : Type u_2} {R : Type u_3} [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] [DecidableEq n] {d : n β†’ R} :

    A diagonal matrix is positive semidefinite iff its diagonal entries are nonnegative.

    theorem Matrix.PosSemidef.re_dotProduct_nonneg {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] {M : Matrix n n π•œ} (hM : Matrix.PosSemidef M) (x : n β†’ π•œ) :
    theorem Matrix.PosSemidef.submatrix {m : Type u_1} {n : Type u_2} {R : Type u_3} [Fintype m] [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] {M : Matrix n n R} (hM : Matrix.PosSemidef M) (e : m β†’ n) :
    theorem Matrix.PosSemidef.pow {n : Type u_2} {R : Type u_3} [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] [DecidableEq n] {M : Matrix n n R} (hM : Matrix.PosSemidef M) (k : β„•) :
    theorem Matrix.PosSemidef.zpow {n : Type u_2} {R : Type u_3} [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] [DecidableEq n] {M : Matrix n n R} (hM : Matrix.PosSemidef M) (z : β„€) :
    theorem Matrix.PosSemidef.eigenvalues_nonneg {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) (i : n) :

    The eigenvalues of a positive semi-definite matrix are non-negative

    noncomputable def Matrix.PosSemidef.sqrt {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) :
    Matrix n n π•œ

    The positive semidefinite square root of a positive semidefinite matrix

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Custom elaborator to produce output like (_ : PosSemidef A).sqrt in the goal view.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Matrix.PosSemidef.posSemidef_sqrt {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) :
        @[simp]
        theorem Matrix.PosSemidef.sq_sqrt {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) :
        hA.sqrt ^ 2 = A
        @[simp]
        theorem Matrix.PosSemidef.sqrt_mul_self {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) :
        hA.sqrt * hA.sqrt = A
        theorem Matrix.PosSemidef.eq_of_sq_eq_sq {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) {B : Matrix n n π•œ} (hB : Matrix.PosSemidef B) (hAB : A ^ 2 = B ^ 2) :
        A = B
        theorem Matrix.PosSemidef.sqrt_sq {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) :
        (_ : Matrix.PosSemidef (A ^ 2)).sqrt = A
        theorem Matrix.PosSemidef.eq_sqrt_of_sq_eq {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) {B : Matrix n n π•œ} (hB : Matrix.PosSemidef B) (hAB : A ^ 2 = B) :
        A = hB.sqrt
        @[simp]
        theorem Matrix.posSemidef_submatrix_equiv {m : Type u_1} {n : Type u_2} {R : Type u_3} [Fintype m] [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] {M : Matrix n n R} (e : m ≃ n) :

        The conjugate transpose of a matrix mulitplied by the matrix is positive semidefinite

        A matrix multiplied by its conjugate transpose is positive semidefinite

        theorem Matrix.eigenvalues_conjTranspose_mul_self_nonneg {m : Type u_1} {n : Type u_2} {π•œ : Type u_4} [Fintype m] [Fintype n] [IsROrC π•œ] (A : Matrix m n π•œ) [DecidableEq n] (i : n) :
        theorem Matrix.eigenvalues_self_mul_conjTranspose_nonneg {m : Type u_1} {n : Type u_2} {π•œ : Type u_4} [Fintype m] [Fintype n] [IsROrC π•œ] (A : Matrix m n π•œ) [DecidableEq m] (i : m) :
        theorem Matrix.posSemidef_iff_eq_transpose_mul_self {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] {A : Matrix n n π•œ} :
        Matrix.PosSemidef A ↔ βˆƒ (B : Matrix n n π•œ), A = Matrix.conjTranspose B * B

        A matrix is positive semidefinite if and only if it has the form Bα΄΄ * B for some B.

        theorem Matrix.IsHermitian.posSemidef_of_eigenvalues_nonneg {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.IsHermitian A) (h : βˆ€ (i : n), 0 ≀ Matrix.IsHermitian.eigenvalues hA i) :
        theorem Matrix.PosSemidef.dotProduct_mulVec_zero_iff {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) (x : n β†’ π•œ) :

        For A positive semidefinite, we have x⋆ A x = 0 iff A x = 0.

        theorem Matrix.PosSemidef.toLinearMapβ‚‚'_zero_iff {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosSemidef A) (x : n β†’ π•œ) :
        ((Matrix.toLinearMapβ‚‚' A) (star x)) x = 0 ↔ (Matrix.toLin' A) x = 0

        For A positive semidefinite, we have x⋆ A x = 0 iff A x = 0 (linear maps version).

        Positive definite matrices #

        def Matrix.PosDef {n : Type u_2} {R : Type u_3} [Fintype n] [CommRing R] [PartialOrder R] [StarOrderedRing R] (M : Matrix n n R) :

        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.

        Equations
        Instances For
          theorem Matrix.PosDef.re_dotProduct_pos {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] {M : Matrix n n π•œ} (hM : Matrix.PosDef M) {x : n β†’ π•œ} (hx : x β‰  0) :
          0 < IsROrC.re (Matrix.dotProduct (star x) (Matrix.mulVec M x))
          theorem Matrix.PosDef.eigenvalues_pos {n : Type u_2} {π•œ : Type u_4} [Fintype n] [IsROrC π•œ] [DecidableEq n] {A : Matrix n n π•œ} (hA : Matrix.PosDef A) (i : n) :

          The eigenvalues of a positive definite matrix are positive

          theorem Matrix.PosDef.det_pos {n : Type u_2} [Fintype n] [DecidableEq n] {M : Matrix n n ℝ} (hM : Matrix.PosDef M) :
          @[reducible]
          noncomputable def Matrix.NormedAddCommGroup.ofMatrix {π•œ : Type u_1} [IsROrC π•œ] {n : Type u_2} [Fintype n] {M : Matrix n n π•œ} (hM : Matrix.PosDef M) :
          NormedAddCommGroup (n β†’ π•œ)

          A positive definite matrix M induces a norm β€–xβ€– = sqrt (re xα΄΄Mx).

          Equations
          Instances For
            def Matrix.InnerProductSpace.ofMatrix {π•œ : Type u_1} [IsROrC π•œ] {n : Type u_2} [Fintype n] {M : Matrix n n π•œ} (hM : Matrix.PosDef M) :
            InnerProductSpace π•œ (n β†’ π•œ)

            A positive definite matrix M induces an inner product βŸͺx, y⟫ = xα΄΄My.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For