MathLabs

Geometry

Riemannian geometry

Differential geometry on spaces equipped with a way to measure length and angle at every point, the language of general relativity.

IntuitionIntuition: geometry with no straight ruler

Imagine an ant living on a hilly landscape, or a rocket navigating curved spacetime: neither has access to a straight ruler or a flat sheet of graph paper, yet both can still measure short distances and small angles wherever they stand. Riemannian geometry builds an entire theory of length, angle, straightness and curvature out of nothing more than this local, infinitesimal ruler, attached smoothly to every point of a space. It is the mathematical language behind general relativity, where spacetime itself is curved, and behind any system — from robot arms to machine-learning models — whose natural configuration space bends rather than sitting flat.

3D saddle-shaped surface plot illustrating negative curvature.
A saddle surface z=x2−y2z = x^2 - y^2, the simplest local model of a negatively curved space: geodesics that start out parallel here spread apart faster and faster, the opposite of what happens on a positively curved sphere.

UndergraduateThe Riemannian metric: measuring length and angle at every point

Definition: Riemannian metric

A Riemannian metric gg on a smooth manifold MM smoothly assigns to each point an inner product on the tangent space at that point, letting you compute the length of tangent vectors and the angle between them. In local coordinates x1,…,xnx^1,\dots,x^n it is encoded by a symmetric, positive-definite matrix of functions gijg_{ij}, and the infinitesimal squared distance is written ds2=gij dxidxjds^2 = g_{ij}\,dx^i dx^j (Einstein summation over repeated indices).

ds2=gij dxidxjds^2 = g_{ij}\,dx^i dx^j

The length of a curve γ\gamma from aa to bb is then L(γ)=∫abgγ(t)(γ′(t),γ′(t)) dtL(\gamma) = \int_a^b \sqrt{g_{\gamma(t)}(\gamma'(t),\gamma'(t))}\,dt: exactly the same idea as adding up tiny straight-line steps, except each step is measured with the local ruler gg rather than a fixed global one. This single formula recovers ordinary Euclidean length when gg is constant, and recovers great-circle distance on a sphere, hyperbolic distance in the Poincaré disk, or proper time along a trajectory in relativity, depending on which metric you plug in.

L(γ)=∫abgγ(t)(γ′(t),γ′(t)) dtL(\gamma) = \int_a^b \sqrt{g_{\gamma(t)}(\gamma'(t),\gamma'(t))}\,dt

UndergraduateThe Levi-Civita connection and geodesics

Definition: Levi-Civita connection

To differentiate a vector field along a curve on a curved space, you need a rule for comparing tangent vectors at nearby points, called a connection ∇\nabla. The Levi-Civita connection is the unique connection that is torsion-free and compatible with the metric (parallel transport preserves lengths and angles). In coordinates it is given by the Christoffel symbols Γijk=12gkl(∂igjl+∂jgil−∂lgij)\Gamma^k_{ij} = \frac{1}{2}g^{kl}\left(\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}\right), built purely from the metric and its first derivatives, where gklg^{kl} is the inverse matrix of gklg_{kl}.

Γijk=12gkl(∂igjl+∂jgil−∂lgij)\Gamma^k_{ij} = \frac{1}{2}g^{kl}\left(\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}\right)

A geodesic is a curve that parallel-transports its own velocity, i.e. it goes 'as straight as possible' given the metric; it is the natural generalization of a straight line, and locally minimizes length between its endpoints. Written in coordinates, this condition becomes the geodesic equation d2xkdt2+Γijkdxidtdxjdt=0\dfrac{d^2 x^k}{dt^2} + \Gamma^k_{ij}\dfrac{dx^i}{dt}\dfrac{dx^j}{dt} = 0, a system of second-order ODEs whose solutions are determined uniquely by an initial point and initial velocity, exactly like Newton's second law with the Christoffel symbols acting as a velocity-dependent force.

