The Metric Tensor

A smooth manifold, on its own, is a forgetful object. It knows which functions are differentiable and what a tangent vector is — but it has no idea how long a vector is, whether two directions are perpendicular, or how far apart two points lie. Those are exactly the data a ruler and a protractor supply, and the metric tensor is the field of infinitesimal rulers-and-protractors that supplies them. At each point pp it is a bilinear form gp:TpM×TpM→Rg_p:T_pM\times T_pM\to\mathbb{R} that is symmetric and nondegenerate, varying smoothly from point to point; in a chart it is a symmetric matrix-valued field gμν(x)g_{\mu\nu}(x) transforming as a (0,2)(0,2) tensor. From this one gadget the whole of geometry unrolls. Contract it with a displacement twice and you get the line element ds2=gμν dxμ dxν\mathrm{d}s^2 = g_{\mu\nu}\,\mathrm{d}x^\mu\,\mathrm{d}x^\nu, the squared length of an infinitesimal step; integrate its root for arc length, extremize that for geodesics. Its inverse gμνg^{\mu\nu} raises and lowers indices, welding the tangent space to its dual. Demand a connection that is torsion-free and leaves gg constant and you get a unique one — Levi-Civita — whose coefficients, the Christoffel symbols, are built from first derivatives of gg; push to second derivatives and out falls the Riemann tensor that decides whether the space is genuinely curved. Two warnings frame everything below. A metric that varies from point to point is not by itself curved — flat space in spherical coordinates has a position-dependent gg and zero curvature. And the signature of gg is an invariant: a Riemannian (+,+,… )(+,+,\dots) metric measures ordinary lengths, while a Lorentzian (−,+,+,+)(-,+,+,+) metric measures spacetime intervals and carves out the causal cones of relativity. In general relativity the metric stops being a fixed backdrop and becomes the dynamical field itself, so geometry and gravity are one.

Key takeaways
  • The metric tensor gμνg_{\mu\nu} is a symmetric, nondegenerate rank-two covariant tensor field assigning an inner product to every tangent space, fixing lengths, angles, and volumes.
  • The line element ds2=gμν dxμ dxν\mathrm{d}s^2 = g_{\mu\nu}\,\mathrm{d}x^\mu\,\mathrm{d}x^\nu packages all local geometry; its components are the dot products gμν=eμ⋅eνg_{\mu\nu}=\mathbf{e}_\mu\cdot\mathbf{e}_\nu of the basis vectors.
  • The inverse gμνg^{\mu\nu} (defined by gμαgαν=δ νμg^{\mu\alpha}g_{\alpha\nu}=\delta^\mu_{\ \nu}) gives the musical isomorphism — raising and lowering indices.
  • Torsion-free plus metric-compatible uniquely fixes the Levi-Civita connection Γ μνλ=12gλσ(∂μgσν+∂νgσμ−∂σgμν)\Gamma^\lambda_{\ \mu\nu}=\tfrac12 g^{\lambda\sigma}(\partial_\mu g_{\sigma\nu}+\partial_\nu g_{\sigma\mu}-\partial_\sigma g_{\mu\nu}), hence geodesics and curvature.
  • Signature is invariant: (+,+,+)(+,+,+) Riemannian length versus (−,+,+,+)(-,+,+,+) Lorentzian interval; the determinant gives the measure ∣g∣ dnx\sqrt{|g|}\,\mathrm{d}^n x.
  • A position-dependent gg is not curvature: flat R3\mathbb{R}^3 in spherical coordinates has g=diag(1,r2,r2sin⁡2θ)g=\mathrm{diag}(1,r^2,r^2\sin^2\theta) yet Riemann tensor zero; a true 2-sphere has K=1/a2K=1/a^2.
  • Key idea: A metric is a smoothly varying, symmetric, nondegenerate inner product on tangent spaces; it turns a bare differentiable manifold into a measurable geometry — lengths, angles, volumes, the vector-covector isomorphism, and, through metric compatibility with zero torsion, a unique connection and its curvature.
The core insight

A metric is a smoothly varying, symmetric, nondegenerate inner product on tangent spaces; it converts the purely topological-differentiable manifold into a measurable geometry, fixing lengths, angles, volumes, the vector-covector isomorphism, and — by metric compatibility plus zero torsion — a unique connection and its curvature.

Where this lives today

The metric is measured in laboratories and read off telescopes every day. GPS is the everyday case: each satellite's clock runs fast against the ground by about 38 microseconds per day once the Schwarzschild gttg_{tt} redshift and the orbital-speed term are combined, and without that curved-spacetime correction positioning would drift by kilometres within a day. At the opposite extreme, LIGO and Virgo detect gravitational waves as oscillations of the spatial metric itself — a passing wave stretches one arm and squeezes the other by a strain h∼10−21h\sim10^{-21}, less than a thousandth of a proton's width over a four-kilometre arm, first caught in GW150914 in 2015. The Event Horizon Telescope images the photon ring predicted by the Schwarzschild and Kerr metrics around M87 and Sgr A*, and numerical relativity solves the Einstein equations for gμνg_{\mu\nu} to predict merger waveforms. Far from gravity the same mathematics reappears as information geometry: the Fisher-Rao metric turns a family of probability distributions into a Riemannian manifold whose geodesics and volume element give coordinate-invariant notions of statistical distinguishability, now standard in machine learning and quantum information.

