Symmetric matrices #
This file contains the definition and basic results about symmetric matrices.
Main definition #
Matrix.isSymm
: a matrixA : Matrix n n α
is "symmetric" ifAᵀ = A
.
Tags #
symm, symmetric, matrix
A version of Matrix.ext_iff
that unfolds the Matrix.transpose
.
theorem
Matrix.IsSymm.ext
{α : Type u_1}
{n : Type u_3}
{A : Matrix n n α}
:
(∀ (i j : n), A j i = A i j) → A.IsSymm
A version of Matrix.ext
that unfolds the Matrix.transpose
.
theorem
Matrix.isSymm_mul_transpose_self
{α : Type u_1}
{n : Type u_3}
[Fintype n]
[CommSemiring α]
(A : Matrix n n α)
:
(A * A.transpose).IsSymm
theorem
Matrix.isSymm_transpose_mul_self
{α : Type u_1}
{n : Type u_3}
[Fintype n]
[CommSemiring α]
(A : Matrix n n α)
:
(A.transpose * A).IsSymm
theorem
Matrix.isSymm_add_transpose_self
{α : Type u_1}
{n : Type u_3}
[AddCommSemigroup α]
(A : Matrix n n α)
:
(A + A.transpose).IsSymm
theorem
Matrix.isSymm_transpose_add_self
{α : Type u_1}
{n : Type u_3}
[AddCommSemigroup α]
(A : Matrix n n α)
:
(A.transpose + A).IsSymm
@[simp]
theorem
Matrix.IsSymm.pow
{α : Type u_1}
{n : Type u_3}
[CommSemiring α]
[Fintype n]
[DecidableEq n]
{A : Matrix n n α}
(h : A.IsSymm)
(k : ℕ)
:
(A ^ k).IsSymm
@[simp]
theorem
Matrix.IsSymm.transpose
{α : Type u_1}
{n : Type u_3}
{A : Matrix n n α}
(h : A.IsSymm)
:
A.transpose.IsSymm
@[simp]
theorem
Matrix.isSymm_diagonal
{α : Type u_1}
{n : Type u_3}
[DecidableEq n]
[Zero α]
(v : n → α)
:
(Matrix.diagonal v).IsSymm
The diagonal matrix diagonal v
is symmetric.
theorem
Matrix.IsSymm.fromBlocks
{α : Type u_1}
{n : Type u_3}
{m : Type u_4}
{A : Matrix m m α}
{B : Matrix m n α}
{C : Matrix n m α}
{D : Matrix n n α}
(hA : A.IsSymm)
(hBC : B.transpose = C)
(hD : D.IsSymm)
:
(Matrix.fromBlocks A B C D).IsSymm
A block matrix A.fromBlocks B C D
is symmetric,
if A
and D
are symmetric and Bᵀ = C
.
theorem
Matrix.isSymm_fromBlocks_iff
{α : Type u_1}
{n : Type u_3}
{m : Type u_4}
{A : Matrix m m α}
{B : Matrix m n α}
{C : Matrix n m α}
{D : Matrix n n α}
:
This is the iff
version of Matrix.isSymm.fromBlocks
.