d2xkdt2+Γijkdxidtdxjdt=0\frac{d^2 x^k}{dt^2} + \Gamma^k_{ij}\frac{dx^i}{dt}\frac{dx^j}{dt} = 0

AdvancedCurvature: Riemann, Ricci, and scalar

Definition: Riemann curvature tensor

The Riemann curvature tensor R(X,Y)Z=∇X∇YZ−∇Y∇XZ−∇[X,Y]ZR(X,Y)Z = \nabla_X\nabla_Y Z - \nabla_Y\nabla_X Z - \nabla_{[X,Y]}Z measures the failure of second covariant derivatives to commute, i.e. how much a vector changes when parallel-transported around a small closed loop spanned by XX and YY. Contracting it against two more vectors gives the sectional curvature K(X,Y)=⟨R(X,Y)Y,X⟩∣X∣2∣Y∣2−⟨X,Y⟩2K(X,Y) = \dfrac{\langle R(X,Y)Y,X\rangle}{|X|^2|Y|^2 - \langle X,Y\rangle^2}, the Gaussian curvature of the 2-dimensional slice through the surface tangent to the plane spanned by X,YX,Y — the direct generalization of the surface curvature from ordinary differential geometry to any dimension.

R(X,Y)Z=∇X∇YZ−∇Y∇XZ−∇[X,Y]ZR(X,Y)Z = \nabla_X\nabla_Y Z - \nabla_Y\nabla_X Z - \nabla_{[X,Y]}Z

Definition: Ricci and scalar curvature

The Ricci curvature Ric(Y,Z)=tr(X↦R(X,Y)Z)\mathrm{Ric}(Y,Z) = \mathrm{tr}\big(X \mapsto R(X,Y)Z\big) averages the sectional curvatures of all 2-planes containing a fixed direction, by tracing the Riemann tensor over one pair of indices; it is a symmetric bilinear form, just like the metric itself. Tracing once more with the metric gives the scalar curvature R=trg(Ric)R = \mathrm{tr}_g(\mathrm{Ric}), a single number at each point that summarizes the average curvature in every direction at once. Ricci curvature is the quantity that appears directly in Einstein's field equations of general relativity, and its sign controls how volumes of small balls grow or shrink compared to flat space.

Ric(Y,Z)=tr(X↦R(X,Y)Z),R=trg(Ric)\mathrm{Ric}(Y,Z) = \mathrm{tr}\big(X \mapsto R(X,Y)Z\big), \qquad R = \mathrm{tr}_g(\mathrm{Ric})
The three curvatures of a Riemannian manifold of dimension nn
CurvatureType of objectWhat it measures
Sectional K(X,Y)K(X,Y)A number for each 2-planeGaussian curvature of the 2-dimensional slice tangent to that plane
Ricci Ric(Y,Z)\mathrm{Ric}(Y,Z)A symmetric bilinear formAverage sectional curvature over all 2-planes through one direction
Scalar RRA single number at each pointAverage curvature over all directions at once, e.g. R=n(n−1)kR=n(n-1)k for constant curvature kk

AdvancedKey theorems: Hopf–Rinow and Myers

Let (M,g)(M,g) be a connected Riemannian manifold. The following are equivalent: (i) MM is geodesically complete, meaning every geodesic extends to a solution defined on all of R\mathbb{R}; (ii) MM is a complete metric space under the distance induced by gg; (iii) every closed and bounded subset of MM is compact. Moreover, when these hold, any two points of MM are joined by a minimizing geodesic.

Why is it true?

Completeness is the bridge between the local (an ODE that only guarantees a geodesic for a short time) and the global (a well-behaved space where distances behave like they do on a closed, bounded region of ordinary space, and where the shortest path you would draw by hand always actually exists).

Proof