The physical picture

Picture the metric as a local ruler-and-protractor bolted to each point. Its whole job is to eat two infinitesimal arrows and return a number, g(u,v)g(\mathbf{u},\mathbf{v}). From that single bilinear operation you extract every metric quantity there is: lengths ∥u∥=∣g(u,u)∣\|\mathbf{u}\|=\sqrt{|g(\mathbf{u},\mathbf{u})|}, angles cos⁡θ=g(u,v)/(∥u∥ ∥v∥)\cos\theta = g(\mathbf{u},\mathbf{v})/(\|\mathbf{u}\|\,\|\mathbf{v}\|), and volumes through the determinant factor ∣g∣\sqrt{|g|}. The components are just the pairwise dot products of the coordinate basis vectors, gμν=eμ⋅eνg_{\mu\nu}=\mathbf{e}_\mu\cdot\mathbf{e}_\nu: where coordinate lines cross at right angles the off-diagonal entries vanish, and where a basis vector stretches — like the azimuthal ∂ϕ\partial_\phi far from the axis — the matching diagonal entry swells, as the first figure shows for the plane in polar coordinates.

Figure
The metric reads the geometry of a coordinate grid: in the plane the polar basis vectors are e_r of fixed length and e_φ of length r, so ds² = dr² + r² dφ² and g = diag(1, r²) — the off-diagonal entry is zero because the grid is orthogonal, and g_φφ grows as r² outward
g_μν = e_μ · e_ν : the dot products of the basis vectors ARE the metric φ = 0 φ = π/2 P at radius r e_r (|e_r| = 1) e_φ (|e_φ| = r) dr r dφ ds ds² = dr² + r² dφ² g_rr = 1, g_φφ = r², g_rφ = 0 orthogonal grid → off-diagonal 0 g_φφ grows as r² outward √g = r (area element r dr dφ)

At a single point you can always tidy the metric up: symmetry diagonalizes it and nondegeneracy rescales it, so by Sylvester's law of inertia there is a local orthonormal frame with g=diag(±1,… )g=\mathrm{diag}(\pm1,\dots). What you generally cannot do is make gg constant across a neighbourhood — the obstruction is precisely curvature, measured invariantly by whether triangles close the way Euclid promised. The sharpest demonstration is a triangle on a sphere: its angles overshoot 180∘180^\circ, and the overshoot equals the enclosed area divided by a2a^2. That is a real, calculable number carried entirely by the metric g=a2 diag(1,sin⁡2θ)g=a^2\,\mathrm{diag}(1,\sin^2\theta), and the second figure pins it down for the cleanest case.

Figure
A geodesic triangle on the 2-sphere of radius a, metric ds² = a²(dθ² + sin²θ dφ²) with area element √g = a² sinθ: the octant bounded by three great-circle quarter-arcs has three right angles, so its angle sum is 270° — a spherical excess 90° = π/2 = Area divided by a², giving Gauss curvature K = 1/a² exactly
Curvature is a real number in the metric: angle excess = Area / a² = π/2 on the octant pole 90° 3 right angles ds² = a²(dθ² + sin²θ dφ²) √g = a² sinθ angle sum = 90+90+90 = 270° excess E = 270° − 180° = 90° Area = 4πa²/8 = (π/2) a² E = Area / a² = π/2 ⇒ K = 1/a² (Gauss-Bonnet) flatten a → ∞ : excess → 0, Euclid returns

In a Lorentzian metric the inner product is indefinite, so g(u,u)g(\mathbf{u},\mathbf{u}) can be positive, negative, or zero, and that sign — not any coordinate label — sorts vectors into spacelike, timelike, and null. The causal skeleton of spacetime, light cones and all, is read straight off the signature of gg: one tensor field carries the entire local geometry — lengths, angles, volumes, the split of space from time, and the seed of curvature.

The core equations

The one indispensable formula is the line element: contract the metric with a displacement twice for the squared length of an infinitesimal step. Everything else here specializes, differentiates, or inverts it.

ds2=gμν dxμ dxν(1)\mathrm{d}s^2 = g_{\mu\nu}\,\mathrm{d}x^\mu\,\mathrm{d}x^\nu \qquad (1)

where: ds2\mathrm{d}s^2 — squared length of the infinitesimal displacement dxμ\mathrm{d}x^\mu; gμνg_{\mu\nu} — covariant metric components (a symmetric matrix field); dxμ\mathrm{d}x^\mu — coordinate differentials; repeated indices summed (Einstein convention). Two algebraic properties make gg a metric rather than a generic tensor: symmetry is free (an antisymmetric part could never contribute to ds2\mathrm{d}s^2), while nondegeneracy is the load-bearing assumption that guarantees an inverse.

gμν=gνμ,det⁡(gμν)≠0(2)g_{\mu\nu}=g_{\nu\mu},\qquad \det(g_{\mu\nu})\neq 0 \qquad (2)

