Introduction to Differential Geometry

The last two articles were about topology and calculus. Bundles that twist, forms that integrate, and Stokes' theorem tying them together. None of it could measure anything. The integral \( \oint d\theta = 2\pi \) counts how many times you went around the hole, but it can't tell you how far you walked. Nothing on those two pages can compute a length, an angle, or decide whether a surface is flat or curved.

This page adds the one piece of equipment that does all of that, the metric, and then builds the tools that come with it: tensors, connections, covariant derivatives, and curvature. At the end we point the tools at the Schwarzschild metric, the simplest black hole in General Relativity, work out how it bends light, and render what the stars look like from nearby. The figures are not illustrations. Each one runs the calculation from the text next to it, and the black hole at the bottom is drawn by integrating the same equation you will derive a few sections before it.

In the bundles article, Gauss discovered that geometry can be done from inside: a surveyor confined to a surface can find its curvature with a tape measure and never leave. The metric is the tape measure.

The metric

A metric \( g \) on a manifold \( M \) gives each point \( p \) an inner product on the tangent space: a map \( g_p : T_pM \times T_pM \to \mathbb{R} \) that is bilinear, symmetric, and positive definite (\( g_p(v,v) > 0 \) for \( v \neq 0 \)). Compare this to the 2-form from last time. A 2-form also eats two vectors and is also bilinear, but it is antisymmetric: \( \omega(v,w) = -\omega(w,v) \). A 2-form measures signed area. A metric is symmetric: \( g(v,w) = g(w,v) \), and it measures length and angle. Symmetric versus antisymmetric is the entire difference between "how big is this parallelogram" and "how long is this arrow".

Length and angle come straight from the inner product, the same way they do in linear algebra: \[ |v| = \sqrt{g(v,v)}, \qquad \cos\alpha = \frac{g(v,w)}{|v|\,|w|} \] And the length of a curve \( \gamma : [a,b] \to M \) is the integral of the speed: \[ L(\gamma) = \int_a^b \sqrt{g\big(\gamma'(t), \gamma'(t)\big)}\, dt \]

In coordinates \( x^1, \dots, x^n \), a metric is written \[ g = g_{ij}\, dx^i\, dx^j \] with the summation convention: any index that appears once up and once down is summed over, so this is short for \( \sum_{i,j} g_{ij}\, dx^i dx^j \). The \( g_{ij} \) form a symmetric matrix of functions, and \( dx^i dx^j \) is the symmetric product of the 1-forms \( dx^i \) and \( dx^j \). Note the contrast with the wedge: \( dx \wedge dx = 0 \), but \( dx\, dx = dx^2 \) is the thing that squares the \( x \)-component of a vector. Physicists write the metric as a "line element" \( ds^2 \), and it means the same thing. Some examples:

Playing with metrics

The figure below draws a coordinate chart, and a chart is a picture of the coordinates, not of the space. The metric is what tells you how much the picture lies. At each grid point, the small ellipse is the set of tangent vectors of one fixed length as measured by \( g \). In the flat metric they are circles. In polar coordinates they get squashed horizontally as \( r \) grows, since a step in \( \theta \) is worth more there. In the hyperbolic half-plane they grow with \( y \), since everything near the axis is far apart.

Two paths join \( A \) to \( B \): the straight segment in the chart, and a circular arc. Drag the slider to walk them and watch the length accumulate. The readout also computes the angle between the path's velocity and the coordinate vector \( \partial_x \) using \( g \), next to the angle you see on screen. In the flat case they agree. Otherwise they don't, and the metric is the one that's right.

   
 
Length \( \int \sqrt{g(\gamma',\gamma')}\,dt \) along a path, in three metrics. The ellipses show what "one unit of length" looks like in the chart at each point. In the hyperbolic case, the arc is centered on the \( x \)-axis, and it comes out shorter than the straight line.

The hyperbolic arc beating the straight line is not a bug. In the half-plane, the shortest paths are semicircles centered on the \( x \)-axis, and "straight in the chart" is not straight in the geometry. Which raises the question this page is really about: what does "straight" mean once the metric is not the identity? We'll answer it with the connection, two sections from now.

Tensors