(i) ⇒\Rightarrow existence of a minimizing geodesic: fix p,q∈Mp,q \in M and let r=d(p,q)r = d(p,q). The small metric sphere Sε(p)S_\varepsilon(p) is compact, so the continuous function x↦d(x,q)x \mapsto d(x,q) attains a minimum on it at some point x0=γ(ε)x_0 = \gamma(\varepsilon), where γ\gamma is the unit-speed geodesic from pp through x0x_0 (defined for all time by geodesic completeness). One shows d(γ(ε),q)=r−εd(\gamma(\varepsilon),q) = r-\varepsilon, and then extends this to the set A={t∈[0,r]:d(γ(t),q)=r−t}A = \{t \in [0,r] : d(\gamma(t),q) = r-t\}: AA is nonempty and closed by continuity, and repeating the same minimizing-sphere argument at γ(t0)\gamma(t_0) for any t0∈At_0 \in A with t0<rt_0<r shows AA is also open in [0,r][0,r], so A=[0,r]A=[0,r] and γ(r)=q\gamma(r)=q.

(i) ⇒\Rightarrow (ii): given a Cauchy sequence (xn)(x_n) in MM, the argument above shows any two points sufficiently close are joined by a minimizing geodesic whose length equals the distance between them; a closed metric ball around any fixed point is then the continuous image of a closed ball in TpMT_pM under the exponential map, hence compact, so the Cauchy sequence eventually lies in a compact set and converges.

(ii) ⇒\Rightarrow (iii): metric completeness together with local compactness (every Riemannian manifold is locally compact) implies that closed balls are totally bounded and complete, hence compact by the standard metric-space characterization of compactness; a general closed and bounded set is a closed subset of some closed ball, hence compact as a closed subset of a compact set.

(iii) ⇒\Rightarrow (i): suppose a unit-speed geodesic γ\gamma is only defined on a maximal interval [0,T)[0,T) with T<∞T<\infty. As t→T−t \to T^-, γ(t)\gamma(t) stays within the closed ball of radius TT about γ(0)\gamma(0), which is compact by (iii); a sequence γ(tn)\gamma(t_n) with tn→Tt_n \to T then has a convergent subsequence, and standard existence theory for the geodesic ODE (a second-order system with smooth coefficients) shows the solution extends smoothly past TT, contradicting maximality of TT. Hence every geodesic extends to all of R\mathbb{R}.

Let (Mn,g)(M^n,g) be a complete Riemannian manifold with Ric≥(n−1)k g\mathrm{Ric} \geq (n-1)k\,g for some constant k>0k>0 (every direction has Ricci curvature at least (n−1)k(n-1)k). Then MM is compact, diam(M)≤πk\mathrm{diam}(M) \leq \dfrac{\pi}{\sqrt{k}}, and its universal cover is compact, so π1(M)\pi_1(M) is finite.

Why is it true?

Positive Ricci curvature means geodesics converge on average, just as they do on a sphere; if this convergence is strong enough in every direction, a geodesic cannot keep minimizing distance forever — it eventually meets a conjugate point where a nearby geodesic catches up to it, which caps how far apart any two points can be.

Proof

By the Hopf–Rinow theorem, since MM is complete any two points are joined by a minimizing geodesic. Suppose toward a contradiction that some unit-speed minimizing geodesic γ:[0,L]→M\gamma:[0,L]\to M has length L>π/kL > \pi/\sqrt{k}.

Because γ\gamma minimizes length, the second variation (index form) satisfies I(V,V)≥0I(V,V) \geq 0 for every piecewise-smooth vector field VV along γ\gamma vanishing at both endpoints, where I(V,V)=∫0L(∣V′∣2−⟨R(V,γ′)γ′,V⟩)dtI(V,V) = \int_0^L \left(|V'|^2 - \langle R(V,\gamma')\gamma', V\rangle\right)dt. Choose a parallel orthonormal frame E1,…,En−1E_1,\dots,E_{n-1} along γ\gamma, everywhere orthogonal to γ′\gamma', and test with the fields Vi(t)=sin⁡(πt/L) Ei(t)V_i(t) = \sin(\pi t/L)\,E_i(t) for i=1,…,n−1i=1,\dots,n-1.

