Documentation

CslibFrontier.Foundations.Analysis.ODE.Hurwitz

Hurwitz matrices and the Lyapunov characterization #

A real square matrix A is Hurwitz (Matrix.IsHurwitz) when every complex eigenvalue of A, i.e. every point of the spectrum of A read over ℂ, has negative real part; equivalently every complex root of the characteristic polynomial does (Matrix.isHurwitz_iff_isRoot_charpoly). This module proves the classical characterizations of Hurwitz matrices for the finite-dimensional real linear system ẋ = A x, for every A, diagonalizable or not:

When Q = Cᵀ C, the solution is the Gramian ∫₀^∞ exp (t Aᵀ) Q exp (t A) dt entrywise, by Matrix.dotProduct_mulVec_eq_integral.

Proof route #

Stability gives the spectral bound. An eigenvector v of A over ℂ for μ satisfies exp (t A) v = exp (t μ) v (Matrix.exp_smul_mulVec_eq_of_pow_mulVec_eq_zero with k = 1). The real and imaginary parts of v are real initial states, whose trajectories bound exp (t re μ) ‖v‖, so exp (t (re μ + α)) stays bounded.

The spectral bound gives stability, without diagonalization. For a generalized eigenvector v, (A - μ)ᵏ v = 0, the exponential series terminates: exp (t A) v = exp (t μ) ∑_{j < k} tʲ / j! (A - μ)ʲ v (Matrix.exp_smul_mulVec_eq_of_pow_mulVec_eq_zero), which tends to 0 when re μ < 0. The generalized eigenspaces span ℂⁿ (Module.End.iSup_maxGenEigenspace_eq_top), so exp (t A) → 0 (Matrix.IsHurwitz.tendsto_exp_smul). For any bounded operator on a real Banach space, exp (t A) → 0 is equivalent to exponential stability: once ‖exp (T A)‖ ≤ 1/2, the semigroup property gives the rate log 2 / T (ContinuousLinearMap.isExponentiallyStable_iff_tendsto_exp_smul).

The Lyapunov equation. If Aᵀ X + X A = 0 then X exp (t A) = exp (-t Aᵀ) X, so exp (t Aᵀ) X exp (t A) = X for all t, and the left side tends to 0: the linear map X ↦ Aᵀ X + X A is injective, hence bijective in finite dimension. Along a trajectory the energy xᵀ P x has derivative -xᵀ Q x ≤ 0 and tends to 0, so P ⪰ 0; and xᵀ P x = 0 forces P x = 0, hence xᵀ Q x = -xᵀ (Aᵀ P + P A) x = 0, so x = 0.

Main definitions #

Main results #

References #

Exponential stability is decay of the flow. For a bounded operator A on a real Banach space, ẋ = A x is exponentially stable iff exp (t • A) → 0 in operator norm as t → ∞.

def Matrix.IsHurwitz {n : Type u_1} [Fintype n] [DecidableEq n] (A : Matrix n n ℝ) :

A real square matrix is Hurwitz when every eigenvalue over ℂ, i.e. every point of the spectrum of A read as a complex matrix, has negative real part. Repeated and defective eigenvalues are allowed. See Matrix.isHurwitz_iff_isRoot_charpoly for the characteristic polynomial form.

A is Hurwitz iff every complex root of its characteristic polynomial has negative real part.

theorem Matrix.exp_smul_mulVec_eq_of_pow_mulVec_eq_zero {n : Type u_1} [Fintype n] [DecidableEq n] {M : Matrix n n ℂ} {μ : ℂ} {v : n → ℂ} {k : ℕ} (hv : ((M - μ • 1) ^ k).mulVec v = 0) (t : ℂ) :
(NormedSpace.exp (t • M)).mulVec v = Complex.exp (t * μ) • ∑ j ∈ Finset.range k, (t ^ j / ↑j.factorial) • ((M - μ • 1) ^ j).mulVec v

