Grassmann geometry and subspace learning
Optimize a subspace rather than a labeled frame and express stationarity through a basis-invariant eigenvector residual.
On this page
The question for today
What you’ll understand
- Represent a Grassmann point by an orthonormal basis modulo right rotations.
- Compute the horizontal gradient of a trace subspace objective.
- Interpret tangent Hessian eigenvalues as selected-versus-unselected spectral gaps.
Subspace learning often identifies a span rather than a particular orthonormal basis. Rotating the basis leaves the represented model unchanged, so optimization on a full Stiefel frame introduces redundant directions. The Grassmann manifold removes that redundancy and makes gradients and curvature refer to changes of span. For symmetric eigenvalue problems, its geometry gives a clean residual-based stationarity test and a Hessian controlled by spectral gaps. These statements depend on a basis-invariant objective and a consistent quotient metric, not merely on storing an orthonormal matrix.
A point is an equivalence class of frames
The real Grassmann manifold Gr(n,p) contains p-dimensional linear subspaces of Rⁿ. An orthonormal basis X represents one point, and XQ represents the same point for any orthogonal p-by-p matrix Q. Equivalently, the subspace is represented by its rank-p orthogonal projector XXᵀ, which is unchanged by that right action. A function on Grassmann must therefore satisfy F(XQ)=F(X). A cost that rewards one labeled column differently from another may fail this condition and belongs on a frame space instead.
Vertical Stiefel directions XΩ, with Ω skew-symmetric, rotate the basis without changing the quotient point. Horizontal tangent representatives satisfy Xᵀη=0 and encode genuine subspace changes. The standard Grassmann metric is the Frobenius pairing of these horizontal lifts. The induced and canonical Stiefel metrics agree on this horizontal space, making that common quotient metric unambiguous here. A horizontal lift changes equivariantly when the basis is rotated, while its quotient vector, length and directional effect remain the same.
Trace objectives expose the invariant residual
For a real symmetric A, minimizing F([X])=−tr(XᵀAX)/2 finds a top p-dimensional eigenspace. The ambient gradient is −AX, and its horizontal projection is −(I−XXᵀ)AX. This vanishes exactly when the represented subspace is invariant under A. Changing X to XQ rotates the gradient lift by Q and preserves its Frobenius norm. Consequently the residual norm is a legitimate subspace stationarity measure, unlike a coordinate comparison that depends on a chosen basis orientation.
At an invariant subspace, the Hessian sends a horizontal η to −(I−XXᵀ)Aη+η(XᵀAX). In a selected eigenbasis, perturbations that mix a selected eigenvector with an unselected one have curvature equal to selected minus unselected eigenvalue. Positive gaps characterize the isolated top-subspace minimum. Repeated eigenvalues across the selection boundary produce flat directions and nonuniqueness. Eigenvalue multiplicities inside the selected subspace do not themselves create different Grassmann points, since basis rotations inside the same span have already been quotiented out.
Learning algorithms must respect basis changes
Principal-component subspaces and several spectral relaxation problems fit this objective, but noisy data or nonlinear losses can produce different landscapes. One should first verify right-orthogonal invariance before using quotient formulas. Comparing two basis matrices directly by their Frobenius difference is not an invariant subspace error: a sign change or column rotation can make that difference large while leaving the subspace exactly unchanged. Projector differences or principal angles provide invariant alternatives, with their own normalization conventions.
A retraction on the representative frames must also be compatible with the right action so its equivalence class defines a quotient update. Polar normalization has this equivariance. Implementations can fix a convenient basis after each step, but the gradient and transported directions must transform consistently if that gauge changes. Quotient geometry removes artificial flat frame directions; it does not eliminate small genuine eigengaps or data-induced conditioning. Rate statements still depend on those gaps, smoothness bounds and the algorithmic step rule.
Work it through
A noncritical line can have the same value as an eigenline
Let A=diag(5,3,1), p=1 and X=(e₁+e₃)/√2. Compute its Grassmann objective, gradient lift and norm. Compare the representation −X.
The Rayleigh value is (5+1)/2=3, so the negative-half trace objective is −3/2. Its projector has entries 1/2 in positions (1,1),(1,3),(3,1),(3,3) and zeros elsewhere.
The residual AX−3X is √2(e₁−e₃). Therefore the gradient is −√2e₁+√2e₃, tangent horizontally and of norm two. This line is not invariant and is not critical.
Replacing X by −X leaves the projector and objective unchanged and negates the gradient lift. Its norm remains two, representing the same quotient tangent vector in the changed basis.
Basis sign changes are gauge changes. The objective value −3/2 alone cannot certify stationarity: the eigenline e₂ has that same value but zero residual.
The living notebook
Explore the model
Interactive lab · vectors
Opposite vectors represent one unoriented line
Pause and Reset, then set angle=45°,magnitude=1. Predict projector entries all equal 1/2 for the represented line. For a fresh comparison Reset and set angle=−135°,magnitude=1; the displayed vector changes sign but its outer-product projector is identical. With A=diag(5,1), both representatives have Rayleigh value three. The lab draws a vector rather than a Grassmann point, so the projector and objective are computed from its shown coordinates.
- x component
- 1.393
- y component
- 0.975
- Magnitude
- 1.7
Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forAn ambient representative may change dramatically while the represented subspace is unchanged.
Pause & reason
Check your understanding
Your turn
Try it yourself
Take A=diag(7,4,1), p=2 and X=[e₁,e₂]. For horizontal η=e₃[a,b], compute the Grassmann Hessian action and its smallest eigenvalue. Explain what happens to internal basis rotations.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use XᵀAX=diag(7,4) and Aη=η because η lies in the e₃ direction.
Compare with the solution
The Hessian is −η+η diag(7,4)=e₃[6a,3b]. Thus its horizontal eigenvalues are six and three, and the smallest is three, the gap between the second selected eigenvalue four and the unselected eigenvalue one. This gives a positive-definite quotient Hessian at the top two-dimensional subspace. Internal rotations XΩ are vertical gauge directions and are not Grassmann tangent variables; their artificial flatness in a redundant frame representation does not contradict quotient definiteness.
Keep the idea
Take it with you
- Grassmann points are subspaces, with orthonormal bases related by right rotations.
- The horizontal residual measures stationarity independently of the chosen basis.
- Selected-versus-unselected eigengaps control genuine quotient curvature.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.