Skip to content

Metric Volume, Divergence, and Integration

Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

Scrollable table. Use Left and Right arrow keys to reveal additional columns.

Scrollable figure. Use Left and Right arrow keys to inspect hidden content.

A nondegenerate metric converts an orientation into a canonical volume form. In coordinates its coefficient is ∣det⁡g∣\sqrt{\lvert\det g\rvert}, whose Jacobian factor precisely compensates that of the coordinate wedge. The same density defines divergence as local volume change; for the Levi-Civita connection it equals ∇μXμ=∣g∣−1/2∂μ(∣g∣1/2Xμ)\nabla_\mu X^\mu=\lvert g\rvert^{-1/2}\partial_\mu(\lvert g\rvert^{1/2}X^\mu). Its flux identity is an immediate instance of Stokes’ theorem.

Required background. Tensor Fields and Natural Operations supplies tensor components, determinants under coordinate change, and vector fields.

Helpful background. Calculus and Linear Algebra for Relativity supplies Jacobians; Exterior Algebra and Differential Forms supplies orientation and Stokes’ theorem; Events, Intervals, and Minkowski Geometry supplies the flat Lorentzian normalization.

Let (M,g)(M,g) be an oriented pseudo-Riemannian nn-manifold and write g=det⁡(gμν)g=\det(g_{\mu\nu}) in a positively oriented chart. The metric volume form is

volg=∣g∣ dx1∧⋯∧dxn.\mathrm{vol}_g =\sqrt{\lvert g\rvert}\, dx^1\wedge\cdots\wedge dx^n.

For a four-dimensional Lorentzian metric of signature (−,+,+,+)(-,+,+,+), g<0g\lt0 and the site orientation convention becomes

volg=−g dx0∧dx1∧dx2∧dx3,ϵ0123=+−g.\mathrm{vol}_g =\sqrt{-g}\,dx^0\wedge dx^1\wedge dx^2\wedge dx^3, \qquad \epsilon_{0123}=+\sqrt{-g}.

