NLA-lib Explorer

Cosines for orthonormal frames

Library ยท Result group

Theorem (HasOrthonormalCols.cos_principalAngle). 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].

Headline (provisional)

Lean statement and details
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

Copy link

Other forms

Theorem (HasOrthonormalCols.singularValues_tangentMatrix). Tangents of the principal angles. For \mathbf{U} with orthonormal columns and any \mathbf{Y} with the same number \lvert p \rvert of columns and \mathbf{U}^{\mathsf{H}}\mathbf{Y} invertible, the singular values of the tangent matrix \mathbf{T} are the tangents of the principal angles, in reverse order: \sigma_i(\mathbf{T}) = \tan \theta_j(\mathbf{U}, \mathbf{Y}) for i + j + 1 = \lvert p \rvert. [GolubVanLoan2013, ยง8.2.4 (proof of Theorem 8.2.2)]; [Saad2011, ยง5.2].

General form: sizes are index types

Lean statement and details
NLAlib.HasOrthonormalCols.singularValues_tangentMatrix.{u_1, u_2, u_3} {๐•œ : Type u_1} [RCLike ๐•œ]
  {n : Type u_2} {p : Type u_3} [Fintype n] [Fintype p] [DecidableEq n] [DecidableEq p]
  {U : Matrix n p ๐•œ} (hU : HasOrthonormalCols U) {Y : Matrix n p ๐•œ} (hY : IsUnit (Uแดด * Y)) {i j : โ„•}
  (hij : i + j + 1 = Fintype.card p) :
  singularValues (tangentMatrix U Y) i = Real.tan (principalAngle U Y j)

Full source on GitHub

Copy link

Theorem (singularValues_one_sub_rangeProjector_mul_rangeProjector). Sines of the principal angles: the singular values of (\mathbf{I} - \mathbf{P}_{\mathbf{X}})\mathbf{P}_{\mathbf{Y}}, in reverse order: \sigma_i((\mathbf{I} - \mathbf{P}_{\mathbf{X}})\mathbf{P}_{\mathbf{Y}}) = \sin \theta_j(\mathbf{X}, \mathbf{Y}) for i + j + 1 = \operatorname{rank} \mathbf{Y}. [GolubVanLoan2013, ยง2.5.3]; [StewartSun1990, Theorem I.5.5].

Lean statement and details
NLAlib.singularValues_one_sub_rangeProjector_mul_rangeProjector.{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 n] (X : Matrix n p ๐•œ) (Y : Matrix n q ๐•œ) {i j : โ„•} (hij : i + j + 1 = Y.rank) :
  singularValues ((1 - rangeProjector X) * rangeProjector Y) i = Real.sin (principalAngle X Y j)

Full source on GitHub

Copy link

Theorem (specNorm_one_sub_rangeProjector_mul_rangeProjector). The largest principal angle as a distance: \|(\mathbf{I} - \mathbf{P}_{\mathbf{X}})\mathbf{P}_{\mathbf{Y}}\|_2 = \sin \theta_j(\mathbf{X}, \mathbf{Y}) for j + 1 = \operatorname{rank} \mathbf{Y}, the sine of the largest principal angle counted up to the dimension of the column space of \mathbf{Y}. [GolubVanLoan2013, ยง2.5.3].

Lean statement and details
NLAlib.specNorm_one_sub_rangeProjector_mul_rangeProjector.{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 n] (X : Matrix n p ๐•œ) (Y : Matrix n q ๐•œ) {j : โ„•} (hj : j + 1 = Y.rank) :
  specNorm ((1 - rangeProjector X) * rangeProjector Y) = Real.sin (principalAngle X Y j)

Full source on GitHub

Copy link

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k โ‰ฅ 1.