Documentation

TauCeti.Analysis.Matrix.SpectralMeasure.Basic

Empirical spectral measures of matrices #

For a Hermitian matrix A of positive size n, the empirical spectral measure L_A = n⁻¹ ∑ᵢ δ_{λᵢ(A)} is the probability measure on ℝ putting mass 1/n at each eigenvalue, counted with multiplicity. For a general complex square matrix, the eigenvalue measure is the probability measure n⁻¹ ∑ δ_z on ℂ, the sum running over the roots of the characteristic polynomial with algebraic multiplicity. These are the basic objects of random matrix theory: global laws such as the semicircle and circular laws are limit theorems for them.

Both measures are built from TauCeti.Probability.empiricalMeasureOfFintype, whose evaluation, integration and pushforward API applies to them directly. The Hermitian measure depends only on the characteristic polynomial, not on the basis or on the eigenvector choice, and its pushforward along ℝ → ℂ is the eigenvalue measure. The eigenvalue measure of a nilpotent matrix is the Dirac mass at 0; this records that roots are counted with algebraic, not geometric, multiplicity.

The spectral measure depends continuously on the Hermitian matrix for the weak topology and measurably for the entrywise measurable structure. Thus a measurable random Hermitian matrix has a measurable empirical spectral measure, including when eigenvalues collide.

The moments and the resolvent transform of the Hermitian spectral measure are normalized traces: ∫ x ^ k dL_A = n⁻¹ Re tr (A ^ k) and, off the spectrum, m_{L_A}(z) = n⁻¹ tr (A - z • 1)⁻¹. These identities turn the moment method and the resolvent method for global laws into computations with traces of matrices.

If A.charpoly = X ^ k * B.charpoly, the spectral measure of A is the mixture of that of B and of the Dirac mass at 0, with weights proportional to the size of B and to k. For the Gram matrices of a card m × card n matrix A with card m ≤ card n this is the exact zero-mass correction L_{AᴴA} = (card m / card n) L_{AAᴴ} + (1 - card m / card n) δ₀, and with k = card n - card m the resolvent transforms satisfy the companion identity m_{L_{AᴴA}}(z) = (card m / card n) m_{L_{AAᴴ}}(z) - (k / card n) z⁻¹. These relate the spectral measures of a sample covariance matrix X * Xᴴ / n and of its companion Xᴴ * X / n.

Main definitions #

Main results #

References #

noncomputable def Matrix.spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] (A : Matrix n n 𝕜) (hA : A.IsHermitian) :

The empirical spectral measure L_A = (card n)⁻¹ ∑ᵢ δ_{λᵢ(A)} of a Hermitian matrix of positive size, with the eigenvalues counted with multiplicity.