Since EiE_i is parallel, Vi′=πLcos⁡(πt/L)EiV_i' = \frac{\pi}{L}\cos(\pi t/L)E_i, so I(Vi,Vi)=∫0L[(πL)2cos⁡2(πt/L)−sin⁡2(πt/L)⟨R(Ei,γ′)γ′,Ei⟩]dtI(V_i,V_i) = \int_0^L\left[\left(\frac{\pi}{L}\right)^2\cos^2(\pi t/L) - \sin^2(\pi t/L)\langle R(E_i,\gamma')\gamma',E_i\rangle\right]dt. Summing over ii and using ∑i⟨R(Ei,γ′)γ′,Ei⟩=Ric(γ′,γ′)≥(n−1)k\sum_i \langle R(E_i,\gamma')\gamma',E_i\rangle = \mathrm{Ric}(\gamma',\gamma') \geq (n-1)k gives ∑iI(Vi,Vi)≤(n−1)∫0L[(πL)2cos⁡2(πt/L)−ksin⁡2(πt/L)]dt\sum_i I(V_i,V_i) \leq (n-1)\int_0^L\left[\left(\frac{\pi}{L}\right)^2\cos^2(\pi t/L) - k\sin^2(\pi t/L)\right]dt.

Since ∫0Lcos⁡2(πt/L) dt=∫0Lsin⁡2(πt/L) dt=L/2\int_0^L\cos^2(\pi t/L)\,dt = \int_0^L\sin^2(\pi t/L)\,dt = L/2, the right side equals (n−1)⋅L2[(πL)2−k](n-1)\cdot\frac{L}{2}\left[\left(\frac{\pi}{L}\right)^2 - k\right], which is strictly negative whenever L>π/kL > \pi/\sqrt{k}. So some I(Vi,Vi)<0I(V_i,V_i) < 0, contradicting that γ\gamma minimizes length. Hence every minimizing geodesic satisfies L≤π/kL \leq \pi/\sqrt{k}, so diam(M)≤πk\mathrm{diam}(M) \leq \dfrac{\pi}{\sqrt{k}}; by Hopf–Rinow, a complete manifold of finite diameter is compact, and the same argument applied to the universal cover (which inherits the same Ricci lower bound) shows it too is compact, forcing π1(M)\pi_1(M) to be finite.

AdvancedReal-World Applications and Worked Examples

Riemannian geometry is the language of general relativity: Einstein's field equations relate the Ricci curvature of spacetime (adjusted for the Lorentzian signature) to the matter and energy within it, and free-falling objects move along geodesics of this curved metric. Robotics and motion planning treat the space of joint angles or shapes as a Riemannian manifold, planning motions as geodesics that avoid obstacles or minimize energy. Information geometry places a Riemannian metric (the Fisher information metric) on the space of statistical models, and the resulting geodesics give the shortest statistical paths used in algorithms like natural gradient descent in machine learning. Shape analysis in computer vision treats outlines of objects as points on a Riemannian manifold, using geodesic distance to compare shapes.

Example: Constant curvature of the Poincaré half-plane

The Poincaré half-plane model has metric ds2=λ(x,y)2(dx2+dy2)ds^2 = \lambda(x,y)^2(dx^2+dy^2) with conformal factor λ(x,y)=1/y\lambda(x,y) = 1/y for y>0y>0. Using the standard formula K=−1λ2Δ(ln⁡λ)K = -\dfrac{1}{\lambda^2}\Delta(\ln\lambda) for the Gaussian curvature of a conformal metric in the plane, compute KK.

Solution

Write the logarithm of the conformal factor: since λ(x,y)=1/y\lambda(x,y) = 1/y, we have ln⁡λ=ln⁡(1/y)=−ln⁡y\ln\lambda = \ln(1/y) = -\ln y, a function of yy alone.