Why is this coordinate independent? Under x=x(x′)x=x(x'), the metric transforms as g′=JTgJg'=J^{\mathsf T}gJ, so ∣g′∣=∣det⁡J∣∣g∣\sqrt{\lvert g'\rvert}=\lvert\det J\rvert\sqrt{\lvert g\rvert}. Meanwhile the ordered coordinate wedge transforms by the inverse Jacobian. In orientation-preserving overlap maps the two factors cancel. An orientation-reversing map changes the sign of the ordered wedge, which is why an orientation is needed for a volume form. Without one, ∣g∣ dnx\sqrt{\lvert g\rvert}\,d^nx is still a density that can be integrated.

The relation between metric determinant, density, and orientation is treated in Tong 2019, §3.1.3, pp. 95–96, PDF.

The divergence of a vector field XX can be defined without first choosing coordinates by the infinitesimal change of volume:

LXvolg=(div⁡gX) volg.\mathcal L_X\mathrm{vol}_g =(\operatorname{div}_gX)\,\mathrm{vol}_g.

In a positively oriented coordinate chart, the Lie derivative of a top form gives

div⁡gX=1∣g∣∂μ ⁣(∣g∣ Xμ).\operatorname{div}_gX =\frac{1}{\sqrt{\lvert g\rvert}} \partial_\mu\!\left(\sqrt{\lvert g\rvert}\,X^\mu\right).

For the Levi-Civita connection this equals the trace ∇μXμ\nabla_\mu X^\mu. Indeed,

∇μXμ=∂μXμ+ΓμμνXν,Γμμν=∂νlog⁡∣g∣.\nabla_\mu X^\mu =\partial_\mu X^\mu+\Gamma^\mu{}_{\mu\nu}X^\nu, \qquad \Gamma^\mu{}_{\mu\nu} =\partial_\nu\log\sqrt{\lvert g\rvert}.

The last identity follows by inserting the Christoffel formula and using ∂νlog⁡∣det⁡g∣=gαβ∂νgαβ\partial_\nu\log\lvert\det g\rvert =g^{\alpha\beta}\partial_\nu g_{\alpha\beta}. Tong derives these identities in Tong 2019, §3.2.4, pp. 111–113, PDF. For an arbitrary affine connection with torsion or nonmetricity, its traced covariant derivative need not agree with the volume-change definition; the Levi-Civita specialization is consequential.

Flat Euclidean two-space provides a sharp coordinate test. In polar coordinates,

ds2=dr2+r2dϕ2,g=r.ds^2=dr^2+r^2d\phi^2, \qquad \sqrt{g}=r.

For a radial field X=f(r)∂rX=f(r)\partial_r,

div⁡X=1rddr(rf(r))=f′(r)+f(r)r.\operatorname{div}X =\frac1r\frac{d}{dr}\bigl(rf(r)\bigr) =f'(r)+\frac{f(r)}r.

In particular, div⁡∂r=1/r\operatorname{div}\partial_r=1/r on the punctured plane, even though the displayed component Xr=1X^r=1 is constant. The missing term records the widening of radial rays. The qualification matters: ∂r=(x∂x+y∂y)/r\partial_r=(x\partial_x+y\partial_y)/r is undefined at the origin, so it is not a smooth vector field on a full disk. On the annulus Aε,RA_{\varepsilon,R},

∫Aε,Rdiv⁡∂r vol=2π(R−ε).\int_{A_{\varepsilon,R}}\operatorname{div}\partial_r\,\mathrm{vol} =2\pi(R-\varepsilon).

The outer-circle flux is 2πR2\pi R, while the annulus’s outward normal on the inner circle is −∂r-\partial_r, giving flux −2πε-2\pi\varepsilon. Their sum matches the bulk integral. For a smooth full-disk check, take X=r∂r=x∂x+y∂yX=r\partial_r=x\partial_x+y\partial_y. Then div⁡X=2\operatorname{div}X=2, so both the bulk integral and the boundary flux equal 2πR22\pi R^2. These two calculations independently check the density formula, its normalization, and the regularity hypothesis in the divergence theorem.

Let DD be a compact oriented nn-dimensional region with piecewise smooth boundary. Stokes’ theorem applied to the (n−1)(n-1)-form ιXvolg\iota_X\mathrm{vol}_g gives the signature-independent statement

∫D(div⁡gX) volg=∫∂DιXvolg.\int_D(\operatorname{div}_gX)\,\mathrm{vol}_g =\int_{\partial D}\iota_X\mathrm{vol}_g.

The boundary orientation is outward-normal-first. If a boundary component is non-null and has outward unit normal NN, set ϵ=N2=±1\epsilon=N^2=\pm1 and define vol∂D=ιNvolg\mathrm{vol}_{\partial D}=\iota_N\mathrm{vol}_g. Since the normal component of XX is ϵg(X,N)N\epsilon g(X,N)N, the right side is

∫∂Dϵ g(X,N) vol∂D.\int_{\partial D}\epsilon\,g(X,N)\,\mathrm{vol}_{\partial D}.

The factor is +1+1 on a timelike boundary and −1-1 on a spacelike boundary. Some conventions absorb it into a directed surface element; the displayed formula keeps it explicit. A null boundary has no unit normal and a degenerate induced metric; the differential-form flux remains valid, but this unit-normal formula cannot be copied unchanged.

Neither compact support nor a compact domain may be silently dropped: noncompact integrals require convergence and control of flux at infinity. Coordinate volume dnxd^nx alone is not invariant. The expression −g\sqrt{-g} is real when the determinant is negative, including Lorentzian index one; ∣g∣\sqrt{\lvert g\rvert} covers every nondegenerate signature.

Cartan’s formula makes the relation to Stokes especially transparent. Since an nn-form on an nn-manifold has zero exterior derivative,

LXvolg=d(ιXvolg).\mathcal L_X\mathrm{vol}_g =d(\iota_X\mathrm{vol}_g).

Comparing this with the definition of divergence and integrating immediately produces the flux identity. This route uses the metric only to construct volg\mathrm{vol}_g; after that, the theorem is an orientation statement.

For a scalar field ϕ\phi, the same density formula gives the Laplace–Beltrami operator in a Riemannian metric or the wave operator in the Lorentzian convention:

□ϕ=∇μ∇μϕ=1∣g∣∂μ ⁣(∣g∣ gμν∂νϕ).\Box\phi =\nabla_\mu\nabla^\mu\phi =\frac1{\sqrt{\lvert g\rvert}} \partial_\mu\!\left( \sqrt{\lvert g\rvert}\,g^{\mu\nu}\partial_\nu\phi \right).

This expression is valid for the Levi-Civita connection. The absolute value inside the square root keeps it meaningful for any fixed nondegenerate signature; in four-dimensional Lorentzian applications it is −g\sqrt{-g}. A coordinate singularity can make the density vanish, as r2sin⁡θr^2\sin\theta does on a polar axis, without making the metric geometrically degenerate there—the chart itself has failed at that locus. By contrast, a zero determinant in a regular chart signals a genuinely degenerate metric.

In three-dimensional Euclidean space with spherical coordinates, ds2=dr2+r2dθ2+r2sin⁡2θ dϕ2ds^2=dr^2+r^2d\theta^2+r^2\sin^2\theta\,d\phi^2, let X=f(r)∂rX=f(r)\partial_r extend smoothly through r=0r=0. Compute its divergence and verify the flux identity on a ball of radius RR.

Solution

Here g=r2sin⁡θ\sqrt{g}=r^2\sin\theta, so

div⁡X=1r2sin⁡θ∂r(r2sin⁡θ f)=1r2ddr(r2f).\operatorname{div}X =\frac{1}{r^2\sin\theta} \partial_r(r^2\sin\theta\,f) =\frac1{r^2}\frac{d}{dr}(r^2f).

Smooth extension of a rotationally invariant radial field requires f(r)=rh(r2)f(r)=r h(r^2) for a smooth function hh near the origin; in particular, r2f(r)→0r^2f(r)\to0. Integrating over the ball gives 4π∫0Rd(r2f)/dr dr=4πR2f(R)4\pi\int_0^R d(r^2f)/dr\,dr=4\pi R^2f(R). This equals the outward boundary flux f(R)Area⁡(SR2)f(R)\operatorname{Area}(S_R^2).

  • Tong, David. General Relativity. University of Cambridge lecture notes, 2019, §3.1.3, pp. 95–96, and §3.2.4, pp. 111–113. Official course PDF.