Instances For

    The spectral measure is the empirical measure of the eigenvalue family.

    The spectral measure is the empirical measure of the decreasingly sorted eigenvalues.

    theorem Matrix.continuous_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] :
    Continuous fun (A : { A : Matrix n n 𝕜 // A.IsHermitian }) => (↑A).spectralMeasure ⋯

    The empirical spectral measure depends continuously on the Hermitian matrix for the weak topology on probability measures.

    theorem Matrix.measurable_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] [MeasurableSpace 𝕜] [BorelSpace 𝕜] :
    Measurable fun (A : { A : Matrix n n 𝕜 // A.IsHermitian }) => (↑A).spectralMeasure ⋯

    The empirical spectral measure is measurable for the entrywise Borel structure on Hermitian matrices and the evaluation σ-algebra on probability measures.

    theorem Matrix.spectralMeasure_apply {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] (A : Matrix n n 𝕜) (hA : A.IsHermitian) {s : Set ℝ} (hs : MeasurableSet s) :
    ↑(A.spectralMeasure hA) s = (↑(Fintype.card n))⁻¹ * ∑ i : n, s.indicator 1 (hA.eigenvalues i)

    The spectral measure of a set is the proportion of eigenvalues in it, counted with multiplicity.

    theorem Matrix.IsHermitian.spectralMeasure_real_Iic {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) (t : ℝ) :
    (↑(A.spectralMeasure hA)).real (Set.Iic t) = ↑{i : Fin (Fintype.card n) | hA.eigenvalues₀ i ≤ t}.card / ↑(Fintype.card n)

    The distribution function of the spectral measure at t is the proportion of eigenvalues at most t, counted with multiplicity.

    theorem Matrix.spectralMeasure_apply_singleton_zero {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] (A : Matrix n n 𝕜) (hA : A.IsHermitian) :
    ↑(A.spectralMeasure hA) {0} = (↑(Fintype.card n))⁻¹ * ↑(Fintype.card n - A.rank)

    The spectral measure's atom at zero is the proportion of zero eigenvalues, expressed in terms of the matrix rank.

    theorem Matrix.PosSemidef.ae_mem_Ici_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {A : Matrix n n 𝕜} (hA : A.PosSemidef) :

    The spectral measure of a positive-semidefinite matrix is concentrated on the nonnegative reals.

    theorem Matrix.integral_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {E : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (A : Matrix n n 𝕜) (hA : A.IsHermitian) (f : ℝ → E) :
    ∫ (x : ℝ), f x ∂↑(A.spectralMeasure hA) = (↑(Fintype.card n))⁻¹ • ∑ i : n, f (hA.eigenvalues i)

    Integrating against the spectral measure is averaging over the eigenvalues.

    theorem Matrix.integral_spectralMeasure_eq_sum_eigenvalues₀ {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {E : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (A : Matrix n n 𝕜) (hA : A.IsHermitian) (f : ℝ → E) :
    ∫ (x : ℝ), f x ∂↑(A.spectralMeasure hA) = (↑(Fintype.card n))⁻¹ • ∑ i : Fin (Fintype.card n), f (hA.eigenvalues₀ i)

    Integrating against the spectral measure is averaging over the decreasingly sorted eigenvalues.

    theorem Matrix.spectralMeasure_eq_of_charpoly_eq {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) (h : A.charpoly = B.charpoly) :

    Hermitian matrices with the same characteristic polynomial have the same spectral measure. In particular the spectral measure does not depend on a choice of basis.

    @[simp]
    theorem Matrix.spectralMeasure_units_conj {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) (M : (Matrix n n 𝕜)ˣ) (hMA : (↑M * A * (↑M)⁻¹).IsHermitian) :
    (↑M * A * (↑M)⁻¹).spectralMeasure hMA = A.spectralMeasure hA

    Conjugating a Hermitian matrix by an invertible matrix does not change its spectral measure, provided the conjugate is again Hermitian.

    theorem Matrix.lintegral_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] (A : Matrix n n 𝕜) (hA : A.IsHermitian) (f : ℝ → ENNReal) :
    ∫⁻ (x : ℝ), f x ∂↑(A.spectralMeasure hA) = (↑(Fintype.card n))⁻¹ * ∑ i : n, f (hA.eigenvalues i)

    The Lebesgue integral against the spectral measure is the average over the eigenvalues.

    The empirical measure (card n)⁻¹ ∑ δ_z of a complex square matrix of positive size, the sum running over the roots z of its characteristic polynomial with algebraic multiplicity.

    Instances For

      The eigenvalue measure is the empirical measure of the family of characteristic roots, indexed by the elements of the root multiset.

      The measure underlying the eigenvalue measure is the normalized sum of the Dirac masses at the characteristic roots, counted with algebraic multiplicity.

      theorem Matrix.eigenvalueMeasure_apply {n : Type u_1} [Fintype n] [DecidableEq n] [Nonempty n] (A : Matrix n n ℂ) {s : Set ℂ} [DecidablePred fun (x : ℂ) => x ∈ s] :
      ↑A.eigenvalueMeasure s = (↑(Fintype.card n))⁻¹ * ↑(Multiset.filter (fun (x : ℂ) => x ∈ s) A.charpoly.roots).card

      The eigenvalue measure of a set is the proportion of characteristic roots in it, counted with algebraic multiplicity.

      Integrating against the eigenvalue measure is averaging over the characteristic roots, counted with algebraic multiplicity.

      @[simp]

      Conjugating a complex square matrix by an invertible matrix does not change its eigenvalue measure.

      For a complex Hermitian matrix, the eigenvalue measure is the pushforward of the spectral measure along ℝ → ℂ.

      A nilpotent complex matrix of positive size has eigenvalue measure δ₀: its characteristic polynomial is X ^ n, whose root 0 has algebraic multiplicity n.

      theorem Matrix.integral_pow_spectralMeasure {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] (A : Matrix n n 𝕜) (hA : A.IsHermitian) (k : ℕ) :
      ∫ (x : ℝ), x ^ k ∂↑(A.spectralMeasure hA) = (↑(Fintype.card n))⁻¹ * RCLike.re (A ^ k).trace

      The k-th moment of the spectral measure of a Hermitian matrix is the normalized trace of A ^ k: ∫ x ^ k dL_A = (card n)⁻¹ * Re tr (A ^ k).

      theorem Matrix.gram_spectralMeasure_moments_mul_card_eq {𝕜 : Type u_2} [RCLike 𝕜] {p : Type u_3} {q : Type u_4} [Fintype p] [DecidableEq p] [Nonempty p] [Fintype q] [DecidableEq q] [Nonempty q] (X : Matrix p q 𝕜) {k : ℕ} (hk : k ≠ 0) :
      ↑(Fintype.card q) * ∫ (x : ℝ), x ^ k ∂↑((X.conjTranspose * X).spectralMeasure ⋯) = ↑(Fintype.card p) * ∫ (x : ℝ), x ^ k ∂↑((X * X.conjTranspose).spectralMeasure ⋯)

      The positive moments of the two Gram-matrix spectral measures agree after weighting by the dimensions of their respective matrices, over any RCLike field and finite nonempty index types.

      Off the spectrum, the resolvent transform m(z) = ∫ (x - z)⁻¹ dL_A(x) of the spectral measure of a complex Hermitian matrix is the normalized trace of its resolvent (A - z • 1)⁻¹.

      theorem Matrix.spectralMeasure_toMeasure_of_charpoly_eq_X_pow_mul {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {m : Type u_3} [Fintype m] [DecidableEq m] [Nonempty m] {A : Matrix n n 𝕜} {B : Matrix m m 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) {k : ℕ} (h : A.charpoly = Polynomial.X ^ k * B.charpoly) :

      If the characteristic polynomial of a Hermitian matrix A of size card n is X ^ k times that of a Hermitian matrix B of size card m, then L_A is the mixture of L_B and of the Dirac mass at 0, with weights card m / card n and k / card n.

      theorem Matrix.integral_spectralMeasure_of_charpoly_eq_X_pow_mul {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {m : Type u_3} [Fintype m] [DecidableEq m] [Nonempty m] {E : Type u_4} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {A : Matrix n n 𝕜} {B : Matrix m m 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) {k : ℕ} (h : A.charpoly = Polynomial.X ^ k * B.charpoly) (f : ℝ → E) :
      ∫ (x : ℝ), f x ∂↑(A.spectralMeasure hA) = (↑(Fintype.card m) / ↑(Fintype.card n)) • ∫ (x : ℝ), f x ∂↑(B.spectralMeasure hB) + (↑k / ↑(Fintype.card n)) • f 0

      If the characteristic polynomial of a Hermitian matrix A of size card n is X ^ k times that of a Hermitian matrix B of size card m, then integrating against L_A is the weighted average of integrating against L_B and evaluating at 0, with weights card m / card n and k / card n.

      If the characteristic polynomial of a complex Hermitian matrix A of size card n is X ^ k times that of a complex Hermitian matrix B of size card m, then the resolvent transforms of their spectral measures satisfy m_{L_A}(z) = (card m / card n) m_{L_B}(z) - (k / card n) z⁻¹.

      theorem Matrix.spectralMeasure_conjTranspose_mul_self {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {m : Type u_3} [Fintype m] [DecidableEq m] [Nonempty m] (A : Matrix m n 𝕜) (hle : Fintype.card m ≤ Fintype.card n) :

      For a matrix A with card m ≤ card n rows and columns, the spectral measure of the card n × card n Gram matrix Aᴴ * A is that of A * Aᴴ with the missing mass at 0: L_{AᴴA} = (card m / card n) L_{AAᴴ} + (1 - card m / card n) δ₀.

      theorem Matrix.spectralMeasure_mul_conjTranspose_self {n : Type u_1} {𝕜 : Type u_2} [Fintype n] [DecidableEq n] [RCLike 𝕜] [Nonempty n] {m : Type u_3} [Fintype m] [DecidableEq m] [Nonempty m] (A : Matrix m n 𝕜) (hle : Fintype.card n ≤ Fintype.card m) :

      For a matrix A with card m ≥ card n rows and columns, the spectral measure of the card m × card m Gram matrix A * Aᴴ is that of Aᴴ * A with the missing mass at 0: L_{AAᴴ} = (card n / card m) L_{AᴴA} + (1 - card n / card m) δ₀.