Differentiate twice with respect to yy: ∂y(−ln⁡y)=−1/y\partial_y(-\ln y) = -1/y, and then ∂y2(−ln⁡y)=1/y2\partial_y^2(-\ln y) = 1/y^2. Since ln⁡λ\ln\lambda does not depend on xx, the Laplacian is Δ(ln⁡λ)=∂x2(ln⁡λ)+∂y2(ln⁡λ)=0+1/y2=1/y2\Delta(\ln\lambda) = \partial_x^2(\ln\lambda) + \partial_y^2(\ln\lambda) = 0 + 1/y^2 = 1/y^2.

Substitute into the curvature formula: K=−1λ2Δ(ln⁡λ)K = -\dfrac{1}{\lambda^2}\Delta(\ln\lambda) with λ2=1/y2\lambda^2 = 1/y^2, giving K=−y2⋅1y2=−1K = -y^2 \cdot \dfrac{1}{y^2} = -1.

The yy-dependence cancels exactly, so K=−1K=-1 everywhere on the upper half-plane: the hyperbolic plane has constant negative curvature, unlike a sphere (constant positive curvature) or a flat plane (curvature zero).

Example: Ricci and scalar curvature of the sphere, and a Myers check

Using the fact that a space of constant sectional curvature kk has Riemann tensor Rijkl=k(gikgjl−gilgjk)R_{ijkl} = k(g_{ik}g_{jl}-g_{il}g_{jk}), compute the Ricci and scalar curvature of the unit sphere S2S^2, then check the diameter bound predicted by Myers' theorem.

Solution

The round sphere S2S^2 of radius 11 has constant sectional curvature k=1k=1, so its Riemann tensor takes the constant-curvature form Rijkl=k(gikgjl−gilgjk)R_{ijkl} = k(g_{ik}g_{jl}-g_{il}g_{jk}) with n=2n=2.

Tracing once gives the Ricci tensor Ric=(n−1)k g\mathrm{Ric} = (n-1)k\,g: with n=2n=2 and k=1k=1 this is Ric=(2−1)⋅1⋅g=g\mathrm{Ric} = (2-1)\cdot 1\cdot g = g, so every tangent direction has Ricci curvature exactly 11.

Tracing once more gives the scalar curvature R=n(n−1)kR = n(n-1)k: with n=2n=2 and k=1k=1 this is R=2⋅1⋅1=2R = 2\cdot 1\cdot 1 = 2.

Since Ric≥(n−1)k g\mathrm{Ric} \geq (n-1)k\,g holds with k=1k=1, Myers' theorem predicts diam(M)≤πk\mathrm{diam}(M) \leq \dfrac{\pi}{\sqrt{k}} becomes diam(S2)≤π/1=π\mathrm{diam}(S^2) \leq \pi/\sqrt{1} = \pi. This matches exactly: the geodesic distance between two antipodal points of the unit sphere, measured along a great circle, is precisely π\pi.

A complete Riemannian manifold satisfies Ric≥(n−1)k g\mathrm{Ric} \geq (n-1)k\,g with k=4k=4. What upper bound does Myers' theorem give for its diameter?

Which field of applied mathematics places a Riemannian metric (the Fisher information metric) on the space of statistical models, and uses its geodesics in optimization algorithms such as natural gradient descent?

A 3-dimensional space has constant sectional curvature k=2k=2. Using R=n(n−1)kR = n(n-1)k, what is its scalar curvature RR?

What two properties uniquely characterize the Levi-Civita connection ∇\nabla among all possible connections on a Riemannian manifold?

References

  1. Manfredo P. do Carmo (1992). Riemannian Geometry
  2. Grigori Perelman (2002). The entropy formula for the Ricci flow and its geometric applications · arXiv:math/0211159 [preprint, not peer-reviewed]
  3. Peter Topping (2006). Lectures on the Ricci Flow