You have now seen three kinds of machine that eat tangent vectors and return numbers: a 1-form takes one vector, a 2-form takes two and is antisymmetric, a metric takes two and is symmetric. A tensor is the general version. A tensor of type \( (p, q) \) at a point is a multilinear map that takes \( q \) tangent vectors and \( p \) covectors (elements of the dual space \( T_p^*M \), the same space the 1-forms live in) and returns a number. A vector is a \( (1,0) \) tensor, a 1-form is \( (0,1) \), the metric is \( (0,2) \), a \( k \)-form is an antisymmetric \( (0,k) \) tensor. In coordinates a tensor is an array of numbers with \( p \) upper indices and \( q \) lower ones, \( T^{i_1 \cdots i_p}{}_{j_1 \cdots j_q} \), and you get the array by feeding the machine the coordinate basis vectors \( \partial_i \) and covectors \( dx^j \): \[ g_{ij} = g(\partial_i, \partial_j) \] That is the sense in which \( g_{ij} \) "is" the metric.

The reason for all the indices is the transformation rule. Change coordinates from \( x \) to \( \tilde{x} \), and every upper index picks up a factor of the Jacobian \( \partial \tilde{x}^i / \partial x^k \), while every lower index picks up the inverse Jacobian. For the metric: \[ \tilde{g}_{ij} = \frac{\partial x^k}{\partial \tilde{x}^i} \frac{\partial x^l}{\partial \tilde{x}^j}\, g_{kl} \] The polar coordinate calculation above was exactly this rule with \( g_{kl} = \delta_{kl} \). An array of numbers with indices that transforms this way is a tensor. An array that doesn't isn't, no matter how many indices it has, and the next section has the famous example.

The metric does one more job. Since \( g_p \) is nondegenerate, it identifies \( T_pM \) with its dual: a vector \( v \) becomes the 1-form \( g(v, \cdot) \). In indices this is lowering, \( v_i = g_{ij} v^j \), and the inverse matrix \( g^{ij} \) does raising, \( \omega^i = g^{ij} \omega_j \). This is the missing entry in the dictionary from the forms article. There, on \( \mathbb{R}^3 \), we converted the 1-form \( df \) into the vector \( \nabla f \) without comment. The conversion was the metric, which for the identity matrix is invisible. On a curved space the gradient is \[ (\nabla f)^i = g^{ij}\, \partial_j f \] and the \( g^{ij} \) does not go away.

Connections and moving frames

A vector field \( W \) assigns a vector \( W_p \in T_pM \) to every point, and we'd like to differentiate it in the direction \( v \). The obvious formula \[ \frac{W_{p + \varepsilon v} - W_p}{\varepsilon} \] does not make sense. \( W_{p+\varepsilon v} \) lives in the tangent space at \( p + \varepsilon v \), and \( W_p \) lives in the tangent space at \( p \). These are different fibers of the tangent bundle, and a bundle comes with no rule for subtracting a vector in one fiber from a vector in another. Every fiber is a copy of the same space, that's what a bundle is, but a copy is not an identification. The fibers over \( p \) and \( q \) are both isomorphic to \( \mathbb{R}^n \), and there are many isomorphisms between them, and the bundle doesn't prefer one. On \( \mathbb{R}^n \) you never noticed, because there is a preferred one: translation. Slide a vector from \( p \) to \( q \) and everyone agrees on the result. On a sphere there is no translation. A connection is the missing rule, a preferred way of identifying neighboring fibers so that vectors in them can be compared.

Cartan's way in is the method of moving frames. Instead of the coordinate vectors \( \partial_i \), which have no fixed length, carry a ruler. An orthonormal frame on a surface is a pair of vector fields \( e_1, e_2 \) with \( g(e_a, e_b) = \delta_{ab} \): at every point, two perpendicular unit vectors. The dual 1-forms \( \theta^1, \theta^2 \), with \( \theta^a(e_b) = \delta^a_b \), are the coframe, and in terms of them the metric is just \[ g = (\theta^1)^2 + (\theta^2)^2 \] so you can read the coframe straight off the line element. Polar plane: \( \theta^1 = dr \), \( \theta^2 = r\, d\theta \). Sphere: \( \theta^1 = R\, d\theta \), \( \theta^2 = R\sin\theta\, d\phi \). Hyperbolic half-plane: \( \theta^1 = dx/y \), \( \theta^2 = dy/y \). The frame is "moving" because it turns from point to point, and a connection is a record of how.

