NLA-lib Explorer

NLAlib.frobNorm_rangeProjector_sub_rangeProjector_sq

Library ยท theorem

For two subspaces of equal dimension, \|\mathbf{P}_{\mathbf{X}} - \mathbf{P}_{\mathbf{Y}}\|_{\mathsf{F}}^2 = 2 \sum_{j < \operatorname{rank} \mathbf{Y}} \sin^2 \theta_j(\mathbf{X}, \mathbf{Y}).

NLAlib.frobNorm_rangeProjector_sub_rangeProjector_sq.{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 ๐•œ} (h : X.rank = Y.rank) :
  frobNorm (rangeProjector X - rangeProjector Y) ^ 2 =
    2 * โˆ‘ j โˆˆ Finset.range Y.rank, Real.sin (principalAngle X Y j) ^ 2

Full source on GitHub

Import NLAlib.Matrix.Subspaces.PrincipalAngles.