Documentation

TauCeti.Analysis.InnerProductSpace.Projection.PrincipalAngle

Principal angles between two subspaces #

For subspaces U and V of an inner product space with orthogonal projections P_U and P_V, the relative position of U and V is recorded by the two cross-projections

together with the double-angle operator 2 P_{Uᗮ} P_V P_U, the off-diagonal U → Uᗮ block of 2 P_V, in which sin 2Θ bounds are stated.

In finite dimension the singular values of the cosine map and of the directed sine map are the principal cosines and the principal sines of U and V, each listed in nonincreasing order and padded with zeros, and the principal angles are the arcsines of the principal sines, so they lie in [0, π/2]. These are the quantities in which perturbation bounds for spectral subspaces (the Davis–Kahan sin Θ theorems) are stated; the operator norm of the directed sine map is the directed gap Submodule.directedProjectionGap U V.

The map Submodule.sinThetaEmbedding Z U restricts the directed sine projection to a subspace Z, so it has source Z rather than the ambient space. Its singular values are the directed principal sines, including the zero tail.

The principal cosines are symmetric in U and V. The principal sines are symmetric only when U and V have the same finite dimension (Submodule.principalSines_comm), the main result of this file. Without the dimension hypothesis the statement fails: for a line U inside a plane V, all principal sines of U and V vanish but one principal sine of V and U is 1.

When U is the range of an isometry X : F →L[𝕜] E, for instance the trial map of the Rayleigh–Ritz procedure, the angles are read off X directly: the sine embedding P_{Vᗮ} X and the cosine embedding P_V X have as singular values the principal sines and cosines of U and V, and the operator norm of the sine embedding is the directed gap from U to V.

Main definitions #

Main results #

References #

The cross-projections #