where: gμν=gνμg_{\mu\nu}=g_{\nu\mu} — symmetry, so the matrix is diagonalizable with real eigenvalues; det⁡(g)≠0\det(g)\neq0 — nondegeneracy, so no nonzero vector is invisible to the inner product. The inverse metric gμνg^{\mu\nu} is defined purely as the matrix inverse — never by "raising indices on gg", which would just reproduce the identity.

gμαgαν=δ νμ(3)g^{\mu\alpha}g_{\alpha\nu}=\delta^{\mu}_{\ \nu} \qquad (3)

where: gμνg^{\mu\nu} — contravariant metric, the matrix inverse of gμνg_{\mu\nu}; δ νμ\delta^\mu_{\ \nu} — Kronecker delta, whose existence is exactly what nondegeneracy buys. With both gg and g−1g^{-1} in hand the tangent space and its dual become interchangeable: lowering an index with gg turns a vector into a covector, raising with g−1g^{-1} undoes it. This is the musical isomorphism.

Vμ=gμνVν,Vμ=gμνVν(4)V_\mu = g_{\mu\nu}V^\nu,\qquad V^\mu = g^{\mu\nu}V_\nu \qquad (4)

where: VνV^\nu — contravariant (tangent-vector) components; VμV_\mu — covariant (covector / one-form) components. In an orthonormal frame g=1g=\mathbb{1}, so upper and lower components coincide — which is why elementary vector calculus never needs the distinction. Because ds2\mathrm{d}s^2 is a coordinate-independent scalar, the components must transform with two lower Jacobian factors — the defining law of a (0,2)(0,2) tensor.