Here is the record. As you move in a direction \( v \), each frame vector changes by some combination of frame vectors, and the amount is linear in \( v \), as a derivative should be: \[ \nabla_v e_b = \omega^a{}_b(v)\, e_a \] The \( \omega^a{}_b \) are 1-forms, the connection 1-forms, and that matrix of 1-forms is the whole connection. Given it, the covariant derivative of any vector field \( W = W^a e_a \) follows from the product rule: \[ \nabla_v W = \big( dW^a(v) + \omega^a{}_b(v)\, W^b \big)\, e_a \] The first term is the directional derivative of the components, the \( df(v) \) from the forms article doing its job. The second corrects for the frame turning underneath you.

There are infinitely many connections. Two conditions pick one. First, metric compatibility: moving vectors along with the connection should preserve their lengths and angles. Differentiating \( g(e_a, e_b) = \delta_{ab} \) gives \( \omega^a{}_b = -\omega^b{}_a \), so the matrix is antisymmetric, and on a surface that leaves a single 1-form: \[ \nabla e_1 = \omega \otimes e_2, \qquad \nabla e_2 = -\omega \otimes e_1 \] Moving in direction \( v \) rotates the frame by the angle \( \omega(v) \). Second, no torsion: the connection should agree with \( d \), so that the frame's turning is exactly what the coframe already knows about. That is Cartan's first structure equation, \( d\theta^a = -\omega^a{}_b \wedge \theta^b \), which on a surface reads \[ d\theta^1 = \omega \wedge \theta^2, \qquad d\theta^2 = -\omega \wedge \theta^1 \] Two equations, one unknown 1-form, and they always have exactly one solution. That solution is the Levi-Civita connection, the connection the metric picks.

Do the polar plane. \( \theta^1 = dr \), \( \theta^2 = r\, d\theta \). Then \( d\theta^1 = 0 = \omega \wedge r\, d\theta \), which forces \( \omega = f\, d\theta \) for some function \( f \). And \[ d\theta^2 = dr \wedge d\theta = -f\, d\theta \wedge dr = f\, dr \wedge d\theta \quad\Longrightarrow\quad f = 1, \qquad \omega = d\theta \] Read it as a sentence: move by an angle \( d\theta \) around the origin, and the frame \( (\partial_r, \partial_\theta / r) \) turns by \( d\theta \). This is the flat plane and the connection form is not zero. It's recording the frame turning, not the space curving. Now the sphere, coframe \( \theta^1 = R\, d\theta \), \( \theta^2 = R\sin\theta\, d\phi \). Again \( d\theta^1 = 0 \) forces \( \omega \) to be a multiple of \( d\phi \), and \[ d\theta^2 = R\cos\theta\, d\theta \wedge d\phi = -\omega \wedge R\, d\theta \quad\Longrightarrow\quad \omega = \cos\theta\, d\phi \] Going east by \( d\phi \) at polar angle \( \theta \) turns the frame by \( \cos\theta\, d\phi \): a full turn per lap at the north pole, none at the equator.

The same thing in coordinates: Christoffel symbols

Most textbooks use the coordinate frame \( \partial_i \) instead of an orthonormal one. Then the connection 1-forms are written out in components, \( \omega^k{}_j = \Gamma^k_{ij}\, dx^i \), and the coefficients \( \Gamma^k_{ij} \) are the Christoffel symbols. Metric compatibility and no torsion turn into a formula: \[ \Gamma^k_{ij} = \tfrac{1}{2} g^{kl} \left( \partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij} \right) \] and the covariant derivative is \( \nabla_v W = v^i (\partial_i W^k + \Gamma^k_{ij} W^j)\, \partial_k \), the same product rule as above. For the polar plane it gives \( \Gamma^r_{\theta\theta} = -r \) and \( \Gamma^\theta_{r\theta} = \Gamma^\theta_{\theta r} = 1/r \), which is \( \omega = d\theta \) in a different costume. It works in any dimension, but in \( n \) dimensions there are \( n^2(n+1)/2 \) symbols to compute versus \( n(n-1)/2 \) connection forms: for the Schwarzschild metric at the end of the page, 40 versus 6. One warning: \( \Gamma \) is an array with three indices that is not a tensor. In Cartesian coordinates the flat plane has every \( \Gamma = 0 \), in polar coordinates it doesn't, and a tensor that is zero in one coordinate system is zero in all of them.

Parallel transport and geodesics

