NLA-lib Explorer

Matrix.IsHermitian.commute_iff_exists_eq_mul_diagonal_mul_conjTranspose

Library · theorem

Two Hermitian matrices commute exactly when they are simultaneously unitarily diagonalisable: \mathbf{A} = \mathbf{U} \operatorname{diag}(\mathbf{a}) \mathbf{U}^{\mathsf{H}} and \mathbf{B} = \mathbf{U} \operatorname{diag}(\mathbf{b}) \mathbf{U}^{\mathsf{H}} with \mathbf{U} unitary and \mathbf{a}, \mathbf{b} real.

Matrix.IsHermitian.commute_iff_exists_eq_mul_diagonal_mul_conjTranspose.{u_1, u_4} {𝕜 : Type u_1}
  [RCLike 𝕜] {n : Type u_4} [Fintype n] [DecidableEq n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian)
  (hB : B.IsHermitian) :
  Commute A B ↔
    ∃ U a b,
      HasOrthonormalCols U ∧
        A = (U * diagonal fun j ↦ ↑(a j)) * Uᴴ ∧ B = (U * diagonal fun j ↦ ↑(b j)) * Uᴴ

Full source on GitHub

Import NLAlib.Matrix.Spectral.Simultaneous.