The flow on a generalized eigenvector. If (M - μ)ᵏ v = 0 for a complex matrix M, the exponential series applied to v terminates: exp (t M) v = exp (t μ) ∑_{j < k} tʲ / j! (M - μ)ʲ v. With k = 1, exp (t M) v = exp (t μ) v for an eigenvector.

The exponential of a real matrix, read over ℂ, is the exponential of the complex matrix.

theorem Matrix.IsHurwitz.tendsto_exp_smul {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} (hA : A.IsHurwitz) :

Hurwitz matrices have decaying flows. If A is Hurwitz, then exp (t • A) → 0 as t → ∞. Each generalized eigenvector over ℂ decays by Matrix.exp_smul_mulVec_eq_of_pow_mulVec_eq_zero, and generalized eigenvectors span ℂⁿ; no diagonalization is used.

A Hurwitz matrix gives an exponentially stable system ẋ = A x in the Euclidean norm.

theorem Matrix.re_le_of_forall_norm_le {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} {M α : ℝ} (h : ∀ (x : ℝ → EuclideanSpace ℝ n), (toEuclideanCLM A).IsTrajectoryOn x (Set.Ici 0) → ∀ t ≥ 0, ‖x t‖ ≤ M * Real.exp (-(α * t)) * ‖x 0‖) {μ : ℂ} (hμ : μ ∈ spectrum ℂ (A.map ⇑(algebraMap ℝ ℂ))) :
μ.re ≤ -α

A decay rate bounds the spectrum. If every trajectory of ẋ = A x on [0, ∞) satisfies ‖x t‖ ≤ M exp (-α t) ‖x 0‖ in the Euclidean norm, then every eigenvalue μ of A over ℂ has re μ ≤ -α.

Exponential stability gives a Hurwitz matrix.

Hurwitz iff exponentially stable. A real square matrix A is Hurwitz iff ẋ = A x is exponentially stable in the Euclidean norm: there are M and α > 0 with ‖x t‖ ≤ M exp (-α t) ‖x 0‖ for every trajectory on [0, ∞) and every t ≥ 0.

theorem Matrix.IsHurwitz.re_lt_of_sub {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} {σ : ℝ} (h : (A - σ • 1).IsHurwitz) (μ : ℂ) :
μ ∈ spectrum ℂ (A.map ⇑(algebraMap ℝ ℂ)) → μ.re < σ

Eigenvalues to the left of a shift. If A - σ • 1 is Hurwitz, every complex eigenvalue of A has real part less than σ.

theorem Matrix.exists_mem_spectrum_le_re_of_posSemidef {n : Type u_1} [Fintype n] [DecidableEq n] {A P : Matrix n n ℝ} {ε : ℝ} (hQ : (-((A - ε • 1).transpose * P + P * (A - ε • 1))).PosSemidef) {x₀ : n → ℝ} (hx₀ : x₀ ⬝ᵥ P.mulVec x₀ < 0) :
∃ μ ∈ spectrum ℂ (A.map ⇑(algebraMap ℝ ℂ)), ε ≤ μ.re

An eigenvalue to the right of ε. If -((A - ε • 1)ᵀ * P + P * (A - ε • 1)) ⪰ 0 and x₀ ⬝ᵥ P *ᵥ x₀ < 0, then A has a complex eigenvalue μ with ε ≤ re μ: the shifted matrix A - ε • 1 is not asymptotically stable (Matrix.not_isAsymptoticallyStable_toEuclideanCLM_of_posSemidef with rate 0), hence not Hurwitz. P need not be definite and ε may have any sign.

The Lyapunov equation #

theorem Matrix.IsHurwitz.eq_zero_of_lyapunov_eq_zero {n : Type u_1} [Fintype n] [DecidableEq n] {A X : Matrix n n ℝ} (hA : A.IsHurwitz) (hX : A.transpose * X + X * A = 0) :
X = 0

