NLA-lib Explorer

NLAlib.principalAngle

Library · def

The k-th principal angle \theta_k(\mathbf{X}, \mathbf{Y}) between the column spaces of \mathbf{X} and \mathbf{Y}, k = 0, 1, \dots, in non-decreasing order: the angle in [0, \pi/2] whose cosine is \sigma_k(\mathbf{P}_{\mathbf{X}}\mathbf{P}_{\mathbf{Y}}), the k-th singular value of the product of the two orthogonal projectors. For k at least the smaller of the two dimensions it is \pi / 2. [GolubVanLoan2013, §6.4.3]; [StewartSun1990, §I.5].

NLAlib.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] (X : Matrix n p 𝕜) (Y : Matrix n q 𝕜) (k : ℕ) :
  ℝ

Full source on GitHub

Import NLAlib.Matrix.Subspaces.PrincipalAngles.