The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.Hermitian
66 declarations. Mathlib docs · Source
Hermitian matrices
This file defines Hermitian matrices and some basic results about them.
See also IsSelfAdjoint, which generalizes this definition to other star rings.
Main definition
Matrix.IsHermitian: a matrixA : Matrix n n αis Hermitian ifAᴴ = A.
Tags
self-adjoint matrix, hermitian matrix
def Matrix.IsHermitian E3 #
{α : Type u_1} → {n : Type u_4} → [Star α] → Matrix n n α → Prop
A matrix is Hermitian if it is equal to its conjugate transpose. On the reals, this definition captures symmetric matrices.
instance Matrix.instDecidableIsHermitianOfEqConjTranspose E0 #
{α : Type u_1} →
{n : Type u_4} → [inst : Star α] → (A : Matrix n n α) → [Decidable (A.conjTranspose = A)] → Decidable A.IsHermitian
theorem Matrix.IsHermitian.eq E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian → A.conjTranspose = A
theorem Matrix.isHermitian_iff_isSelfAdjoint E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian ↔ IsSelfAdjoint A
theorem Matrix.IsHermitian.isSelfAdjoint E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian → IsSelfAdjoint A
Alias of the forward direction of Matrix.isHermitian_iff_isSelfAdjoint.
theorem IsSelfAdjoint.isHermitian E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, IsSelfAdjoint A → A.IsHermitian
Alias of the reverse direction of Matrix.isHermitian_iff_isSelfAdjoint.
theorem Matrix.IsHermitian.star_eq E0 #
∀ {α : Type u_1} {n : Type u_4} {A : Matrix n n α} [inst : Star α], A.IsHermitian → star A = A
theorem Matrix.IsHermitian.ext E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, (∀ (i j : n), star (A j i) = A i j) → A.IsHermitian
theorem Matrix.IsHermitian.apply E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian → ∀ (i j : n), star (A j i) = A i j
theorem Matrix.IsHermitian.ext_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian ↔ ∀ (i j : n), star (A j i) = A i j
theorem Matrix.isHermitian_iff_isSymm E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] [TrivialStar α] {A : Matrix n n α}, A.IsHermitian ↔ A.IsSymm
theorem Matrix.IsHermitian.isSymm E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] [TrivialStar α] {A : Matrix n n α}, A.IsHermitian → A.IsSymm
theorem Matrix.IsHermitian.map E0 #
∀ {α : Type u_1} {β : Type u_2} {n : Type u_4} [inst : Star α] [inst_1 : Star β] {A : Matrix n n α},
A.IsHermitian → ∀ (f : α → β), Function.Semiconj f star star → (A.map f).IsHermitian
theorem Matrix.isHermitian_map_iff E0 #
∀ {α : Type u_1} {β : Type u_2} {n : Type u_4} [inst : Star α] [inst_1 : Star β] {A : Matrix n n α} {f : α → β},
Function.Semiconj f star star → Function.Injective f → ((A.map f).IsHermitian ↔ A.IsHermitian)
theorem Matrix.IsHermitian.of_subsingleton E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α} [Subsingleton α], A.IsHermitian
theorem Matrix.IsHermitian.transpose E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian → A.transpose.IsHermitian
theorem Matrix.isHermitian_transpose_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.transpose.IsHermitian ↔ A.IsHermitian
theorem Matrix.IsHermitian.conjTranspose E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {A : Matrix n n α}, A.IsHermitian → A.conjTranspose.IsHermitian
theorem Matrix.IsHermitian.submatrix E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix n n α},
A.IsHermitian → ∀ (f : m → n), (A.submatrix f f).IsHermitian
theorem Matrix.isHermitian_iff_submatrix_finset E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Star α] {M : Matrix n n α},
M.IsHermitian ↔ ∀ (s : Finset n), (M.submatrix Subtype.val Subtype.val).IsHermitian
A matrix M : Matrix n n R is Hermitian iff every finite principal submatrix is
Hermitian.
theorem Matrix.isHermitian_submatrix_equiv E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix n n α} (e : m ≃ n),
(A.submatrix ⇑e ⇑e).IsHermitian ↔ A.IsHermitian
theorem Matrix.IsHermitian.reindex E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix n n α},
A.IsHermitian → ∀ (f : n ≃ m), ((Matrix.reindex f f) A).IsHermitian
theorem Matrix.isHermitian_reindex_iff E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix n n α} (f : n ≃ m),
((Matrix.reindex f f) A).IsHermitian ↔ A.IsHermitian
theorem Matrix.conjTranspose_comp E1 #
∀ {α : Type u_1} [inst : Star α] {I : Type u_5} {J : Type u_6} {K : Type u_7} {L : Type u_8}
(M : Matrix I J (Matrix K L α)),
((Matrix.comp I J K L α) M).conjTranspose = (Matrix.comp J I L K α) (M.transpose.map fun x ↦ x.conjTranspose)
theorem Matrix.conjTranspose_comp' E1 #
∀ {α : Type u_1} [inst : Star α] {I : Type u_5} {J : Type u_6} {K : Type u_7} (M : Matrix I J (Matrix K K α)),
((Matrix.comp I J K K α) M).conjTranspose = (Matrix.comp J I K K α) M.conjTranspose
When the inner matrices are square we can use the induced star operation
theorem Matrix.isHermitian_comp_iff E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix m m (Matrix n n α)},
((Matrix.comp m m n n α) A).IsHermitian ↔ A.IsHermitian
theorem Matrix.isHermitian_comp_iff_forall E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : Star α] {A : Matrix m m (Matrix n n α)},
((Matrix.comp m m n n α) A).IsHermitian ↔ ∀ (i j : m) (i' j' : n), star (A j i j' i') = A i j i' j'
theorem Matrix.isHermitian_conjTranspose_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : InvolutiveStar α] {A : Matrix n n α},
A.conjTranspose.IsHermitian ↔ A.IsHermitian
theorem Matrix.IsHermitian.fromBlocks E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : InvolutiveStar α] {A : Matrix m m α} {B : Matrix m n α}
{C : Matrix n m α} {D : Matrix n n α},
A.IsHermitian → B.conjTranspose = C → D.IsHermitian → (Matrix.fromBlocks A B C D).IsHermitian
A block matrix A.from_blocks B C D is Hermitian,
if A and D are Hermitian and Bᴴ = C.
theorem Matrix.isHermitian_fromBlocks_iff E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : InvolutiveStar α] {A : Matrix m m α} {B : Matrix m n α}
{C : Matrix n m α} {D : Matrix n n α},
(Matrix.fromBlocks A B C D).IsHermitian ↔ A.IsHermitian ∧ B.conjTranspose = C ∧ C.conjTranspose = B ∧ D.IsHermitian
This is the iff version of Matrix.IsHermitian.fromBlocks.
theorem Matrix.IsHermitian.hadamard E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : CommMonoid α] [inst_1 : StarMul α] {A B : Matrix n n α},
A.IsHermitian → B.IsHermitian → (A.hadamard B).IsHermitian
The Hadamard product of Hermitian matrices is Hermitian.
theorem Matrix.isHermitian_diagonal_of_self_adjoint E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] [inst_2 : DecidableEq n] (v : n → α),
IsSelfAdjoint v → (Matrix.diagonal v).IsHermitian
A diagonal matrix is Hermitian if the entries are self-adjoint (as a vector)
theorem Matrix.isHermitian_diagonal_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] [inst_2 : DecidableEq n] {d : n → α},
(Matrix.diagonal d).IsHermitian ↔ ∀ (i : n), IsSelfAdjoint (d i)
A diagonal matrix is Hermitian if each diagonal entry is self-adjoint
theorem Matrix.isHermitian_blockDiagonal'_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] [inst_2 : DecidableEq n]
{p : n → Type u_5} {M : (i : n) → Matrix (p i) (p i) α},
(Matrix.blockDiagonal' M).IsHermitian ↔ ∀ (i : n), (M i).IsHermitian
A block diagonal matrix is Hermitian if and only if each block is Hermitian.
theorem Matrix.isHermitian_blockDiagonal_iff E0 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] [inst_2 : DecidableEq n]
{M : n → Matrix m m α}, (Matrix.blockDiagonal M).IsHermitian ↔ ∀ (i : n), (M i).IsHermitian
A block diagonal matrix whose components are all equal is Hermitian if and only if each block is Hermitian.
theorem Matrix.isHermitian_diagonal E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] [TrivialStar α] [inst_3 : DecidableEq n]
(v : n → α), (Matrix.diagonal v).IsHermitian
A diagonal matrix is Hermitian if the entries have the trivial star operation
(such as on the reals).
theorem Matrix.isHermitian_zero E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α], Matrix.IsHermitian 0
theorem Matrix.IsHermitian.add E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddMonoid α] [inst_1 : StarAddMonoid α] {A B : Matrix n n α},
A.IsHermitian → B.IsHermitian → (A + B).IsHermitian
theorem Matrix.isHermitian_add_transpose_self E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddCommMonoid α] [inst_1 : StarAddMonoid α] (A : Matrix n n α),
(A + A.conjTranspose).IsHermitian
theorem Matrix.isHermitian_transpose_add_self E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddCommMonoid α] [inst_1 : StarAddMonoid α] (A : Matrix n n α),
(A.conjTranspose + A).IsHermitian
theorem Matrix.IsHermitian.neg E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddGroup α] [inst_1 : StarAddMonoid α] {A : Matrix n n α},
A.IsHermitian → (-A).IsHermitian
theorem Matrix.isHermitian_neg_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddGroup α] [inst_1 : StarAddMonoid α] {A : Matrix n n α},
(-A).IsHermitian ↔ A.IsHermitian
theorem Matrix.IsHermitian.sub E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : AddGroup α] [inst_1 : StarAddMonoid α] {A B : Matrix n n α},
A.IsHermitian → B.IsHermitian → (A - B).IsHermitian
theorem Matrix.IsHermitian.smul E1 #
∀ {α : Type u_1} {n : Type u_4} {R : Type u_5} [inst : Star R] [inst_1 : Star α] [inst_2 : SMul R α] [StarModule R α]
{A : Matrix n n α}, A.IsHermitian → ∀ {k : R}, IsSelfAdjoint k → (k • A).IsHermitian
theorem Matrix.IsHermitian.of_smul E1 #
∀ {α : Type u_1} {n : Type u_4} {R : Type u_5} [inst : Monoid R] [inst_1 : Star R] [inst_2 : Star α]
[inst_3 : MulAction R α] [StarModule R α] {A : Matrix n n α} {k : R} [Invertible k],
(k • A).IsHermitian → IsSelfAdjoint k → A.IsHermitian
theorem Matrix.IsHermitian.of_smul' E1 #
∀ {α : Type u_1} {n : Type u_4} {R : Type u_5} [inst : Monoid R] [inst_1 : Star R] [inst_2 : Star α]
[inst_3 : MulAction R α] [StarModule R α] {A : Matrix n n α} {k : R} [inst_5 : Invertible k],
(k • A).IsHermitian → IsSelfAdjoint ⅟k → A.IsHermitian
Assumes IsSelfAdjoint ⅟k instead of IsSelfAdjoint k.
These are equivalent given StarMul R
theorem Matrix.isHermitian_smul_iff E0 #
∀ {α : Type u_1} {n : Type u_4} {R : Type u_5} [inst : Monoid R] [inst_1 : Star R] [inst_2 : Star α]
[inst_3 : MulAction R α] [StarModule R α] {A : Matrix n n α} {k : R} [Invertible k],
IsSelfAdjoint k → ((k • A).IsHermitian ↔ A.IsHermitian)
theorem Matrix.isHermitian_mul_conjTranspose_self E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype n]
(A : Matrix m n α), (A * A.conjTranspose).IsHermitian
Note this is more general than IsSelfAdjoint.mul_star_self as B can be rectangular.
theorem Matrix.isHermitian_conjTranspose_mul_self E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype m]
(A : Matrix m n α), (A.conjTranspose * A).IsHermitian
Note this is more general than IsSelfAdjoint.star_mul_self as B can be rectangular.
theorem Matrix.isHermitian_conjTranspose_mul_mul E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype m]
{A : Matrix m m α} (B : Matrix m n α), A.IsHermitian → (B.conjTranspose * A * B).IsHermitian
Note this is more general than IsSelfAdjoint.conjugate' as B can be rectangular.
theorem Matrix.isHermitian_mul_mul_conjTranspose E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype m]
{A : Matrix m m α} (B : Matrix n m α), A.IsHermitian → (B * A * B.conjTranspose).IsHermitian
Note this is more general than IsSelfAdjoint.conjugate as B can be rectangular.
theorem Matrix.IsHermitian.commute_iff E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype n]
{A B : Matrix n n α}, A.IsHermitian → B.IsHermitian → (Commute A B ↔ (A * B).IsHermitian)
theorem Matrix.IsHermitian.star_dotProduct_mulVec_comm E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : NonUnitalSemiring α] [inst_1 : StarRing α] [inst_2 : Fintype n]
{A : Matrix n n α}, A.IsHermitian → ∀ (x y : n → α), star (star x ⬝ᵥ A.mulVec y) = star y ⬝ᵥ A.mulVec x
theorem Matrix.isHermitian_one E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : NonAssocSemiring α] [inst_1 : StarRing α] [inst_2 : DecidableEq n],
Matrix.IsHermitian 1
Note this is more general for matrices than isSelfAdjoint_one as it does not
require Fintype n, which is necessary for Monoid (Matrix n n R).
theorem Matrix.isHermitian_natCast E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Semiring α] [inst_1 : StarRing α] [inst_2 : DecidableEq n] (d : ℕ),
(↑d).IsHermitian
theorem Matrix.IsHermitian.pow E1 #
∀ {α : Type u_1} {n : Type u_4} [inst : Semiring α] [inst_1 : StarRing α] [inst_2 : Fintype n] [inst_3 : DecidableEq n]
{A : Matrix n n α}, A.IsHermitian → ∀ (k : ℕ), (A ^ k).IsHermitian
theorem Matrix.isHermitian_intCast E0 #
∀ {α : Type u_1} {n : Type u_4} [inst : Ring α] [inst_1 : StarRing α] [inst_2 : DecidableEq n] (d : ℤ), (↑d).IsHermitian
theorem Matrix.IsHermitian.inv E1 #
∀ {α : Type u_1} {m : Type u_3} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
{A : Matrix m m α}, A.IsHermitian → A⁻¹.IsHermitian
theorem Matrix.isHermitian_inv E0 #
∀ {α : Type u_1} {m : Type u_3} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
(A : Matrix m m α) [Invertible A], A⁻¹.IsHermitian ↔ A.IsHermitian
theorem Matrix.IsHermitian.adjugate E1 #
∀ {α : Type u_1} {m : Type u_3} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
{A : Matrix m m α}, A.IsHermitian → A.adjugate.IsHermitian
theorem Matrix.IsHermitian.zpow E1 #
∀ {α : Type u_1} {m : Type u_3} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m] [inst_3 : DecidableEq m]
{A : Matrix m m α}, A.IsHermitian → ∀ (k : ℤ), (A ^ k).IsHermitian
Note that IsSelfAdjoint.zpow does not apply to matrices as they are not a division ring.
def Matrix.«term_⊕ᵥ_» E1 #
Lean.TrailingParserDescr
Notation for Sum.elim, scoped within the Matrix namespace.
theorem Matrix.schur_complement_eq₁₁ E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m]
[inst_3 : DecidableEq m] [inst_4 : Fintype n] {A : Matrix m m α} (B : Matrix m n α) (D : Matrix n n α) (x : m → α)
(y : n → α) [Invertible A],
A.IsHermitian →
Matrix.vecMul (star (Sum.elim x y)) (Matrix.fromBlocks A B B.conjTranspose D) ⬝ᵥ Sum.elim x y =
Matrix.vecMul (star (x + (A⁻¹ * B).mulVec y)) A ⬝ᵥ (x + (A⁻¹ * B).mulVec y) +
Matrix.vecMul (star y) (D - B.conjTranspose * A⁻¹ * B) ⬝ᵥ y
theorem Matrix.schur_complement_eq₂₂ E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m]
[inst_3 : Fintype n] [inst_4 : DecidableEq n] (A : Matrix m m α) (B : Matrix m n α) {D : Matrix n n α} (x : m → α)
(y : n → α) [Invertible D],
D.IsHermitian →
Matrix.vecMul (star (Sum.elim x y)) (Matrix.fromBlocks A B B.conjTranspose D) ⬝ᵥ Sum.elim x y =
Matrix.vecMul (star ((D⁻¹ * B.conjTranspose).mulVec x + y)) D ⬝ᵥ ((D⁻¹ * B.conjTranspose).mulVec x + y) +
Matrix.vecMul (star x) (A - B * D⁻¹ * B.conjTranspose) ⬝ᵥ x
theorem Matrix.IsHermitian.fromBlocks₁₁ E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype m]
[inst_3 : DecidableEq m] {A : Matrix m m α} (B : Matrix m n α) (D : Matrix n n α),
A.IsHermitian → ((Matrix.fromBlocks A B B.conjTranspose D).IsHermitian ↔ (D - B.conjTranspose * A⁻¹ * B).IsHermitian)
theorem Matrix.IsHermitian.fromBlocks₂₂ E1 #
∀ {α : Type u_1} {m : Type u_3} {n : Type u_4} [inst : CommRing α] [inst_1 : StarRing α] [inst_2 : Fintype n]
[inst_3 : DecidableEq n] (A : Matrix m m α) (B : Matrix m n α) {D : Matrix n n α},
D.IsHermitian → ((Matrix.fromBlocks A B B.conjTranspose D).IsHermitian ↔ (A - B * D⁻¹ * B.conjTranspose).IsHermitian)