noncomputable def Submodule.cosThetaMap {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (U V : Submodule 𝕜 E) [U.HasOrthogonalProjection] [V.HasOrthogonalProjection] :
E →L[𝕜] E

The cosine map P_V P_U of two subspaces with orthogonal projections.

Instances For
    noncomputable def Submodule.sinThetaMap {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (U V : Submodule 𝕜 E) [U.HasOrthogonalProjection] [V.HasOrthogonalProjection] :
    E →L[𝕜] E

    The directed sine map P_{Vᗮ} P_U of two subspaces with orthogonal projections: it keeps the component orthogonal to V of the projection of a vector onto U.

    Instances For
      @[simp]

      The cosine and sine maps split the projection onto U: P_V P_U + P_{Vᗮ} P_U = P_U.

      The operator norm of the directed sine map is the directed gap from U to V.

      @[simp]

      The cosine map vanishes exactly when U and V are orthogonal.

      @[simp]

      The directed sine map vanishes exactly when U ≤ V.

      @[simp]
      theorem Submodule.sinThetaMap_self {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (U : Submodule 𝕜 E) [U.HasOrthogonalProjection] :

      The double-angle operator #

      noncomputable def Submodule.sinTwoAngleOperator {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (U V : Submodule 𝕜 E) [U.HasOrthogonalProjection] [V.HasOrthogonalProjection] :
      E →L[𝕜] E

      The double-angle operator 2 P_{Uᗮ} P_V P_U of two subspaces with orthogonal projections: the off-diagonal U → Uᗮ block of 2 P_V relative to E = U ⊕ Uᗮ. It is the operator in which sin 2Θ perturbation bounds for spectral subspaces are stated.

      Instances For

        The double-angle operator is twice the directed sine map from V to U composed with the cosine map from U to V: 2 P_{Uᗮ} P_V P_U = 2 (P_{Uᗮ} P_V) (P_V P_U).

        The double-angle operator is a contraction: ‖2 P_{Uᗮ} P_V P_U‖ ≤ 1, the operator form of sin 2θ ≤ 1.

        The double-angle operator vanishes when U ≤ V.

        The double-angle operator vanishes when U and V are orthogonal.

        @[simp]

        The double-angle operator vanishes exactly when the orthogonal projections onto U and V commute.

        Principal cosines, sines and angles #

        In a finite-dimensional space every submodule has an orthogonal projection (Submodule.HasOrthogonalProjection.ofCompleteSpace), so the principal cosines, sines and angles take their two subspaces without that hypothesis.

        noncomputable def Submodule.principalCosines {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

        The principal cosines of U and V: the singular values of the cosine map P_V P_U, in nonincreasing order and padded with zeros.

        Instances For
          noncomputable def Submodule.principalSines {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

          The principal sines of U and V: the singular values of the directed sine map P_{Vᗮ} P_U, in nonincreasing order and padded with zeros.

          Instances For
            noncomputable def Submodule.principalAngles {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

            The principal angles of U and V: the arcsines of the principal sines. They lie in [0, π/2] and are listed in nonincreasing order.

            Instances For
              theorem Submodule.principalCosines_def {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              theorem Submodule.principalSines_def {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              theorem Submodule.principalAngles_apply {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalCosines_nonneg {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalSines_nonneg {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalCosines_le_one {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalSines_le_one {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalCosines_antitone {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              theorem Submodule.principalSines_antitone {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              theorem Submodule.principalAngles_antitone {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              theorem Submodule.principalAngles_nonneg {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              theorem Submodule.principalAngles_le_pi_div_two {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :
              @[simp]
              theorem Submodule.sin_principalAngles {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (i : ℕ) :

              The sine of the i-th principal angle is the i-th principal sine.

              theorem Submodule.principalSines_zero {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

              The largest principal sine from U to V is the directed gap ‖P_{Vᗮ} P_U‖.

              theorem Submodule.forall_principalSines_lt_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) {c : ℝ} :
              (∀ (i : ℕ), (U.principalSines V) i < c) ↔ U.directedProjectionGap V < c

              All principal sines from U to V are below c exactly when the largest one, the directed gap ‖P_{Vᗮ} P_U‖, is.

              theorem Submodule.principalCosines_of_finrank_le {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) {i : ℕ} (hi : Module.finrank 𝕜 ↥U ≤ i) :

              There are at most dim U nonzero principal cosines.

              theorem Submodule.principalSines_of_finrank_le {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) {i : ℕ} (hi : Module.finrank 𝕜 ↥U ≤ i) :
              (U.principalSines V) i = 0

              There are at most dim U nonzero principal sines.

              theorem Submodule.principalAngles_of_finrank_le {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) {i : ℕ} (hi : Module.finrank 𝕜 ↥U ≤ i) :
              (U.principalAngles V) i = 0

              There are at most dim U nonzero principal angles.

              @[simp]
              theorem Submodule.principalCosines_eq_zero_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

              The principal cosines of U and V all vanish exactly when U and V are orthogonal.

              @[simp]
              theorem Submodule.principalSines_eq_zero_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

              The principal sines of U and V all vanish exactly when U ≤ V.

              @[simp]
              theorem Submodule.principalAngles_eq_zero_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

              The principal angles of U and V all vanish exactly when U ≤ V.

              @[simp]
              theorem Submodule.principalSines_self {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U : Submodule 𝕜 E) :
              @[simp]
              theorem Submodule.principalAngles_self {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U : Submodule 𝕜 E) :

              The principal angles of a subspace with itself vanish.

              theorem Submodule.principalCosines_comm {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :

              The principal cosines are symmetric in the two subspaces.

              Symmetry of the principal sines #

              theorem Submodule.principalSines_comm {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (h : Module.finrank 𝕜 ↥U = Module.finrank 𝕜 ↥V) :

              Equal-rank symmetry of the principal sines. For subspaces of the same dimension, the principal sines of U and V are those of V and U.

              theorem Submodule.principalAngles_comm {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) (h : Module.finrank 𝕜 ↥U = Module.finrank 𝕜 ↥V) :

              Equal-rank symmetry of the principal angles. For subspaces of the same dimension, the principal angles of U and V are those of V and U.

              Right principal angles #

              theorem Submodule.ncard_ofPred_principalAngles_eq_pi_div_two {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              {i : ℕ | (U.principalAngles V) i = Real.pi / 2}.ncard = Module.finrank 𝕜 ↥(U ⊓ Vᗮ)

              Counting right principal angles. The number of principal angles from U to V equal to π/2 is the dimension of U ⊓ Vᗮ, the subspace of vectors of U orthogonal to V.

              theorem Submodule.forall_principalAngles_lt_pi_div_two_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              (∀ (i : ℕ), (U.principalAngles V) i < Real.pi / 2) ↔ Disjoint U Vᗮ

              All principal angles from U to V are strictly below π/2 exactly when no nonzero vector of U is orthogonal to V.

              theorem Submodule.forall_principalAngles_lt_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) {θ : ℝ} (hθ : θ ∈ Set.Icc (-(Real.pi / 2)) (Real.pi / 2)) :
              (∀ (i : ℕ), (U.principalAngles V) i < θ) ↔ U.directedProjectionGap V < Real.sin θ

              For a threshold θ ∈ [-π/2, π/2], all principal angles from U to V are strictly below θ exactly when the directed gap ‖P_{Vᗮ} P_U‖, the largest principal sine, is less than sin θ.

              All principal angles from U to V are strictly below π/2 exactly when the directed gap ‖P_{Vᗮ} P_U‖, the largest principal sine, is less than 1.

              In finite dimension, the directed gap ‖P_{Vᗮ} P_U‖ from U to V is less than 1 exactly when no nonzero vector of U is orthogonal to V.

              theorem Submodule.forall_principalAngles_lt_pi_div_four_iff {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] (U V : Submodule 𝕜 E) :
              (∀ (i : ℕ), (U.principalAngles V) i < Real.pi / 4) ↔ U.directedProjectionGap V < √2 / 2

              All principal angles from U to V are strictly below π/4 exactly when the directed gap ‖P_{Vᗮ} P_U‖ is less than √2/2.

              Angles of the range of an isometry #

              The operator norm of the sine embedding P_{Vᗮ} X of an isometry X is the directed gap from range X to V.

              theorem Submodule.principalCosines_range_eq_singularValues {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [FiniteDimensional 𝕜 F] {X : F →L[𝕜] E} (V : Submodule 𝕜 E) (hX : Isometry ⇑X) :

              The principal cosines of the range of an isometry X and of V are the singular values of the cosine embedding P_V X.

              theorem Submodule.principalSines_range_eq_singularValues {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [FiniteDimensional 𝕜 F] {X : F →L[𝕜] E} (V : Submodule 𝕜 E) (hX : Isometry ⇑X) :

              The principal sines of the range of an isometry X and of V are the singular values of the sine embedding P_{Vᗮ} X.

              Directed sine embedding of a subspace #

              noncomputable def Submodule.sinThetaEmbedding {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (Z U : Submodule 𝕜 E) [U.HasOrthogonalProjection] :
              ↥Z →L[𝕜] E

              The directed sine embedding from Z to U: orthogonally project Z onto Uᗮ, viewed as a map into the ambient space.

              Instances For

                The directed sine embedding is orthogonal projection onto Uᗮ composed with the inclusion of Z into E.

                @[simp]
                theorem Submodule.sinThetaEmbedding_apply {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (Z U : Submodule 𝕜 E) [U.HasOrthogonalProjection] (x : ↥Z) :

                The directed sine embedding acts by projection onto Uᗮ.

                The singular values of the directed sine embedding are the principal sines from Z to U, including the zero tail. No equality of subspace ranks is required.

                The ambient adjoint of the trial map acts on a sine left singular vector by the same singular relation, including at a zero singular value.

                Adapted from the Kitware DKPS formalization, DavisKahan/FiniteDimensional/TanTheta/RitzResidual.lean (Jon Crall and GPT 5.6 High; Apache-2.0).

                @[simp]

                Each Ritz vector X vᵢ is orthogonal to the unnormalized residual direction y_j - σ_j • X v_j.

                For nonzero sines, the unnormalized residual directions yᵢ - σᵢ • X vᵢ are pairwise orthogonal, with squared norm 1 - σᵢ².