Uniqueness for the homogeneous Lyapunov equation. If A is Hurwitz and Aᵀ X + X A = 0, then X = 0: X exp (t A) = exp (-t Aᵀ) X, so exp (t Aᵀ) X exp (t A) = X for all t, and the left side tends to 0. X need not be symmetric.

theorem Matrix.IsHurwitz.existsUnique_lyapunov_eq {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} (hA : A.IsHurwitz) (Q : Matrix n n ℝ) :
∃! P : Matrix n n ℝ, A.transpose * P + P * A = -Q

Existence and uniqueness for the Lyapunov equation. If A is Hurwitz, then for every real matrix Q the Lyapunov equation Aᵀ P + P A = -Q has exactly one solution P among all real matrices: the linear map P ↦ Aᵀ P + P A is injective (Matrix.IsHurwitz.eq_zero_of_lyapunov_eq_zero), hence bijective.

theorem Matrix.IsHurwitz.isHermitian_of_lyapunov_eq {n : Type u_1} [Fintype n] [DecidableEq n] {A P Q : Matrix n n ℝ} (hA : A.IsHurwitz) (hQ : Q.IsHermitian) (hP : A.transpose * P + P * A = -Q) :

If A is Hurwitz and Q is symmetric, the solution of Aᵀ P + P A = -Q is symmetric: Pᵀ solves the same equation.

theorem Matrix.IsHurwitz.posDef_of_lyapunov_eq {n : Type u_1} [Fintype n] [DecidableEq n] {A P Q : Matrix n n ℝ} (hA : A.IsHurwitz) (hQ : Q.PosDef) (hP : A.transpose * P + P * A = -Q) :

The Lyapunov solution is positive definite. If A is Hurwitz, Q ≻ 0 and Aᵀ P + P A = -Q, then P ≻ 0. Along x t = exp (t A) y the energy xᵀ P x is nonincreasing and tends to 0, so yᵀ P y ≥ 0; if yᵀ P y = 0 then P y = 0, so yᵀ Q y = -yᵀ (Aᵀ P + P A) y = 0 and y = 0.

The unique symmetric solution. If A is Hurwitz and Q is symmetric, the Lyapunov equation Aᵀ P + P A = -Q has exactly one symmetric solution. It is in fact the only solution among all real matrices (Matrix.IsHurwitz.existsUnique_lyapunov_eq).

theorem Matrix.IsHurwitz.existsUnique_posDef_lyapunov_eq {n : Type u_1} [Fintype n] [DecidableEq n] {A Q : Matrix n n ℝ} (hA : A.IsHurwitz) (hQ : Q.PosDef) :
∃! P : Matrix n n ℝ, P.PosDef ∧ A.transpose * P + P * A = -Q

The unique positive definite solution. If A is Hurwitz and Q ≻ 0, the Lyapunov equation Aᵀ P + P A = -Q has exactly one positive definite solution, and no other solution at all (Matrix.IsHurwitz.existsUnique_lyapunov_eq).

theorem Matrix.isHurwitz_iff_forall_posDef_exists_posDef {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} :
A.IsHurwitz ↔ ∀ (Q : Matrix n n ℝ), Q.PosDef → ∃ (P : Matrix n n ℝ), P.PosDef ∧ A.transpose * P + P * A = -Q

Lyapunov's theorem, with the quantifiers explicit. A real square matrix A is Hurwitz iff for every positive definite Q there is a positive definite P with Aᵀ P + P A = -Q. The solution is then unique among all real matrices (Matrix.IsHurwitz.existsUnique_lyapunov_eq).

Lyapunov's theorem, with uniqueness. A real square matrix A is Hurwitz iff for every positive definite Q there is exactly one positive definite P with Aᵀ P + P A = -Q.

theorem Matrix.isHurwitz_iff_exists_posDef {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} :
A.IsHurwitz ↔ ∃ (P : Matrix n n ℝ), P.PosDef ∧ (-(A.transpose * P + P * A)).PosDef

Lyapunov's theorem, existential form. A real square matrix A is Hurwitz iff some positive definite P has -(Aᵀ P + P A) positive definite.