research34 min studyLesson 916 in Mathematics

Optimization on spheres and Stiefel manifolds

Keep orthonormal frames feasible and distinguish the induced and canonical Stiefel metrics before computing gradients or steps.

On this page

What you’ll understand

  • Separate Stiefel tangent rotations from changes of the represented subspace.
  • Compare induced and canonical metric weights and gradient formulas.
  • Verify a polar retraction and its metric-qualified second-order property.

The unit sphere constrains one vector to have unit length; the Stiefel manifold constrains a matrix to have orthonormal columns. Their formulas are related, but the multi-column setting contains rotations inside the current frame as well as changes of its span. Different metrics weight these motions differently. A correct implementation must declare whether it uses the induced Frobenius metric or the canonical Stiefel metric, then pair that choice with compatible gradients, Hessians and retraction-order claims. Feasibility alone does not identify which geometric algorithm has been implemented.

Tangent matrices contain two types of motion

The real Stiefel manifold St(n,p) consists of n-by-p matrices with XᵀX=I, where 1≤p≤n. Its tangent matrices satisfy the skew-symmetry condition Xᵀη+ηᵀX=0. Decompose a tangent as XA+H, with A skew-symmetric and XᵀH=0. The first term rotates columns inside their current span; the second moves that span. The tangent dimension is np−p(p+1)/2. A sphere is the p=1 case, where the skew-symmetric one-by-one block vanishes.

For the induced metric, tangent inner products are Frobenius inner products, so an ambient objective gradient G becomes G−X sym(XᵀG). This is suitable for frame-sensitive objectives, such as matching labeled columns to specified reference vectors. An objective depending only on the span has an additional right-orthogonal symmetry and can instead be formulated on a Grassmann quotient. Conflating these problems can remove meaningful variables: a frame’s column labels matter for a general objective even though they are irrelevant to a subspace-only criterion.

TXSt(n,p)={η:X⊤η+η⊤X=0},η=XA+H,A⊤=−A,X⊤H=0,grad⁡Ef=G−Xsym⁡(X⊤G)T_X\mathrm{St}(n,p)=\{\eta:X^\top\eta+\eta^\top X=0\},\qquad\eta=XA+H,\quad A^\top=-A,\quad X^\top H=0,\qquad\operatorname{grad}_E f=G-X\operatorname{sym}(X^\top G)
The gradient formula uses the induced Frobenius metric. The decomposition isolates frame rotation and horizontal subspace motion.↔ Scroll wide equations horizontally.

Canonical and induced metrics weight rotations differently

The canonical Stiefel metric pairs ξ and η through I−XXᵀ/2 between their ambient factors. On the tangent decomposition, it gives one-half Frobenius weight to the skew frame-rotation block and full weight to the horizontal block. The induced metric gives full weight to both blocks. Thus they agree on horizontal directions but generally differ on frame rotations. Merely describing a Stiefel algorithm as Riemannian does not specify which of these geometries is intended.

For the canonical metric, the gradient corresponding to ambient G is G−XGᵀX. Its rotational component is twice the induced-gradient rotational component, matching the halved metric weight. Both satisfy the same differential identity when paired with their own metric. Their critical sets agree, but their norms and steps can differ. A Hessian or geodesic formula derived for one metric cannot be combined indiscriminately with the other gradient; this can change both the numerical method and the validity of a convergence argument.

gXC(ξ,η)=tr⁡(ξ⊤(I−12XX⊤)η),gXC(η,η)=12∥A∥F2+∥H∥F2,grad⁡Cf=G−XG⊤Xg_X^C(\xi,\eta)=\operatorname{tr}\bigl(\xi^\top(I-\tfrac12XX^\top)\eta\bigr),\qquad g_X^C(\eta,\eta)=\tfrac12\|A\|_F^2+\|H\|_F^2,\qquad\operatorname{grad}_C f=G-XG^\top X
The canonical formula applies to real Stiefel frames with XᵀX=I. Its half-weight on vertical frame rotations explains the gradient difference.↔ Scroll wide equations horizontally.

Polar normalization gives an explicit feasible update