gαβ′=∂xμ∂x′α∂xν∂x′β gμν(5)g'_{\alpha\beta} = \frac{\partial x^\mu}{\partial x'^\alpha}\frac{\partial x^\nu}{\partial x'^\beta}\,g_{\mu\nu} \qquad (5)

where: x′αx'^\alpha — new coordinates; ∂xμ/∂x′α\partial x^\mu/\partial x'^\alpha — Jacobian of the change of coordinates. Substitute dxμ=(∂xμ/∂x′α)dx′α\mathrm{d}x^\mu=(\partial x^\mu/\partial x'^\alpha)\mathrm{d}x'^\alpha into (1) and match, and the two factors are forced. Differentiating gg once produces the Christoffel symbols — the unique connection coefficients that are metric-compatible and torsion-free, the hinge between algebra and calculus on a manifold.

Γ μνλ=12gλσ ⁣(∂μgσν+∂νgσμ−∂σgμν)(6)\Gamma^{\lambda}_{\ \mu\nu} = \tfrac{1}{2}g^{\lambda\sigma}\!\left(\partial_\mu g_{\sigma\nu} + \partial_\nu g_{\sigma\mu} - \partial_\sigma g_{\mu\nu}\right) \qquad (6)

where: Γ μνλ\Gamma^\lambda_{\ \mu\nu} — Levi-Civita connection coefficients, symmetric in μν\mu\nu; ∂μgσν\partial_\mu g_{\sigma\nu} — first partial derivatives of the metric. Γ\Gamma vanishes wherever gg is constant. The property that singles out this connection is metric compatibility: the covariant derivative of gg is zero.

∇λgμν=0(7)\nabla_\lambda g_{\mu\nu} = 0 \qquad (7)

where: ∇λ\nabla_\lambda — covariant derivative with respect to the Levi-Civita connection. It guarantees lengths and angles survive parallel transport, so a unit vector stays a unit vector as you carry it around. The determinant of gg supplies the scalar density every covariant integral needs — the invariant volume element.

dV=∣g∣ dnx(8)\mathrm{d}V = \sqrt{|g|}\,\mathrm{d}^n x \qquad (8)

where: gg — determinant det⁡(gμν)\det(g_{\mu\nu}); ∣g∣|g| — absolute value (Lorentzian metrics have g<0g<0); dnx\mathrm{d}^n x — coordinate volume. The factor ∣g∣\sqrt{|g|} makes ∫f ∣g∣ dnx\int f\,\sqrt{|g|}\,\mathrm{d}^n x the same number in every chart. Angles come from the same machine: cos⁡θ=gμνUμVν/(∥U∥ ∥V∥)\cos\theta = g_{\mu\nu}U^\mu V^\nu/(\|U\|\,\|V\|) in the Riemannian case, with Cauchy-Schwarz keeping the ratio in [−1,1][-1,1].

Derivation AUniqueness of the Levi-Civita connection

The goal is to prove a cornerstone of Riemannian geometry: on a manifold with a metric there is exactly one connection that is both torsion-free and metric-compatible, with coefficients fixed entirely by the metric through formula (6). We do not assume the answer; we impose the two conditions on an unknown Γ\Gamma and solve the resulting linear system, watching four of the six terms cancel by symmetry.

Step 1. Write out metric compatibility ∇λgμν=0\nabla_\lambda g_{\mu\nu}=0 using the covariant-derivative rule for a (0,2)(0,2) tensor: ∂λgμν=Γ λμσgσν+Γ λνσgμσ\partial_\lambda g_{\mu\nu} = \Gamma^{\sigma}_{\ \lambda\mu}g_{\sigma\nu} + \Gamma^{\sigma}_{\ \lambda\nu}g_{\mu\sigma}. Why: this turns the geometric demand into an algebraic relation between derivatives of gg and the unknown connection.

Step 2. Cyclically permute the free indices λ→μ→ν→λ\lambda\to\mu\to\nu\to\lambda to get a second copy, ∂μgνλ=Γ μνσgσλ+Γ μλσgνσ\partial_\mu g_{\nu\lambda} = \Gamma^{\sigma}_{\ \mu\nu}g_{\sigma\lambda} + \Gamma^{\sigma}_{\ \mu\lambda}g_{\nu\sigma}. Why: the identity holds for any ordering, and a second one gives an independent equation.

Step 3. Permute once more for a third copy, ∂νgλμ=Γ νλσgσμ+Γ νμσgλσ\partial_\nu g_{\lambda\mu} = \Gamma^{\sigma}_{\ \nu\lambda}g_{\sigma\mu} + \Gamma^{\sigma}_{\ \nu\mu}g_{\lambda\sigma}. Why: three equations in the symmetric derivative combinations are exactly enough to isolate a single Γ\Gamma.

Step 4. Form (Step 2) + (Step 3) − (Step 1). Using the torsion-free symmetry Γ μνσ=Γ νμσ\Gamma^\sigma_{\ \mu\nu}=\Gamma^\sigma_{\ \nu\mu}, four of the six Γg\Gamma g terms cancel in pairs, leaving ∂μgνλ+∂νgλμ−∂λgμν=2 Γ μνσgσλ\partial_\mu g_{\nu\lambda} + \partial_\nu g_{\lambda\mu} - \partial_\lambda g_{\mu\nu} = 2\,\Gamma^{\sigma}_{\ \mu\nu}g_{\sigma\lambda}. Why: torsion-freeness is exactly the symmetry that annihilates the unwanted terms — both conditions are needed for uniqueness.

Step 5. Contract with the inverse metric gλρg^{\lambda\rho} to isolate Γ μνρ=12gρλ(∂μgνλ+∂νgλμ−∂λgμν)\Gamma^{\rho}_{\ \mu\nu} = \tfrac12 g^{\rho\lambda}(\partial_\mu g_{\nu\lambda}+\partial_\nu g_{\lambda\mu}-\partial_\lambda g_{\mu\nu}), the boxed Christoffel formula. Why: nondegeneracy guarantees gρλg^{\rho\lambda} exists, so the solution is unique — one and only one Levi-Civita connection. *The result is symmetric in the lower pair μν\mu\nu and vanishes identically whenever gμνg_{\mu\nu} is constant.*

Go deeper · Derivation B · 1 minThe geodesic equation from extremizing arc length
Derivation BThe geodesic equation from extremizing arc length

The aim is to show that the straightest curves — stationary paths of the length functional — obey an equation whose coefficients are exactly the Christoffel symbols, so geodesics are determined by gg alone. We vary the quadratic energy L=12gμνx˙μx˙νL=\tfrac12 g_{\mu\nu}\dot x^\mu\dot x^\nu (equivalent to arc length for an affine parameter), push it through Euler-Lagrange, and watch the connection assemble itself from the metric derivatives.

Step 1. Apply the Euler-Lagrange equation ddλ∂L∂x˙λ−∂L∂xλ=0\dfrac{\mathrm{d}}{\mathrm{d}\lambda}\dfrac{\partial L}{\partial \dot x^\lambda} - \dfrac{\partial L}{\partial x^\lambda}=0 to L=12gμν(x)x˙μx˙νL=\tfrac12 g_{\mu\nu}(x)\dot x^\mu\dot x^\nu. Why: extremizing length is a variational problem, and Euler-Lagrange turns "stationary path" into a differential equation.

Step 2. Compute the pieces: ∂L∂x˙λ=gλνx˙ν\dfrac{\partial L}{\partial \dot x^\lambda} = g_{\lambda\nu}\dot x^\nu and ∂L∂xλ=12∂λgμν x˙μx˙ν\dfrac{\partial L}{\partial x^\lambda}=\tfrac12 \partial_\lambda g_{\mu\nu}\,\dot x^\mu\dot x^\nu. Why: the second term survives only because gg depends on position — the source of all the connection terms.

Step 3. Differentiate the momentum along the curve: ddλ(gλνx˙ν)=gλνx¨ν+∂μgλν x˙μx˙ν\dfrac{\mathrm{d}}{\mathrm{d}\lambda}(g_{\lambda\nu}\dot x^\nu) = g_{\lambda\nu}\ddot x^\nu + \partial_\mu g_{\lambda\nu}\,\dot x^\mu\dot x^\nu. Why: the chain rule splits it into an acceleration piece and a metric-variation piece.

Step 4. Substitute and symmetrize ∂μgλνx˙μx˙ν\partial_\mu g_{\lambda\nu}\dot x^\mu\dot x^\nu over μν\mu\nu (legal, since it multiplies the symmetric x˙μx˙ν\dot x^\mu\dot x^\nu): gλνx¨ν+12(∂μgλν+∂νgλμ−∂λgμν)x˙μx˙ν=0g_{\lambda\nu}\ddot x^\nu + \tfrac12(\partial_\mu g_{\lambda\nu}+\partial_\nu g_{\lambda\mu}-\partial_\lambda g_{\mu\nu})\dot x^\mu\dot x^\nu = 0. Why: symmetrization is what conjures the three-term Christoffel combination from a single derivative.

Step 5. Contract with gρλg^{\rho\lambda} to free the acceleration: x¨ρ+Γ μνρx˙μx˙ν=0\ddot x^\rho + \Gamma^{\rho}_{\ \mu\nu}\dot x^\mu\dot x^\nu=0. Why: the bracket is precisely 2gρλΓ μνρ2g_{\rho\lambda}\Gamma^\rho_{\ \mu\nu} from the previous derivation — geodesics and Levi-Civita are one content. *As a check: when gg is constant all Christoffel symbols vanish and the equation reduces to x¨ρ=0\ddot x^\rho=0, the straight lines of flat space.*

Go deeper · Derivation C · 1 minFlat space in spherical coordinates has zero curvature
Derivation CFlat space in spherical coordinates has zero curvature

The purpose is to demolish the most common beginner's error — reading curvature off the appearance of the metric. We take flat Euclidean R3\mathbb{R}^3 in spherical coordinates, where gg is manifestly position-dependent, build its Christoffel symbols and Riemann tensor, and watch every curvature component cancel to exactly zero — confirming that curvature lives in the second-order structure of gg, not its coordinate dress.

Step 1. Start from ds2=dr2+r2dθ2+r2sin⁡2θ dϕ2\mathrm{d}s^2=\mathrm{d}r^2+r^2\mathrm{d}\theta^2+r^2\sin^2\theta\,\mathrm{d}\phi^2 and feed it into formula (6). The nonzero Christoffels are Γ θθr=−r\Gamma^{r}_{\ \theta\theta}=-r, Γ ϕϕr=−rsin⁡2θ\Gamma^{r}_{\ \phi\phi}=-r\sin^2\theta, Γ rθθ=1/r\Gamma^{\theta}_{\ r\theta}=1/r, Γ ϕϕθ=−sin⁡θcos⁡θ\Gamma^{\theta}_{\ \phi\phi}=-\sin\theta\cos\theta, Γ rϕϕ=1/r\Gamma^{\phi}_{\ r\phi}=1/r, Γ θϕϕ=cot⁡θ\Gamma^{\phi}_{\ \theta\phi}=\cot\theta. Why: these are nonzero purely because the coordinate basis rotates and stretches — a coordinate effect, not yet curvature.

Step 2. Assemble R σμνρ=∂μΓ νσρ−∂νΓ μσρ+Γ μλρΓ νσλ−Γ νλρΓ μσλR^{\rho}_{\ \sigma\mu\nu}=\partial_\mu\Gamma^{\rho}_{\ \nu\sigma}-\partial_\nu\Gamma^{\rho}_{\ \mu\sigma}+\Gamma^{\rho}_{\ \mu\lambda}\Gamma^{\lambda}_{\ \nu\sigma}-\Gamma^{\rho}_{\ \nu\lambda}\Gamma^{\lambda}_{\ \mu\sigma} and test the component R rθrθR^{\theta}_{\ r\theta r}. Why: if any second-order component survived, the space would be curved.

Step 3. Its two surviving pieces are the derivative term −∂rΓ rθθ=−∂r(1/r)=1/r2-\partial_r\Gamma^{\theta}_{\ r\theta}=-\partial_r(1/r)=1/r^2 and the quadratic term Γ rθθΓ rθθ=1/r2\Gamma^{\theta}_{\ r\theta}\Gamma^{\theta}_{\ r\theta}=1/r^2, entering with opposite sign. Why: both are individually nonzero, so the vanishing is a genuine cancellation, not an absence of terms.

Step 4. Add them: 1/r2−1/r2=01/r^2 - 1/r^2 = 0, and the same cancellation occurs for every component, so R σμνρ=0R^{\rho}_{\ \sigma\mu\nu}=0 everywhere. Why: a nonconstant gg can hide but never create curvature — always check the Riemann tensor, not gg itself. *This confirms R3\mathbb{R}^3 is globally flat. By contrast, on the genuine 2-sphere the analogous component is R ϕθϕθ=sin⁡2θ≠0R^{\theta}_{\ \phi\theta\phi}=\sin^2\theta\neq0, giving K=1/a2K=1/a^2.*

Limiting cases

The one metric formalism collapses onto every familiar geometry when fed the right components; the table maps abstract gμνg_{\mu\nu} back to cases you already know.

CaseResultMeaning
Flat Euclidean (Cartesian)gμν=δμνg_{\mu\nu}=\delta_{\mu\nu}ordinary Pythagorean space, ds2=dx2+dy2+dz2\mathrm{d}s^2=\mathrm{d}x^2+\mathrm{d}y^2+\mathrm{d}z^2; all Christoffel symbols vanish
Minkowski (Lorentzian)ημν=diag(−1,+1,+1,+1)\eta_{\mu\nu}=\mathrm{diag}(-1,+1,+1,+1)flat spacetime; the signature splits time from space and gives the invariant interval ds2=−c2dt2+dx2\mathrm{d}s^2=-c^2\mathrm{d}t^2+\mathrm{d}\mathbf{x}^2
Flat space, spherical coordinatesgμν=diag(1, r2, r2sin⁡2θ)g_{\mu\nu}=\mathrm{diag}(1,\,r^2,\,r^2\sin^2\theta)position-dependent yet zero curvature — nonconstant gg alone is not curvature
Local inertial (Riemann normal) framegμν(p)=ημν, ∂λgμν(p)=0g_{\mu\nu}(p)=\eta_{\mu\nu},\ \partial_\lambda g_{\mu\nu}(p)=0at any point one can flatten gg to first order; the irreducible second-order remainder is the Riemann tensor
2-sphere of radius aads2=a2(dθ2+sin⁡2θ dϕ2)\mathrm{d}s^2 = a^2(\mathrm{d}\theta^2 + \sin^2\theta\,\mathrm{d}\phi^2)a genuinely curved Riemannian metric, constant Gauss curvature K=1/a2K=1/a^2, Ricci scalar R=2/a2R=2/a^2

Worked examples

1 · The round 2-sphere, end to end (fully worked)

Take the 2-sphere of radius aa with ds2=a2(dθ2+sin⁡2θ dϕ2)\mathrm{d}s^2 = a^2(\mathrm{d}\theta^2 + \sin^2\theta\,\mathrm{d}\phi^2). Compute the metric, its inverse, the area element, the Christoffel symbols, the curvature, and the Gauss curvature — then read off the octant area.

Step 1. Read the components off the line element: gθθ=a2g_{\theta\theta}=a^2, gϕϕ=a2sin⁡2θg_{\phi\phi}=a^2\sin^2\theta, off-diagonal zero. The determinant is g=a4sin⁡2θg=a^4\sin^2\theta, so g=a2sin⁡θ\sqrt{g}=a^2\sin\theta and the area element is dA=a2sin⁡θ dθ dϕ\mathrm{d}A=a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi; integrating over θ∈[0,π], ϕ∈[0,2π]\theta\in[0,\pi],\ \phi\in[0,2\pi] recovers the total area a2⋅2⋅2π=4πa2a^2\cdot 2\cdot 2\pi = \mathbf{4\pi a^2}, as it must.

Step 2. Invert the diagonal metric — reciprocate each diagonal entry — to get gθθ=1/a2g^{\theta\theta}=1/a^2 and gϕϕ=1/(a2sin⁡2θ)g^{\phi\phi}=1/(a^2\sin^2\theta). This is the matrix inverse, not any index-raising trick.

Step 3. Feed gg into the Christoffel formula (6). Only two independent symbols survive: Γ ϕϕθ=−sin⁡θcos⁡θ\Gamma^{\theta}_{\ \phi\phi}=-\sin\theta\cos\theta and Γ θϕϕ=cot⁡θ\Gamma^{\phi}_{\ \theta\phi}=\cot\theta. Everything carrying an rr index is gone (no rr direction), and the constant radius aa never differentiates.

Step 4. Compute the one independent Riemann component R ϕθϕθ=∂θΓ ϕϕθ−Γ ϕϕθΓ θϕϕR^{\theta}_{\ \phi\theta\phi}=\partial_\theta\Gamma^{\theta}_{\ \phi\phi}-\Gamma^{\theta}_{\ \phi\phi}\Gamma^{\phi}_{\ \theta\phi}. The pieces are ∂θ(−sin⁡θcos⁡θ)=sin⁡2θ−cos⁡2θ\partial_\theta(-\sin\theta\cos\theta)=\sin^2\theta-\cos^2\theta and −(−sin⁡θcos⁡θ)(cot⁡θ)=+cos⁡2θ-(-\sin\theta\cos\theta)(\cot\theta)=+\cos^2\theta; summing gives sin⁡2θ≠0\mathbf{\sin^2\theta}\neq0 — the sphere is genuinely curved.

Step 5. Contract to the scalars. The Ricci tensor is Rij=(1/a2)gijR_{ij}=(1/a^2)g_{ij}, so R=gijRij=2/a2R=g^{ij}R_{ij}=\mathbf{2/a^2} and the Gauss curvature is K=R/2=1/a2K=R/2=\mathbf{1/a^2} — constant, positive, shrinking as the sphere grows. As a payoff, Gauss-Bonnet gives the octant (three right angles) a spherical excess E=π/2=Area/a2E=\pi/2=\text{Area}/a^2, so its area is (π/2)a2=18(4πa2)(\pi/2)a^2=\tfrac18(4\pi a^2) — one-eighth of the sphere, with no integration needed.

2 · Schwarzschild time dilation from a single metric component

The Schwarzschild metric outside a mass MM has gtt=−(1−rs/r)g_{tt}=-(1-r_s/r) with rs=2GM/c2r_s=2GM/c^2. Estimate rsr_s for the Earth and the Sun, and the rate at which a clock on Earth's surface runs slow relative to one infinitely far away.

Step 1. The Schwarzschild radius is rs=2GM/c2r_s=2GM/c^2. For Earth, GM⊕=3.986×1014 m3s−2GM_\oplus=3.986\times10^{14}\ \mathrm{m^3 s^{-2}} and c2=8.988×1016 m2s−2c^2=8.988\times10^{16}\ \mathrm{m^2 s^{-2}}, so rs=8.87×10−3 mr_s=\mathbf{8.87\times10^{-3}\ m} — Earth's mass squeezed inside about 8.9 mm would become a black hole.

Step 2. For the Sun, GM⊙=1.327×1020 m3s−2GM_\odot=1.327\times10^{20}\ \mathrm{m^3 s^{-2}} gives rs=2.95×103 mr_s=\mathbf{2.95\times10^{3}\ m}, the familiar 2.95 km Schwarzschild radius.

Step 3. A static clock ticks at the rate −gtt=1−rs/r\sqrt{-g_{tt}}=\sqrt{1-r_s/r}. At Earth's surface r=6.371×106 mr=6.371\times10^{6}\ \mathrm{m}, so rs/r=1.39×10−9r_s/r=\mathbf{1.39\times10^{-9}} and 1−rs/r≈1−6.96×10−10\sqrt{1-r_s/r}\approx 1-6.96\times10^{-10}.

Step 4. So a surface clock loses about 6.96×10−10×86 400 s≈60 μs per day6.96\times10^{-10}\times 86\,400\ \mathrm{s}\approx\mathbf{60\ \mu s\ per\ day} against a clock at infinity — the same gttg_{tt} effect (opposite sign for higher, orbiting clocks) that forces GPS to correct its atomic clocks by tens of microseconds a day. Geometry from one metric component, measured routinely in orbit.

Physics of the portrait

The metric tensor has no single inventor, but it has a decisive one: the idea that geometry is carried by an intrinsic quadratic form, freed from any embedding, belongs to Bernhard Riemann.

Origins · 1 minBernhard Riemann and how this was discovered
BR
Bernhard Riemann
1826-1866 · the invention of Riemannian geometry and the intrinsic metric

Bernhard Riemann held his 1854 habilitation before the Göttingen faculty — with the aging Gauss, who had proposed the topic, in the audience — and in a lecture almost devoid of formulas ("Über die Hypothesen, welche der Geometrie zu Grunde liegen") he generalized Gauss's theory of curved surfaces to any dimension. His radical move was to define distance intrinsically, by a quadratic form ds2=∑gij dxidxj\mathrm{d}s^2=\sum g_{ij}\,\mathrm{d}x^i\mathrm{d}x^j living on the manifold itself with no ambient space, and from that single form he extracted a notion of curvature — anticipating by six decades the mathematics Einstein would need. Riemann could not yet compute freely with gijg_{ij} as a tensor: that language was forged by Christoffel, who in 1869 introduced the three-index symbols, and by Ricci-Curbastro and his student Levi-Civita, whose 1900 "absolute differential calculus" turned the vision into a working machinery of covariant derivatives and parallel transport. When Einstein reached for it in 1915, gμνg_{\mu\nu} stopped describing a fixed space and became the gravitational field itself. Riemann died at thirty-nine, but the geometry that bears his name is now the language of gravitation, cosmology, and the shape of spacetime.

History
1827
— Gauss's Disquisitiones generales defines the first fundamental form of a curved surface
1854
— Riemann's habilitation lecture generalizes the metric to n-dimensional manifolds
1869
— Christoffel introduces the three-index symbols and covariant differentiation of quadratic forms
1900
— Ricci and Levi-Civita publish the absolute differential calculus, the tensor calculus proper
1915
— Einstein makes the metric g the dynamical gravitational field in general relativity

Going further

Texts. Stone & Goldbart, Mathematics for Physics, Ch. 11 (differential geometry and tensors) · Arfken & Weber, Mathematical Methods for Physicists, tensors and curvilinear-coordinates chapters · Hassani, Mathematical Physics, Part on differential geometry · Nakahara, Geometry, Topology and Physics, Ch. 7 · Byron & Fuller, Mathematics of Classical and Quantum Physics, tensor chapter · Misner, Thorne & Wheeler, Gravitation, Ch. 8 · Wald, General Relativity, Ch. 3. Key results to keep in mind: the Christoffel formula follows from the (2)+(3)−(1) cyclic permutation of metric compatibility; the geodesic equation is recovered by Euler-Lagrange on L=12gμνx˙μx˙νL=\tfrac12 g_{\mu\nu}\dot x^\mu\dot x^\nu; spherical coordinates in R3\mathbb{R}^3 give nonzero Γ\Gamma but Rρσμν=0R^\rho{}_{ \sigma\mu\nu}=0; on the 2-sphere g=a2sin⁡θ\sqrt{g}=a^2\sin\theta, Rθϕθϕ=sin⁡2θR^\theta{}_{ \phi\theta\phi}=\sin^2\theta, K=1/a2K=1/a^2, R=2/a2R=2/a^2; and rs=2GM/c2=8.87 mmr_s=2GM/c^2=8.87\ \mathrm{mm} (Earth), 2.95 km2.95\ \mathrm{km} (Sun), with gravitational surface slowing ≈6.96×10−10\approx6.96\times10^{-10}.

Prerequisites. Tensor Algebra and the Tensor Product · Covariant and Contravariant Tensors · Manifolds and Tangent Spaces. Leads to. Raising and Lowering Indices · Christoffel Symbols and Affine Connections · Parallel Transport and Geodesics · The Riemann Curvature Tensor · Hodge Star and the Codifferential.

Ask the tutor: Ask me to work any metric you like — polar, cylindrical, the 2-sphere, Schwarzschild, or FRW cosmology — all the way from gμνg_{\mu\nu} to its Christoffel symbols, geodesics, and curvature, step by step.

Is the metric tensor the same thing as the distance between two points?

Not quite — it is the infinitesimal ingredient from which distance is built. The metric gives ds2=gμνdxμdxν\mathrm{d}s^2=g_{\mu\nu}\mathrm{d}x^\mu\mathrm{d}x^\nu, the squared length of a tiny step, at every point. To get the distance between two finite points you integrate ∣ds2∣\sqrt{|\mathrm{d}s^2|} along a curve joining them and minimize over all such curves; the minimizer is a geodesic and its length is the geodesic distance. So the metric is local and the distance is global — the metric alone does not pick a curve until you extremize. On a sphere, the same metric yields great-circle distances only after that minimization.

What is the difference between g_μν and g^μν, really?

They are matrix inverses of each other, and that is the whole story: gμαgαν=δ νμg^{\mu\alpha}g_{\alpha\nu}=\delta^\mu_{\ \nu}. The lower-index gμνg_{\mu\nu} turns a vector into a covector, and the upper-index gμνg^{\mu\nu} raises one back. A frequent error is to think gμνg^{\mu\nu} comes from "raising the indices on gμνg_{\mu\nu}" — but raising both indices of gμνg_{\mu\nu} using itself just returns δ\delta. Compute gμνg^{\mu\nu} the honest way: write gμνg_{\mu\nu} as a matrix and invert it, which for a diagonal metric means reciprocating each diagonal entry.

If a nonconstant metric is not curvature, how do I actually detect curvature?

Compute the Riemann tensor R σμνρR^{\rho}_{\ \sigma\mu\nu} from second derivatives of the metric (via the Christoffel symbols) and ask whether it is zero. If every component vanishes the space is flat, no matter how baroque gg looks; if any is nonzero the space is genuinely curved and no coordinate change can hide it. Because comparing full tensors is awkward, one usually checks coordinate-invariant scalars — the Ricci scalar RR and the Kretschmann scalar RρσμνRρσμνR_{\rho\sigma\mu\nu}R^{\rho\sigma\mu\nu}. Flat space in spherical coordinates has all of these zero; a 2-sphere of radius aa has R=2/a2≠0R=2/a^2\neq0, settling the question invariantly.

Why does metric compatibility ∇g = 0 matter physically?

It keeps geometry and calculus talking to each other. Metric compatibility means the covariant derivative of gg vanishes, so when you parallel-transport two vectors along any curve their inner product — hence their lengths and angle — stays constant. Without it, a connection could stretch or twist vectors as it slid them, and "unit vector" or "constant speed along a geodesic" would lose meaning. Combined with zero torsion it singles out a unique connection (Levi-Civita), which is why we can speak of "the" Christoffel symbols of a metric rather than choosing among many connections. It is what makes the affine and metric structures one geometry.

What does the signature of the metric tell me?

The signature is the pattern of plus and minus signs when the metric is diagonalized to ±1\pm1s, and by Sylvester's law of inertia it is an invariant — no coordinate transformation can change it. A Riemannian signature (+,+,…,+)(+,+,\dots,+) makes every nonzero vector have positive squared length, so the metric measures ordinary distances. A Lorentzian signature (−,+,+,+)(-,+,+,+) lets g(u,u)g(\mathbf{u},\mathbf{u}) be negative, positive, or zero, sorting vectors into timelike, spacelike, and null and building the light cones of relativity. That single minus sign is the entire difference between a length and a spacetime interval — why time is not just a fourth spatial direction.

Can I always make the metric look flat at a point?

At a single point, yes — always. Symmetry plus nondegeneracy let you diagonalize and rescale, so there exist coordinates (Riemann normal coordinates) with gμν(p)=ημνg_{\mu\nu}(p)=\eta_{\mu\nu} and even ∂λgμν(p)=0\partial_\lambda g_{\mu\nu}(p)=0. This is the mathematical face of Einstein's equivalence principle: a freely falling observer sees locally flat spacetime, gravity "transformed away". What you cannot kill is the second derivatives — the irreducible remainder is the Riemann tensor, so curvature is exactly the obstruction to extending a local inertial frame over a finite region. Flat at a point and to first order, yes; true curvature always shows up at second order.

Before this

Where this leads