Documentation

Mathlib.LinearAlgebra.Matrix.Spectrum

Spectral theory of hermitian matrices #

This file proves the spectral theorem for matrices. The proof of the spectral theorem is based on the spectral theorem for linear maps (LinearMap.IsSymmetric.eigenvectorBasis_apply_self_apply).

Tags #

spectral theorem, diagonalization theorem

theorem Matrix.spectrum_toEuclideanLin {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] :
spectrum π•œ (toEuclideanLin A) = spectrum π•œ A

The spectrum of a matrix A coincides with the spectrum of toEuclideanLin A.

@[deprecated Matrix.spectrum_toEuclideanLin (since := "13-08-2025")]
theorem Matrix.IsHermitian.spectrum_toEuclideanLin {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] :
spectrum π•œ (toEuclideanLin A) = spectrum π•œ A

Alias of Matrix.spectrum_toEuclideanLin.


The spectrum of a matrix A coincides with the spectrum of toEuclideanLin A.

noncomputable def Matrix.IsHermitian.eigenvaluesβ‚€ {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :

The eigenvalues of a hermitian matrix, indexed by Fin (Fintype.card n) where n is the index type of the matrix.

Equations
    Instances For
      noncomputable def Matrix.IsHermitian.eigenvalues {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :
      n β†’ ℝ

      The eigenvalues of a hermitian matrix, reusing the index n of the matrix entries.

      Equations
        Instances For
          noncomputable def Matrix.IsHermitian.eigenvectorBasis {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :
          OrthonormalBasis n π•œ (EuclideanSpace π•œ n)

          A choice of an orthonormal basis of eigenvectors of a hermitian matrix.

          Equations
            Instances For
              theorem Matrix.IsHermitian.mulVec_eigenvectorBasis {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (j : n) :
              theorem Matrix.IsHermitian.eigenvalues_mem_spectrum_real {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (i : n) :

              Eigenvalues of a hermitian matrix A are in the ℝ spectrum of A.

              noncomputable def Matrix.IsHermitian.eigenvectorUnitary {π•œ : Type u_3} [RCLike π•œ] {n : Type u_4} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :
              β†₯(unitaryGroup n π•œ)

              Unitary matrix whose columns are Matrix.IsHermitian.eigenvectorBasis.

              Equations
                Instances For
                  theorem Matrix.IsHermitian.eigenvectorUnitary_coe {π•œ : Type u_3} [RCLike π•œ] {n : Type u_4} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :
                  @[simp]
                  theorem Matrix.IsHermitian.eigenvectorUnitary_transpose_apply {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (j : n) :
                  @[simp]
                  theorem Matrix.IsHermitian.eigenvectorUnitary_col_eq {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (j : n) :
                  @[simp]
                  theorem Matrix.IsHermitian.eigenvectorUnitary_apply {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (i j : n) :
                  theorem Matrix.IsHermitian.eigenvectorUnitary_mulVec {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (j : n) :
                  theorem Matrix.IsHermitian.star_eigenvectorUnitary_mulVec {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (j : n) :
                  theorem Matrix.IsHermitian.star_mul_self_mul_eq_diagonal {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :

                  Unitary diagonalization of a Hermitian matrix.

                  theorem Matrix.IsHermitian.spectral_theorem {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :

                  Diagonalization theorem, spectral theorem for matrices; A hermitian matrix can be diagonalized by a change of basis. For the spectral theorem on linear maps, see LinearMap.IsSymmetric.eigenvectorBasis_apply_self_apply.

                  theorem Matrix.IsHermitian.eigenvalues_eq {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) (i : n) :
                  theorem Matrix.IsHermitian.det_eq_prod_eigenvalues {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :
                  A.det = ∏ i : n, ↑(hA.eigenvalues i)

                  The determinant of a hermitian matrix is the product of its eigenvalues.

                  theorem Matrix.IsHermitian.rank_eq_rank_diagonal {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :

                  rank of a hermitian matrix is the rank of after diagonalization by the eigenvector unitary

                  theorem Matrix.IsHermitian.rank_eq_card_non_zero_eigs {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} [DecidableEq n] (hA : A.IsHermitian) :

                  rank of a hermitian matrix is the number of nonzero eigenvalues of the hermitian matrix

                  theorem Matrix.IsHermitian.exists_eigenvector_of_ne_zero {π•œ : Type u_1} [RCLike π•œ] {n : Type u_2} [Fintype n] {A : Matrix n n π•œ} (hA : A.IsHermitian) (h_ne : A β‰  0) :
                  βˆƒ (v : n β†’ π•œ) (t : ℝ), t β‰  0 ∧ v β‰  0 ∧ A.mulVec v = t β€’ v

                  A nonzero Hermitian matrix has an eigenvector with nonzero eigenvalue.