For tangent η, the matrix X+η has Gram matrix I+ηᵀη, which is positive definite. Multiplying by its inverse square root gives the polar retraction Rₓ(η)=(X+η)(I+ηᵀη)⁻¹/². The output has orthonormal columns, and the first derivative at zero is the identity. Under the induced Frobenius geometry it is second order, because its initial ambient acceleration is −Xηᵀη, a normal matrix. This metric-qualified argument should not be silently recycled as a claim about a different connection.

A QR-based map with a consistent positive-diagonal convention also gives a local smooth retraction, but is generally only first order for the induced metric. Polar and QR updates can therefore have different pullback Hessians away from stationary points. In floating-point calculations, one should monitor XᵀX−I and the tangent constraint residual, while distinguishing these feasibility checks from a gradient or optimality certificate. An orthonormal matrix can be a saddle, a maximum, or far from any critical point of the objective.

A frame rotation receives two metric weights

At X=[e₁,e₂] in St(3,2), take tangent G=[[0,−1],[1,0],[2,0]]. Compare its induced and canonical squared norms, and compute both gradients of an objective with this ambient gradient at X.

  1. The top block A=[[0,−1],[1,0]] is skew-symmetric, with squared Frobenius norm two. The horizontal bottom row has squared norm four. Hence G is tangent, with induced squared norm six and canonical squared norm five.

  2. The induced gradient is G itself, since its top block is already skew. The canonical gradient doubles that rotational block, giving [[0,−2],[2,0],[2,0]].

  3. Pairing the canonical gradient with G in the canonical metric gives one-half times the rotational pairing four plus horizontal pairing four, totaling six. This equals the ambient differential tr(GᵀG), as required.

The result

The metric change alters the gradient while preserving its representation of the differential. Raw equality of the two gradient matrices is not expected.

Explore the model

Interactive lab

Interactive lab · matrix

Unit determinant does not mean orthonormal columns

Pause and Reset, then set scale a=1,shear b=1. Predict Gram matrix [[1,1],[1,2]], determinant one, and condition number (3+√5)/2. For a fresh comparison Reset and set a=1,b=0; predict Gram matrix I and condition number one. The first matrix preserves area but is not a Stiefel frame. The instrument displays this fixed triangular family and its final-matrix readouts; it does not perform a polar or QR retraction.

Unit determinant does not mean orthonormal columnsThe selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Current readings: Area scale · det A: 1.4; Singular values · σmax, σmin: 1.597, 0.876; Condition number · κ₂(A): 1.823. All parameters are adjustable with the labeled controls below.Matrix A with first row 1.4, 0.6 and second row zero, one; display interpolates between identity and A while final determinant remains 1.4.−4−2024−2−1012x · equal geometric scaleyA = [ 1.4 0.6 ; 0 1 ]Display blend: 0% · final values below
Interpolated geometryOriginal unit squareSelected final transform
Area scale · det A
1.4
Singular values · σmax, σmin
1.597, 0.876
Condition number · κ₂(A)
1.823
t = 0 s

The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. 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 forFeasibility of an orthonormal frame requires a Gram identity, not merely a determinant or volume check.

Check your understanding

Where do the induced and canonical Stiefel metrics agree under the stated formulas?

Try it yourself

For X=[e₁,e₂] in St(3,2), use η whose only nonzero entry is η₃₁=3/4. Compute the polar retraction explicitly and verify its Gram matrix.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The two columns of X+η are orthogonal, and the first has norm 5/4.

Compare with the solution

The Gram matrix I+ηᵀη is diag(25/16,1), whose inverse square root is diag(4/5,1). The polar update therefore has columns (4/5,0,3/5) and (0,1,0). Each has unit norm and their inner product is zero, so the output lies in St(3,2). This η is horizontal, where the two metrics’ tangent norms agree; the stated second-order retraction justification was specifically for the induced metric.

Take it with you

  • A Stiefel tangent separates internal frame rotations from subspace changes.
  • The canonical metric halves rotational weight relative to the induced metric.
  • Polar and QR feasibility updates need their own smoothness and retraction-order qualifications.

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.