Two things you can now define. A vector \( V \) carried along a curve \( \gamma \) is parallel if its covariant derivative along the curve vanishes, \( \nabla_{\gamma'} V = 0 \). On a surface, write the vector by its angle from the frame, \( V = \cos\alpha\, e_1 + \sin\alpha\, e_2 \), and differentiate: \[ \nabla_{\gamma'} V = \big( \alpha' + \omega(\gamma') \big) \left( -\sin\alpha\, e_1 + \cos\alpha\, e_2 \right) \] So parallel means \[ \alpha' = -\omega(\gamma') \] The vector's angle relative to the frame changes at exactly the rate the frame turns, in the opposite direction, so that the vector itself stays put. This is a first-order ODE, so given \( V \) at the start you can solve for it along the whole curve. That's parallel transport, and it is the concrete meaning of "connecting the fibers": it carries a vector from one tangent space to another. And a curve that parallel transports its own velocity, \( \nabla_{\gamma'} \gamma' = 0 \), is a geodesic, the metric's notion of a straight line. It's the same equation with \( \alpha \) the direction of travel: a geodesic never changes heading except to cancel the frame's turning. In the polar plane, \( \omega = d\theta \) says a straight line's heading relative to \( \partial_r \) drops by \( d\theta \) every time the polar angle ticks up by \( d\theta \), which is what a straight line does. In the hyperbolic half-plane the solutions are the semicircles from the playground.

Transport around a loop

Here is where curvature shows up. On the flat plane, carry a vector around any closed loop and it comes back pointing the same way. On a sphere it doesn't. The figure transports a vector around a circle of latitude on the unit sphere by integrating \( \alpha' = -\omega(\gamma') \) with the connection form we just found. Along the latitude \( \theta = \theta_0 \), \( \phi = t \), the velocity is \( \partial_\phi \) and \( \omega(\partial_\phi) = \cos\theta_0 \), so the vector's angle relative to the frame drifts at the constant rate \( -\cos\theta_0 \). Slide the latitude up and down, walk the loop, and compare the angle the vector comes back rotated by with the area of the cap the loop encloses.


Parallel transport on the unit sphere. The ghost arrow is the starting vector, the solid one is the transported vector, the green one is the frame vector \( e_1 \), and the shaded cap is the region enclosed by the loop. Drag to orbit.

The transported vector comes back rotated by the area of the cap, \( 2\pi(1 - \cos\theta_0) \). Near the north pole the loop is tiny and the rotation is tiny. At the equator the loop is a geodesic, the cap is a hemisphere of area \( 2\pi \), and the vector comes back exactly where it started, having turned all the way around. This is the holonomy of the loop, and the fact that it equals an area is the statement that the sphere has curvature \( K = 1 \) everywhere. The next section makes that precise.

Curvature is \( d \) of the connection

The connection is a 1-form, and the forms article gave us one thing to do with a 1-form: take \( d \). Cartan's second structure equation says that on a surface \[ d\omega = -K\, \theta^1 \wedge \theta^2 \] and the function \( K \) is the Gaussian curvature. Take \( d \) of the two connection forms we computed. Polar plane: \( d\omega = d(d\theta) = 0 \), so \( K = 0 \). Flat, as it should be, even though \( \omega \) wasn't zero. The connection form is \( d\theta \), the closed-but-not-exact form from the forms article, and its \( d \) vanishes. Sphere: \[ d\omega = -\sin\theta\, d\theta \wedge d\phi = -\frac{1}{R^2}\, \theta^1 \wedge \theta^2 \quad\Longrightarrow\quad K = \frac{1}{R^2} \] Three lines from the line element to the curvature, using nothing but \( d \) and \( \wedge \). The coframe came from \( g \), \( \omega \) came from the coframe, and \( K \) came from \( \omega \), so \( K \) is computable from distances measured inside the surface. That is Gauss's Theorema Egregium, and this is its shortest proof.

And the holonomy figure was Stokes' theorem. Parallel transport is \( \alpha' = -\omega(\gamma') \), so around a loop the angle relative to the frame changes by \( -\oint_\gamma \omega \). If the frame is smooth everywhere inside the loop, Stokes turns that into \( -\int\!\!\int d\omega = \int\!\!\int K\, dA \): the vector comes back rotated by the enclosed curvature. Our frame \( e_1 = \partial_\theta / R \) is not smooth at the north pole (which way is "south" at the north pole?), so the accounting has one extra term. Around the latitude circle, \( \oint \cos\theta_0\, d\phi = 2\pi\cos\theta_0 \), so relative to the frame the vector turns by \( -2\pi\cos\theta_0 \). Meanwhile the frame itself turns once around the pole, a full \( 2\pi \), the same way the polar frame \( \partial_r, \partial_\theta \) turns once around the origin of the flat plane. Net rotation: \( 2\pi - 2\pi\cos\theta_0 \), the area of the cap. That is what the readout in the figure measures.

Why this matters beyond surfaces. In the forms article the electromagnetic potential \( A \) was a connection on a U(1) bundle and the field \( F = dA \) was its curvature. You just did the same thing on the tangent bundle: \( \omega \) is the connection, \( d\omega \) is the curvature. The general formula is \( \Omega = d\omega + \omega \wedge \omega \). For U(1) the group is commutative, the second term vanishes, and you get Maxwell. For the tangent bundle of a surface the rotation group is also commutative, so again \( \Omega = d\omega \). In higher dimensions and for the non-abelian groups of the Standard Model, the \( \omega \wedge \omega \) term survives, and that term is the difference between electromagnetism and the strong force. Gravity and gauge theory are the same construction on different bundles.

Curvature in general

On a surface, curvature is one number per point. In \( n \) dimensions the connection is an \( n \times n \) antisymmetric matrix of 1-forms \( \omega^a{}_b \), the first structure equation \( d\theta^a = -\omega^a{}_b \wedge \theta^b \) still determines it, and the second structure equation gives a matrix of 2-forms: \[ \Omega^a{}_b = d\omega^a{}_b + \omega^a{}_c \wedge \omega^c{}_b \] On a surface the \( \omega \wedge \omega \) term is \( \omega^1{}_1 \wedge \omega^1{}_2 + \omega^1{}_2 \wedge \omega^2{}_2 = 0 \), which is why we could write curvature as just \( d\omega \). In general it does not vanish. Expand each 2-form in the coframe, \( \Omega^a{}_b = \tfrac{1}{2} R^a{}_{bcd}\, \theta^c \wedge \theta^d \), and the coefficients are the Riemann curvature tensor. It's a \( (1,3) \) tensor, and it measures how much transporting \( w \) around the little parallelogram spanned by \( u \) and \( v \) changes it: \[ R(u,v)\, w = \nabla_u \nabla_v w - \nabla_v \nabla_u w - \nabla_{[u,v]} w \] You have to say which 2-dimensional direction you go around, and that's the \( c, d \) slots. Riemann has \( n^2(n^2-1)/12 \) independent components: 1 in two dimensions (that's \( K \)), 6 in three, 20 in four. Two contractions of it matter for physics. The Ricci tensor \( R_{bd} = R^a{}_{bad} \) and the scalar curvature \( R = g^{bd} R_{bd} \), which on a surface is \( 2K \).

Einstein's field equations say the Ricci curvature of spacetime is determined by the matter in it: \[ R_{\mu\nu} - \tfrac{1}{2} R\, g_{\mu\nu} = \frac{8\pi G}{c^4} T_{\mu\nu} \] where \( T_{\mu\nu} \) is the energy and momentum density. Outside a mass, in empty space, the right side is zero, and the equations reduce to \( R_{\mu\nu} = 0 \). The Schwarzschild metric below is the spherically symmetric solution of that. Checking it is the moving frames method one more time: read the four coframe forms off the line element, solve the first structure equation for the six connection forms, take \( d \) and wedge for the six curvature forms, contract, and find all zeros. It's an afternoon with the formulas on this page and no new ideas, so we'll take it as given and spend the afternoon on light instead.

Exercises

Everything here can be done with the formulas above. Answers can be typed as numbers or expressions like pi/3 or 1/9. Your progress is saved in your browser ().

Exercise 1. In the hyperbolic half-plane \( ds^2 = (dx^2 + dy^2)/y^2 \), compute the length of the vertical segment \( x = 0 \), from \( y = 1 \) to \( y = e \).

Hint Parametrize by \( y \). Along the segment \( dx = 0 \), so the speed is \( \sqrt{g(\gamma',\gamma')} = 1/y \).
Solution \( \int_1^e \frac{dy}{y} = \ln e - \ln 1 = 1 \). The hyperbolic distance from \( y = 1 \) to \( y = e^n \) is \( n \), so going up is exponentially cheap, and going down to the axis costs infinitely much.

Exercise 2. In polar coordinates, \( ds^2 = dr^2 + r^2 d\theta^2 \), at the point \( r = \sqrt{3} \), find the angle in radians between \( v = \partial_r \) and \( w = \partial_r + \partial_\theta \).

Hint \( \cos\alpha = g(v,w)/(|v||w|) \), and \( g(v,w) = g_{rr} v^r w^r + g_{\theta\theta} v^\theta w^\theta \).
Solution \( g(v,w) = 1 \), \( |v| = 1 \), \( |w| = \sqrt{1 + r^2} = \sqrt{1 + 3} = 2 \). So \( \cos\alpha = 1/2 \) and \( \alpha = \pi/3 \). In the chart, \( w \) is drawn at \( 45^\circ \) to \( v \), but the true angle is \( 60^\circ \), because \( \partial_\theta \) is \( \sqrt{3} \) times longer than it looks.

Exercise 3. Solve the first structure equation for the connection form \( \omega \) of the hyperbolic half-plane, coframe \( \theta^1 = dx/y \), \( \theta^2 = dy/y \). Then evaluate it on the coordinate vector \( \partial_x \) at the point \( (x, y) = (0, 2) \).

Hint \( d\theta^2 = d(dy/y) = 0 \), so \( \omega \wedge \theta^1 = 0 \) and \( \omega \) is a multiple of \( dx \). Then use \( d\theta^1 = d(1/y) \wedge dx \) to find the multiple.
Solution \( d\theta^1 = -\frac{1}{y^2}\, dy \wedge dx = \frac{1}{y^2}\, dx \wedge dy \), and it must equal \( \omega \wedge \theta^2 = f\, dx \wedge dy / y \), so \( f = 1/y \) and \( \omega = dx / y = \theta^1 \). At \( y = 2 \), \( \omega(\partial_x) = 1/2 \): moving one unit to the right turns the frame by half a radian.

Exercise 4. Use the structure equations on the coframe \( \theta^1 = R\,d\theta \), \( \theta^2 = R \sin\theta\, d\phi \) with \( R = 3 \). What is the Gaussian curvature \( K \)?

Hint The calculation is in the text with a general \( R \). Check where \( R \) survives.
Solution \( \omega = \cos\theta\, d\phi \) regardless of \( R \), and \( d\omega = -\sin\theta\, d\theta\wedge d\phi \), while \( \theta^1 \wedge \theta^2 = R^2 \sin\theta\, d\theta \wedge d\phi \). So \( K = 1/R^2 = 1/9 \). Bigger spheres are flatter, which is why the Earth looks flat.

Exercise 5. Take \( d \) of the connection form from Exercise 3 to find the Gaussian curvature of the hyperbolic half-plane.

Hint \( d\omega = -K\, \theta^1 \wedge \theta^2 \), and \( \theta^1 \wedge \theta^2 = dx \wedge dy / y^2 \).
Solution \( d\omega = d(dx/y) = -\frac{1}{y^2}\, dy \wedge dx = \frac{1}{y^2}\, dx \wedge dy = \theta^1 \wedge \theta^2 \), so \( K = -1 \). Constant negative curvature everywhere: the half-plane is the sphere's opposite, and its geodesic triangles have angle sums less than \( 180^\circ \).

Exercise 6. On the unit sphere, a vector is parallel transported once around the circle of latitude at polar angle \( \theta_0 = 60^\circ \). By what angle (in radians) does it come back rotated?

Hint The rotation is the area of the enclosed cap, \( \int\!\!\int K\, dA \) with \( K = 1 \).
Solution \( 2\pi(1 - \cos 60^\circ) = 2\pi \cdot \frac{1}{2} = \pi \). Set the slider in the transport figure to \( 60^\circ \) and the vector comes back pointing the opposite way.

Exercise 7. In the Schwarzschild metric (next section), a clock hovering at fixed \( r \) ticks at the rate \( \sqrt{1 - r_s/r} \) compared to a clock far away. What is that rate at \( r = 2 r_s \)?

Hint Read the coefficient of \( dt^2 \) off the metric. For a hovering clock \( dr = d\theta = d\phi = 0 \), and the proper time is \( d\tau^2 = -ds^2/c^2 \).
Solution \( \sqrt{1 - 1/2} = 1/\sqrt{2} \approx 0.7071 \). A minute on the hovering clock is about 85 seconds far away. At \( r = r_s \) the rate is zero.

Exercise 8. A light ray grazing the Sun is deflected by \( \Delta\phi \approx 2 r_s / b \) (derived in the next section). With \( r_s = 2.95 \) km for the Sun and \( b = 696{,}000 \) km its radius, find the deflection in arcseconds. (One radian is \( 206{,}265 \) arcseconds.)

Hint \( 2 \cdot 2.95 / 696{,}000 \) radians, then convert.
Solution \( 8.48 \times 10^{-6} \) radians \( \approx 1.75'' \). This is the number Eddington measured during the 1919 eclipse, which made Einstein famous. Newtonian gravity, treating light as particles, predicts half of it.

A black hole

In 1916, a few months after Einstein published his field equations, Karl Schwarzschild found their first exact solution while serving in the German army on the Russian front. It describes the empty space around a spherical mass \( M \): \[ ds^2 = -\left(1 - \frac{r_s}{r}\right) c^2\, dt^2 + \frac{dr^2}{1 - r_s/r} + r^2 \left( d\theta^2 + \sin^2\theta\, d\phi^2 \right), \qquad r_s = \frac{2GM}{c^2} \] This is a metric in exactly the sense of this page, on a four-dimensional manifold with coordinates \( (t, r, \theta, \phi) \), with one change: the coefficient of \( dt^2 \) is negative. The metric is not positive definite. It's a Lorentzian metric, and the sign is the difference between space and time. A tangent vector with \( ds^2 < 0 \) is timelike, the velocity of something slower than light, and \( \sqrt{-ds^2}/c \) is the proper time a clock moving that way records. A vector with \( ds^2 = 0 \) is lightlike, and light moves along geodesics made of those. Everything else (frames, connections, geodesics, curvature) goes through unchanged.

You can read physics straight off the coefficients. A clock hovering at radius \( r \) has \( dr = d\theta = d\phi = 0 \), so \( d\tau = \sqrt{1 - r_s/r}\; dt \): it runs slow compared to a clock at infinity, and at \( r = r_s \) it stops. That's the event horizon, the Schwarzschild radius. For the Sun \( r_s \approx 3 \) km, for the Earth about 9 mm. Nothing special happens to a falling observer at \( r_s \) (the coordinate singularity there is the fault of the coordinates, like the pole in polar coordinates), but once inside, every timelike path ends at \( r = 0 \).

How light bends

Now the calculation the rendering is built on. Light follows null geodesics. We could write out the geodesic equation and grind, but there's a shortcut: the metric does not depend on \( t \) or on \( \phi \), and for each coordinate a metric ignores, geodesics have a conserved quantity (this is Noether's theorem, and the vector fields \( \partial_t \), \( \partial_\phi \) are called Killing fields). With a dot for \( d/d\lambda \), \( c = 1 \), and the ray confined to the equatorial plane \( \theta = \pi/2 \) by symmetry: \[ E = \left(1 - \frac{r_s}{r}\right)\dot t, \qquad L = r^2 \dot\phi \] are constant along the ray. Put those into \( ds^2 = 0 \): \[ -\frac{E^2}{1 - r_s/r} + \frac{\dot r^2}{1 - r_s/r} + \frac{L^2}{r^2} = 0 \quad\Longrightarrow\quad \dot r^2 = E^2 - \frac{L^2}{r^2}\left(1 - \frac{r_s}{r}\right) \] The shape of the orbit is easier in \( u = 1/r \) as a function of \( \phi \). Using \( \dot r = (dr/d\phi)\dot\phi = -L\, du/d\phi \): \[ \left(\frac{du}{d\phi}\right)^2 = \frac{1}{b^2} - u^2 + r_s u^3, \qquad b = \frac{L}{E} \] where \( b \) is the impact parameter, the distance by which the ray would miss the center if it went straight. Differentiate once more with respect to \( \phi \) and divide by \( 2\, du/d\phi \): \[ \boxed{\; \frac{d^2 u}{d\phi^2} + u = \frac{3}{2} r_s u^2 \;} \] Without the right side, the solution is \( u = \sin\phi / b \), which is \( r\sin\phi = b \): a straight line at distance \( b \) from the origin. The right side is gravity. Three things follow from it:

The figure integrates the boxed equation numerically with fourth-order Runge–Kutta for a fan of rays coming in from the left, and one ray whose impact parameter you choose. Units are \( r_s = 1 \). The black disk is the horizon, the dashed circle is the photon sphere.

Light rays in the equatorial plane of a Schwarzschild black hole, from \( u'' + u = \tfrac{3}{2} r_s u^2 \). Gray rays are captured, blue rays escape. Try \( b \) just above \( 2.598 \).

Rendering the sky

To draw what an observer near the hole sees, run the same calculation backwards for every pixel on the screen. A pixel is a direction. Follow a light ray out of the camera in that direction, bending it with the boxed equation, until it either crosses the horizon (that pixel is black) or gets far away (that pixel shows whatever star is in the direction the ray ended up going). By spherical symmetry the ray stays in the plane spanned by the camera position and the pixel's direction, so each pixel is a copy of the 2D problem above. The only subtlety is the initial condition: the observer is hovering, not falling, and the direction they see is measured in their own orthonormal frame, so the radial component of the coordinate velocity gets a factor of \( \sqrt{1 - r_s/r} \), the same factor from Exercise 7.

The integration is done on the GPU in a fragment shader, one ray per pixel. To avoid the coordinate singularity of \( \phi \) for rays aimed straight at or away from the hole, the shader integrates the same equation written as a force law in the ray's plane: for a central acceleration and a conserved \( h = |\vec{x} \times \vec{v}| \), the equation \( u'' + u = \frac{3}{2} r_s u^2 \) is equivalent to \[ \ddot{\vec{x}} = -\frac{3}{2} r_s h^2\, \frac{\vec{x}}{r^5} \] which is the formula in the loop below. The star field is procedural, so the sky is the same every time you load the page.

for (int i = 0; i < 400; i++) {
    float r = length(x);
    if (r < rs) { captured = true; break; }                 // fell in
    if (r < 1.5*rs && dot(x, v) < 0.0) { captured = true; break; }
    if (r > rEscape) break;                                   // gone
    float h = clamp(0.06*r, 0.02, 1.5);                       // step size
    rk4Step(x, v, h);      // acceleration = -1.5*rs*h2*x/r^5
}
color = captured ? black : sky(normalize(v));

Drag to look around. The hole starts in the center of the view. Turn the mass down to zero to see the undistorted sky, then bring it back up. The grid draws lines of constant latitude and longitude on the celestial sphere, and is the easiest way to see what the lensing does.

  
     
A Schwarzschild black hole in front of a star field, ray traced per pixel on the GPU. Drag to look around.

Things to look for. The shadow is the disk of directions with \( b < b_c \), and its angular radius as seen by a hovering observer at distance \( D \) is \( \sin\alpha = \frac{b_c}{D} \sqrt{1 - r_s/D} \), which the readout prints. Around the edge of the shadow the sky is squeezed into a thin ring: this is the Einstein ring, made of light from directly behind the hole that bent around it on every side. Just inside that ring the entire sky appears again, mirrored and compressed, from rays that went around once. Then again, thinner, from rays that went around twice, and so on forever, each copy from rays that spent longer near the photon sphere. Set the distance to \( 4 \) and \( r_s \) to \( 3 \) and you are inside the photon sphere, where more than half the sky is black. Drag around to look directly away from the hole: the whole sky is crowded into a cone there.

Where we are

A metric is a symmetric \( (0,2) \) tensor, and it is enough to measure length and angle, to turn 1-forms into vectors and back, and to single out one connection. The connection is the rule for comparing neighboring fibers of the tangent bundle, which is what the bundles article said was missing, and it gives covariant derivatives, parallel transport, and geodesics. On a surface the connection is one 1-form \( \omega \), and the curvature is \( d\omega \), so Stokes' theorem from the forms article turns curvature into holonomy: carry a vector around a loop and it comes back rotated by the enclosed curvature. In more dimensions the curvature is a tensor, its contraction is what Einstein set equal to matter, and the Schwarzschild metric is the vacuum solution. Two conserved quantities and one substitution turn its null geodesics into \( u'' + u = \frac{3}{2} r_s u^2 \), and a fragment shader integrating that equation for every pixel is a picture of a black hole.

The three articles fit together like this. A bundle is a space that is locally a product and globally glued. A connection is a rule for moving between its fibers, and it is a 1-form. Curvature is the exterior derivative of the connection, and it measures what happens when you go around a loop. Electromagnetism is this story on a U(1) bundle. Gravity is this story on the tangent bundle. The rest of the Standard Model is this story on bundles with bigger groups.