NLA-lib Explorer

NLAlib.HasOrthonormalCols.cos_principalAngle

Library · theorem

Headline of principal-angles (provisional)

Cosines for orthonormal frames: for \mathbf{U} and \mathbf{V} with orthonormal columns, the cosines of the principal angles between their column spaces are the singular values of \mathbf{U}^{\mathsf{H}}\mathbf{V}: \cos \theta_k(\mathbf{U}, \mathbf{V}) = \sigma_k(\mathbf{U}^{\mathsf{H}}\mathbf{V}) for every k. [GolubVanLoan2013, §6.4.3]. Result: principal-angles

NLAlib.HasOrthonormalCols.cos_principalAngle.{u_1, u_2, u_3, u_4} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_2} {p : Type u_3} {q : Type u_4} [Fintype n] [Fintype p] [Fintype q] [DecidableEq p]
  [DecidableEq q] {U : Matrix n p 𝕜} {V : Matrix n q 𝕜} (hU : HasOrthonormalCols U)
  (hV : HasOrthonormalCols V) (k : ℕ) : Real.cos (principalAngle U V k) = singularValues (Uᴴ * V) k

Full source on GitHub

Import NLAlib.Matrix.Subspaces.PrincipalAngles.