Surface Integrals and Flux

A surface in R3\mathbb{R}^3 is the first genuinely two-dimensional object we learn to integrate over, and it comes with two integrals that look almost the same on the page and mean completely different things. The scalar surface integral ∬Sg dS\iint_S g\,\mathrm{d}S adds up a scalar field over the surface, each value weighted by a patch of area: it returns the mass of a thin shell, the charge painted on a membrane, or — when g=1g=1 — the plain area. The flux integral ∬SF⋅dS\iint_S \mathbf{F}\cdot\mathrm{d}\mathbf{S} asks a different question of a vector field: how much of F\mathbf{F} actually pierces the surface, counted with the oriented area element dS=n^ dS\mathrm{d}\mathbf{S}=\hat{\mathbf{n}}\,\mathrm{d}S whose direction is the chosen unit normal. One integral is blind to which side you call "out"; the other lives or dies by it. This article is where the vector-calculus toolkit built in aq-mp-line-integrals turns from curves to surfaces. The engine is a single geometric fact: a parametrization r(u,v)\mathbf{r}(u,v) carries the flat parameter rectangle DD onto the curved surface, and the cross product ∂ur×∂vr\partial_u\mathbf{r}\times\partial_v\mathbf{r} simultaneously points along the normal and measures how much a patch of DD stretches. That one vector packages orientation and area together, converting every abstract surface integral into an ordinary double integral. Everything downstream — the divergence theorem of aq-mp-divergence-gauss-theorem, Stokes' theorem, Gauss's law, the continuity equation — is built on the flux integral defined here, so this is the load-bearing node of the whole integral-theorem head.

Key takeaways
  • A surface integral generalizes the ordinary integral to a curved two-dimensional surface SS: either a scalar field weighted by the area element dS\mathrm{d}S, or the normal component of a vector field weighted by the oriented vector area dS=n^ dS\mathrm{d}\mathbf{S}=\hat{\mathbf{n}}\,\mathrm{d}S.
  • The flux of F\mathbf{F} through SS is Φ=∬SF⋅dS\Phi=\iint_S \mathbf{F}\cdot\mathrm{d}\mathbf{S}, the net rate at which F\mathbf{F} crosses SS in the chosen normal direction.
  • A parametrization r(u,v)\mathbf{r}(u,v) turns either integral into a double integral over the flat domain DD, with dS=(∂ur×∂vr) du dv\mathrm{d}\mathbf{S}=(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\,\mathrm{d}u\,\mathrm{d}v — one cross product carrying both the normal direction and the area stretch.
  • Orientation matters for flux and only for flux: reversing n^\hat{\mathbf{n}} flips the sign, while the scalar surface integral, built from the magnitude ∣∂ur×∂vr∣|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|, does not notice.
  • Surface integrals are the right-hand sides of the great theorems: flux out of a closed surface equals the volume integral of the divergence (Gauss), and flux of the curl through a capped surface equals a line integral around its boundary (Stokes).
  • Anchor result: the inverse-square field F=r^/r2\mathbf{F}=\hat{\mathbf{r}}/r^2 has flux ∮SF⋅dS=4π\oint_S\mathbf{F}\cdot\mathrm{d}\mathbf{S}=4\pi through any sphere about the origin — radius-independent, the geometric seed of Gauss's law.
  • Key idea: a flux integral is the limit of the sum ∑Fi⋅n^i ΔSi\sum \mathbf{F}_i\cdot\hat{\mathbf{n}}_i\,\Delta S_i — chop the surface into tiny patches, project the field onto each patch's normal, multiply by the patch area, and add; parametrizing packages the normal and the area scaling into the single vector ∂ur×∂vr\partial_u\mathbf{r}\times\partial_v\mathbf{r}.
The core insight

A flux integral is the limit of a sum ∑Fi⋅n^i ΔSi\sum \mathbf{F}_i\cdot\hat{\mathbf{n}}_i\,\Delta S_i: chop the surface into tiny patches, project the field onto each patch's normal, multiply by the patch area, and add. Parametrizing packages the normal direction and the area scaling together in the single vector ∂ur×∂vr\partial_u\mathbf{r}\times\partial_v\mathbf{r}.

Where this lives today

The flux integral is the quiet workhorse under quantitative field physics. In electromagnetism, every finite-element field solver — the software behind antennas, motors, MRI magnets, and microchip interconnects — discretizes Gauss's and Ampère's laws as flux balances across mesh faces. In climate, ocean, and fluid modelling, a finite-volume code is nothing but the divergence theorem applied cell by cell, so global conservation is exact: each internal face's outward flux for one cell is the inward flux for its neighbour. At the frontier, flux is a diagnostic of topology: the integral of the Berry curvature over a closed surface in parameter space is quantized to 2π2\pi times an integer (a Chern number), and that integer is what makes the quantum Hall conductance and topological insulators robust — a direct descendant of the sphere-flux 4π4\pi above. Wherever a conservation law meets a boundary, this integral does the accounting.

The physical picture

Hold a wire-frame window out in a rainstorm. The flux through it is the volume of rain per second passing through the frame. Face the window squarely into the falling rain and the flux is maximal; tilt it edge-on and the flux drops to zero — not because the rain changed, but because only the component of the rain's velocity along the window's normal counts. That projection is exactly F⋅n^=∣F∣cos⁡θ\mathbf{F}\cdot\hat{\mathbf{n}}=|\mathbf{F}|\cos\theta, and the first figure makes the cosine law concrete with numbers.

Figure
A uniform field F meets a tilted patch of area A = 2 m². Only the normal component F cosθ pierces it, so the flux is Φ = F A cosθ = 5 × 2 × cos60° = 5. Turn the patch edge-on so θ → 90° and the flux falls to zero even though the field never changed.
Flux is field × area × cosine of the tilt: Φ = F·n̂ A = F A cosθ uniform field F tilted patch, area A = 2 m² n̂ θ = 60° |F| = 5, A = 2 m² Φ = F A cosθ = 5 × 2 × 0.5 = 5

The second geometric idea is that a single cross product does all the work of the patch: the two tangent steps ∂ur du\partial_u\mathbf{r}\,\mathrm{d}u and ∂vr dv\partial_v\mathbf{r}\,\mathrm{d}v span a little parallelogram of area ∣∂ur×∂vr∣ du dv|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|\,\mathrm{d}u\,\mathrm{d}v, and the cross product points perpendicular to both — along the normal. The next figure applies this to the most important surface in physics: a sphere in the inverse-square field, where the geometry hands you Gauss's law.

Figure
The inverse-square field F = r̂/r² pierces a sphere of radius a with outward element dS = r̂ a² sinθ dθ dφ. The a² of the area cancels the 1/a² of the field, so the total flux is ∮ F·dS = 4π for every radius a — the geometric core of Gauss's law, equal to the full solid angle 4π ≈ 12.566 steradians.
The punchline: a² cancels 1/a², so ∮ (r̂/r²)·dS = 4π for every sphere larger sphere 2a — same flux 4π q dS F = r̂/r², on r = a: |F| = 1/a² dS = r̂ a² sinθ dθ dφ F·dS = sinθ dθ dφ ∮ F·dS = 4π

One last contrast. Scalar versus vector integration is spray-painting the surface (how much paint — orientation irrelevant) versus asking how much wind blows through a screen door (which way you call "through" is part of the question). And for a closed surface, positive outward flux means the field is, on balance, leaving the region — a source inside, the seed of the divergence theorem.

The core equations

The scalar surface integral is the direct generalization of the ordinary integral: replace the interval by a surface, and the length element dx\mathrm{d}x by the area element dS\mathrm{d}S. A parametrization r(u,v)\mathbf{r}(u,v) over a flat region DD turns it into a double integral, with the Jacobian supplied by the magnitude of the tangent cross product.

∬Sg dS=∬Dg(r(u,v)) ∣∂r∂u×∂r∂v∣ du dv(1)\iint_S g\,\mathrm{d}S = \iint_D g(\mathbf{r}(u,v))\,\left|\frac{\partial\mathbf{r}}{\partial u}\times\frac{\partial\mathbf{r}}{\partial v}\right|\,\mathrm{d}u\,\mathrm{d}v \qquad (1)

where: gg — scalar field on (a neighbourhood of) the surface; SS — the surface in R3\mathbb{R}^3; r(u,v)\mathbf{r}(u,v) — parametrization mapping a planar region DD onto SS; DD — the parameter domain in the (u,v)(u,v) plane; dS=∣∂ur×∂vr∣ du dv\mathrm{d}S=|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|\,\mathrm{d}u\,\mathrm{d}v — the scalar area element. The flux integral replaces the scalar weight by a directed one. It projects F\mathbf{F} onto the unit normal before weighting by area, so it measures throughput rather than accumulation.

Φ=∬SF⋅dS=∬SF⋅n^ dS(2)\Phi=\iint_S \mathbf{F}\cdot\mathrm{d}\mathbf{S}=\iint_S \mathbf{F}\cdot\hat{\mathbf{n}}\,\mathrm{d}S \qquad (2)

where: F\mathbf{F} — the vector field; n^\hat{\mathbf{n}} — unit normal selecting the orientation; dS=n^ dS\mathrm{d}\mathbf{S}=\hat{\mathbf{n}}\,\mathrm{d}S — oriented (vector) area element; Φ\Phi — the flux, a scalar whose sign is set by the choice of side. Reading: only the component of F\mathbf{F} along n^\hat{\mathbf{n}} crosses; the tangential part slides along the surface and contributes nothing. The bridge from the abstract definition to a computable integral is the parametric area element — the single most useful formula on the page, producing the normal direction and the area scaling in one stroke.

dS=(∂r∂u×∂r∂v)du dv,n^=∂ur×∂vr∣∂ur×∂vr∣(3)\mathrm{d}\mathbf{S}=\left(\frac{\partial\mathbf{r}}{\partial u}\times\frac{\partial\mathbf{r}}{\partial v}\right)\mathrm{d}u\,\mathrm{d}v,\qquad \hat{\mathbf{n}}=\frac{\partial_u\mathbf{r}\times\partial_v\mathbf{r}}{|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|} \qquad (3)

where: ∂ur, ∂vr\partial_u\mathbf{r},\,\partial_v\mathbf{r} — tangent vectors to the coordinate curves on SS. Reading: the cross product's magnitude is the local area stretch and its direction is the normal — check that direction against the required orientation. For a graph z=f(x,y)z=f(x,y) — the most common concrete case — the parametric element specializes to a formula worth memorizing, with the tell-tale square root of the scalar element.

dS=1+fx2+fy2 dx dy,dS=(−fx,−fy,1) dx dy(4)\mathrm{d}S=\sqrt{1+f_x^2+f_y^2}\,\mathrm{d}x\,\mathrm{d}y,\qquad \mathrm{d}\mathbf{S}=(-f_x,-f_y,1)\,\mathrm{d}x\,\mathrm{d}y \qquad (4)

where: f(x,y)f(x,y) — height function; fx,fyf_x,f_y — its partial slopes. Curved closed surfaces are almost always handled in spherical coordinates, where the sphere's oriented element is a standard object to recognize on sight.

dS=r^ a2sin⁡θ dθ dϕ(sphere of radius a)(5)\mathrm{d}\mathbf{S}=\hat{\mathbf{r}}\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi \qquad (\text{sphere of radius } a) \qquad (5)

where: aa — sphere radius; θ\theta — polar angle from the zz-axis, 0≤θ≤π0\le\theta\le\pi; ϕ\phi — azimuth, 0≤ϕ<2π0\le\phi<2\pi; r^\hat{\mathbf{r}} — outward radial normal. Finally, the flux integral is one side of the two great integral theorems that reduce it to a volume integral or a line integral, recalled here by name and owned by the articles that follow.

∯∂VF⋅dS=∭V(∇⋅F) dV,∬S(∇×F)⋅dS=∮∂SF⋅dℓ(6)\oiint_{\partial V}\mathbf{F}\cdot\mathrm{d}\mathbf{S}=\iiint_V (\nabla\cdot\mathbf{F})\,\mathrm{d}V,\qquad \iint_S (\nabla\times\mathbf{F})\cdot\mathrm{d}\mathbf{S}=\oint_{\partial S}\mathbf{F}\cdot\mathrm{d}\boldsymbol{\ell} \qquad (6)

where: ∂V\partial V — the outward-oriented closed boundary of a region VV; ∂S\partial S — the boundary curve of SS, oriented by the right-hand rule with n^\hat{\mathbf{n}}; ∇⋅F\nabla\cdot\mathbf{F}, ∇×F\nabla\times\mathbf{F} — divergence and curl. Reading: divergence trades a closed surface integral for a volume of sources; Stokes trades a capped surface integral for a circulation around its rim.

Derivation AWhy the cross product is the oriented area element

The goal is to prove, from the ground up, that the oriented area element of a parametrized surface is dS=(∂ur×∂vr) du dv\mathrm{d}\mathbf{S}=(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\,\mathrm{d}u\,\mathrm{d}v — that one cross product simultaneously delivers the correct patch area (its magnitude) and the correct normal direction (its orientation). We build a single curved patch from two tangent steps, read its area as a parallelogram, confirm the cross product is normal, and take the limit so a sum over patches becomes the integral.

Step 1. Fix a point r(u,v)\mathbf{r}(u,v) on SS and take two small parameter steps. Moving by Δu\Delta u displaces us along the surface by Δru≈∂ur Δu\Delta\mathbf{r}_u\approx\partial_u\mathbf{r}\,\Delta u, and moving by Δv\Delta v by Δrv≈∂vr Δv\Delta\mathbf{r}_v\approx\partial_v\mathbf{r}\,\Delta v; to first order the curved patch is the flat parallelogram these two edges span. Why: differentiability means the surface is locally its tangent plane, so a curved patch and its parallelogram approximation agree to the order that survives the limit.

Step 2. The area of that parallelogram is the magnitude of the cross product of its edges: ΔS=∣Δru×Δrv∣=∣∂ur×∂vr∣ Δu Δv\Delta S=|\Delta\mathbf{r}_u\times\Delta\mathbf{r}_v|=|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|\,\Delta u\,\Delta v. This is the geometric meaning of the cross-product magnitude — base times height of the spanned parallelogram — and it is the area-stretch factor between the flat (u,v)(u,v) rectangle and the curved patch. Why: ∣a×b∣=∣a∣∣b∣sin⁡α|\mathbf{a}\times\mathbf{b}|=|\mathbf{a}||\mathbf{b}|\sin\alpha is exactly the parallelogram area, so no separate Jacobian calculation is needed.

Step 3. The direction of ∂ur×∂vr\partial_u\mathbf{r}\times\partial_v\mathbf{r} is normal to the surface, because a cross product is orthogonal to each of its factors: (∂ur×∂vr)⋅∂ur=0(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\cdot\partial_u\mathbf{r}=0 and likewise for ∂vr\partial_v\mathbf{r}. Since both tangent vectors lie in the tangent plane, anything perpendicular to both is along n^\hat{\mathbf{n}}. Why: this is what lets a single vector carry the orientation — we never have to compute the normal separately, it falls out of the same cross product that gave the area.

Step 4. Combine magnitude and direction and pass to the limit. Writing dS=(∂ur×∂vr) du dv\mathrm{d}\mathbf{S}=(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\,\mathrm{d}u\,\mathrm{d}v, the flux becomes ∬SF⋅dS=∬DF(r)⋅(∂ur×∂vr) du dv\iint_S\mathbf{F}\cdot\mathrm{d}\mathbf{S}=\iint_D\mathbf{F}(\mathbf{r})\cdot(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\,\mathrm{d}u\,\mathrm{d}v, an ordinary double integral over the flat domain DD. Why: this is the whole algorithm — every surface integral you ever compute is this reduction, with the cross product supplying both the geometry and the orientation in one object. *Why: for the graph r=(x,y,f)\mathbf{r}=(x,y,f) this gives (1,0,fx)×(0,1,fy)=(−fx,−fy,1)(1,0,f_x)\times(0,1,f_y)=(-f_x,-f_y,1), with magnitude 1+fx2+fy2\sqrt{1+f_x^2+f_y^2}, reproducing equation (4).*

Go deeper · Derivation B · 1 minFlux of the inverse-square field through a sphere
Derivation BFlux of the inverse-square field through a sphere

The goal is to compute the flux ∮SF⋅dS\oint_S\mathbf{F}\cdot\mathrm{d}\mathbf{S} of the inverse-square field F=r^/r2\mathbf{F}=\hat{\mathbf{r}}/r^2 through a sphere of radius aa centred at the origin, and to see the cancellation that makes the answer independent of aa. This single calculation is the prototype of Gauss's law: it explains why the total electric flux out of any sphere around a point charge is the same, and why that total measures the enclosed charge, not the size of the surface.

Step 1. Evaluate the field on the surface. On the sphere r=ar=a, so F=r^/a2\mathbf{F}=\hat{\mathbf{r}}/a^2 — a constant magnitude 1/a21/a^2 pointing radially outward everywhere on SS. Why: the surface is a level set of rr, so the awkward 1/r21/r^2 becomes a constant we can pull out of the integral.

Step 2. Write the oriented area element. With the outward normal n^=r^\hat{\mathbf{n}}=\hat{\mathbf{r}}, equation (5) gives dS=r^ a2sin⁡θ dθ dϕ\mathrm{d}\mathbf{S}=\hat{\mathbf{r}}\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi. Why: the outward radial direction is the natural orientation of a closed surface, and it happens to be parallel to the field, which will make the dot product trivial.

Step 3. Form the integrand. Because r^⋅r^=1\hat{\mathbf{r}}\cdot\hat{\mathbf{r}}=1, we get F⋅dS=1a2 a2sin⁡θ dθ dϕ=sin⁡θ dθ dϕ\mathbf{F}\cdot\mathrm{d}\mathbf{S}=\frac{1}{a^2}\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi=\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi — the two factors of a2a^2 cancel exactly and the radius disappears. Why: this cancellation is the whole point — the field weakens as 1/a21/a^2 while the sphere's area grows as a2a^2, so the product is scale-free, which is special to the inverse-square law and to no other power.

Step 4. Integrate over the full sphere: ∫02π ⁣ ⁣∫0πsin⁡θ dθ dϕ=(2π)(2)=4π\int_0^{2\pi}\!\!\int_0^{\pi}\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi=(2\pi)(2)=4\pi. Why: ∫0πsin⁡θ dθ=2\int_0^\pi\sin\theta\,\mathrm{d}\theta=2 and ∫02πdϕ=2π\int_0^{2\pi}\mathrm{d}\phi=2\pi; the answer 4π4\pi is precisely the total solid angle a full sphere subtends at its centre. *Why: the result 4π4\pi is independent of aa and equals the full solid angle 4π4\pi steradians; substituting the physical field F=E=qr^/(4πε0r2)\mathbf{F}=\mathbf{E}=q\hat{\mathbf{r}}/(4\pi\varepsilon_0 r^2) immediately reproduces Gauss's law ∮E⋅dS=q/ε0\oint\mathbf{E}\cdot\mathrm{d}\mathbf{S}=q/\varepsilon_0.*

Go deeper · Derivation C · 1 minThe flux integral over a graph carries no square root
Derivation CThe flux integral over a graph carries no square root

The goal is to reduce the flux of a general field through a graph z=f(x,y)z=f(x,y) to a plain double integral over the shadow region DD in the xyxy-plane, and to explain a fact that surprises every student: the square root 1+fx2+fy2\sqrt{1+f_x^2+f_y^2} that dominates the scalar area element is completely absent from the flux integral. Understanding why it cancels is the cleanest way to internalize the difference between dS\mathrm{d}S and dS\mathrm{d}\mathbf{S}.

Step 1. Parametrize the graph by its own x,yx,y: r=(x,y,f(x,y))\mathbf{r}=(x,y,f(x,y)), so the tangent vectors are ∂xr=(1,0,fx)\partial_x\mathbf{r}=(1,0,f_x) and ∂yr=(0,1,fy)\partial_y\mathbf{r}=(0,1,f_y). Their cross product is ∂xr×∂yr=(−fx,−fy,1)\partial_x\mathbf{r}\times\partial_y\mathbf{r}=(-f_x,-f_y,1), giving dS=(−fx,−fy,1) dx dy\mathrm{d}\mathbf{S}=(-f_x,-f_y,1)\,\mathrm{d}x\,\mathrm{d}y with the +1+1 in the zz-slot fixing upward orientation. Why: this is equation (4) again, and the positive third component is the anchor that tells us which way "up" is — flip its sign for a downward normal.

Step 2. Dot with the field. With F=(Fx,Fy,Fz)\mathbf{F}=(F_x,F_y,F_z) evaluated at (x,y,f(x,y))(x,y,f(x,y)), the integrand is F⋅dS=(−Fxfx−Fyfy+Fz) dx dy\mathbf{F}\cdot\mathrm{d}\mathbf{S}=\big(-F_xf_x-F_yf_y+F_z\big)\,\mathrm{d}x\,\mathrm{d}y. Why: the vector element already contains the normal direction, so the projection F⋅n^\mathbf{F}\cdot\hat{\mathbf{n}} and the area weight dS\mathrm{d}S are done in a single dot product.

Step 3. See the cancellation explicitly. In the equivalent form F⋅n^ dS\mathbf{F}\cdot\hat{\mathbf{n}}\,\mathrm{d}S, the unit normal n^=(−fx,−fy,1)/1+fx2+fy2\hat{\mathbf{n}}=(-f_x,-f_y,1)/\sqrt{1+f_x^2+f_y^2} carries a 1/⋯1/\sqrt{\cdots}, while dS=1+fx2+fy2 dx dy\mathrm{d}S=\sqrt{1+f_x^2+f_y^2}\,\mathrm{d}x\,\mathrm{d}y carries the matching ⋯\sqrt{\cdots}; the two are reciprocals and cancel. Why: the square root is an area magnitude, and flux only ever needs the normal times the area — the magnitude that stretches the area is exactly undone by the magnitude that normalizes the normal. *Why: setting F=(0,0,1)\mathbf{F}=(0,0,1) gives ∬Ddx dy\iint_D\mathrm{d}x\,\mathrm{d}y, the plain projected area — the correct upward flux of a unit vertical field through any graph.*

Limiting cases

Special configurations collapse the general integral to shapes you can check by inspection — the fastest sanity tests when a full computation looks suspicious.

CaseResultMeaning
Flat patch, uniform fieldΦ=F⋅n^ A=FAcos⁡θ\Phi=\mathbf{F}\cdot\hat{\mathbf{n}}\,A=FA\cos\thetaconstant field through a planar area AA: field times area times the cosine of the tilt — the rain-window law of the first figure
Field tangent to the surfaceF⋅n^=0⇒Φ=0\mathbf{F}\cdot\hat{\mathbf{n}}=0\Rightarrow\Phi=0if F\mathbf{F} lies in the surface everywhere, nothing crosses it and the flux vanishes whatever the field strength
Scalar integral with g=1g=1∬SdS=Area⁡(S)\iint_S\mathrm{d}S=\operatorname{Area}(S)the surface integral of unity returns the plain area — the base-case check on any parametrization
Inverse-square field, any sphere∮Sr^r2⋅dS=4π\oint_S\frac{\hat{\mathbf{r}}}{r^2}\cdot\mathrm{d}\mathbf{S}=4\piradius-independent, because a2a^2 area cancels 1/a21/a^2 field — the geometric core of Gauss's law
Divergence-free field, closed surface∮∂VF⋅dS=0\oint_{\partial V}\mathbf{F}\cdot\mathrm{d}\mathbf{S}=0if ∇⋅F=0\nabla\cdot\mathbf{F}=0 inside, inflow balances outflow — the source-free divergence theorem

Worked examples

1 · Flux through a hemisphere, with a numerical cross-check (confidence builder)

Find the upward flux of F=(0,0,z)\mathbf{F}=(0,0,z) through the curved upper hemisphere x2+y2+z2=a2, z≥0x^2+y^2+z^2=a^2,\ z\ge0, for radius a=2a=2. Then verify it with the divergence theorem.

Step 1. Parametrize by spherical angles: r=a(sin⁡θcos⁡ϕ,sin⁡θsin⁡ϕ,cos⁡θ)\mathbf{r}=a(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta) with θ∈[0,π2]\theta\in[0,\tfrac{\pi}{2}], ϕ∈[0,2π)\phi\in[0,2\pi). The outward element is dS=r^ a2sin⁡θ dθ dϕ\mathrm{d}\mathbf{S}=\hat{\mathbf{r}}\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi, and since F\mathbf{F} has only a zz-component we need only r^z=cos⁡θ\hat{r}_z=\cos\theta.

Step 2. Build the integrand. On the surface z=acos⁡θz=a\cos\theta, so F⋅dS=z r^z a2sin⁡θ dθ dϕ=(acos⁡θ)(cos⁡θ) a2sin⁡θ dθ dϕ=a3cos⁡2θsin⁡θ dθ dϕ\mathbf{F}\cdot\mathrm{d}\mathbf{S}=z\,\hat{r}_z\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi=(a\cos\theta)(\cos\theta)\,a^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi=a^3\cos^2\theta\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi.

Step 3. Integrate. Substituting u=cos⁡θu=\cos\theta, ∫0π/2cos⁡2θsin⁡θ dθ=∫01u2 du=13\int_0^{\pi/2}\cos^2\theta\sin\theta\,\mathrm{d}\theta=\int_0^1 u^2\,\mathrm{d}u=\tfrac13, and ∫02πdϕ=2π\int_0^{2\pi}\mathrm{d}\phi=2\pi, so Φ=a3(2π)(13)=2πa33\Phi=a^3(2\pi)(\tfrac13)=\dfrac{2\pi a^3}{3}. For a=2a=2: Φ=2π(8)3=16π3≈16.76\Phi=\dfrac{2\pi(8)}{3}=\dfrac{16\pi}{3}\approx\mathbf{16.76}.

Step 4. Cross-check with Gauss. Close the hemisphere with the flat disk at z=0z=0 to bound a half-ball. Then ∇⋅F=∂zz=1\nabla\cdot\mathbf{F}=\partial_z z=1, so the total outward flux equals the volume, ∭V1 dV=23πa3\iiint_V 1\,\mathrm{d}V=\tfrac23\pi a^3. The flat disk contributes nothing because z=0z=0 there makes F=0\mathbf{F}=0, so all of it exits the curved cap: Φcap=23πa3=16π3\Phi_{\text{cap}}=\tfrac23\pi a^3=\dfrac{16\pi}{3} for a=2a=2. The parametric integral and the divergence theorem agree: Φ = 16π/3 ≈ 16.76.

2 · Flux of a radial field out of a sphere, two ways

Compute the outward flux of the radial field F=(x,y,z)=rr^\mathbf{F}=(x,y,z)=r\hat{\mathbf{r}} through a sphere of radius RR, directly and via the divergence theorem. Evaluate at R=2R=2.

Step 1. Direct surface integral. On the sphere the outward normal is n^=r^=(x,y,z)/R\hat{\mathbf{n}}=\hat{\mathbf{r}}=(x,y,z)/R, so F⋅n^=(x,y,z)⋅(x,y,z)/R=(x2+y2+z2)/R=R2/R=R\mathbf{F}\cdot\hat{\mathbf{n}}=(x,y,z)\cdot(x,y,z)/R=(x^2+y^2+z^2)/R=R^2/R=R — a constant over the whole surface.

Step 2. Multiply by the area. Since the integrand is the constant RR, Φ=R×Area⁡(S)=R (4πR2)=4πR3\Phi=R\times\operatorname{Area}(S)=R\,(4\pi R^2)=\mathbf{4\pi R^3}.

Step 3. Divergence-theorem check. Here ∇⋅F=∂xx+∂yy+∂zz=3\nabla\cdot\mathbf{F}=\partial_x x+\partial_y y+\partial_z z=3, a constant, so Φ=∭V3 dV=3⋅43πR3=4πR3\Phi=\iiint_V 3\,\mathrm{d}V=3\cdot\tfrac43\pi R^3=4\pi R^3 — identical, as an exact identity must give.

Step 4. Numbers. At R=2R=2, Φ=4π(2)3=32π≈100.5\Phi=4\pi(2)^3=32\pi\approx\mathbf{100.5}. Note the contrast with the inverse-square case: this radial field grows with rr, so its flux scales as R3R^3 and is emphatically not radius-independent — only the special 1/r21/r^2 field gives the scale-free 4π4\pi. Both methods give Φ = 4πR³ = 32π ≈ 100.5 at R = 2.

Physics of the portrait

The flux integral is inseparable from the man whose name sits on its most important instance: "Gauss's law", the "divergence (Gauss) theorem", and "Gaussian surface" all descend from Carl Friedrich Gauss's work on potentials and attraction.

Origins · 1 minCarl Friedrich Gauss and how this was discovered
CF
Carl Friedrich Gauss
1777–1855 · flux, potential theory, and the divergence theorem

Gauss was the outstanding mathematician of the nineteenth century, and flux integration threads through his work. In 1813, computing the gravitational attraction of an ellipsoidal planet, he proved a version of what we now call the divergence theorem — converting the flux of an inverse-square field through a closed surface into an integral over the enclosed matter — the reasoning that becomes Gauss's law once the field is electric rather than gravitational. (The fully general theorem was proved independently by Mikhail Ostrogradsky in 1826, so the identity is properly the Gauss–Ostrogradsky theorem.) His collaboration with Wilhelm Weber on terrestrial magnetism produced "Gauss's law for magnetism", ∮B⋅dS=0\oint\mathbf{B}\cdot\mathrm{d}\mathbf{S}=0 — the statement, in flux language, that magnetic field lines never end because there are no magnetic charges, and one of the two flux equations Maxwell later built into electromagnetism. The humble surface integral of this article is the working end of a line of thought Gauss began by asking how a planet pulls on a distant point.

History
1813
— Gauss proves a divergence (flux) theorem while computing gravitational attraction
1826
— Ostrogradsky gives the first general proof of the divergence theorem
1828
— Green's essay founds potential theory and the identities behind flux integrals
1850
— Kelvin states the curl-flux (Stokes) theorem in a letter to Stokes
1865
— Maxwell casts electromagnetism as the flux and circulation of fields

Going further

Texts. Stone & Goldbart, Mathematics for Physics, Ch. 10–11 (vector calculus and the integral theorems) · Arfken & Weber, Mathematical Methods for Physicists, 7th ed., §3.5–3.9 · Hassani, Mathematical Physics, Ch. 15 (vector analysis) · Nakahara, Geometry, Topology and Physics, §5.4 (integration of forms, the modern view) · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 11 · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 1. Key numerical checks: (1) the graph cross product (1,0,fx)×(0,1,fy)=(−fx,−fy,1)(1,0,f_x)\times(0,1,f_y)=(-f_x,-f_y,1) with magnitude 1+fx2+fy2\sqrt{1+f_x^2+f_y^2}; (2) the sphere flux ∫02π ⁣∫0πsin⁡θ dθ dϕ=4π\int_0^{2\pi}\!\int_0^\pi\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi=4\pi; (3) the hemisphere flux 2πa3/3=16π/3≈16.762\pi a^3/3=16\pi/3\approx16.76 at a=2a=2, consistent with the divergence theorem using ∇⋅(0,0,z)=1\nabla\cdot(0,0,z)=1 and half-ball volume 2πa3/32\pi a^3/3; (4) the radial-field flux 4πR3=32π≈100.54\pi R^3=32\pi\approx100.5 at R=2R=2, obtained both from F⋅r^=R\mathbf{F}\cdot\hat{\mathbf{r}}=R over area 4πR24\pi R^2 and from ∇⋅F=3\nabla\cdot\mathbf{F}=3 over volume 43πR3\tfrac43\pi R^3. The value 4π4\pi is the total solid angle in steradians.

Prerequisites. Scalar and Vector Fields · Line Integrals · The Directional Derivative. Leads to. The Divergence (Gauss) Theorem · Stokes' Theorem · Volume Integrals · Divergence of a Vector Field.

Ask the tutor: Ask me to walk you through setting up the flux of any field through any surface you like — a cone, a paraboloid, a cube — and we will check it both directly and with the divergence theorem.

What is the actual difference between dS and dS?

The scalar element dS=∣∂ur×∂vr∣ du dv\mathrm{d}S=|\partial_u\mathbf{r}\times\partial_v\mathbf{r}|\,\mathrm{d}u\,\mathrm{d}v is a positive number — a little piece of area — used to accumulate a scalar field (mass, charge, area). The vector element dS=n^ dS=(∂ur×∂vr) du dv\mathrm{d}\mathbf{S}=\hat{\mathbf{n}}\,\mathrm{d}S=(\partial_u\mathbf{r}\times\partial_v\mathbf{r})\,\mathrm{d}u\,\mathrm{d}v is that same area pointed along the normal, used to measure how much of a vector field crosses the surface. Their magnitude is identical; the vector one additionally carries a direction, and that direction is what makes flux orientation-dependent and scalar integrals not. When in doubt, ask whether your integrand is a scalar (use dS\mathrm{d}S) or a vector you must dot with a normal (use dS\mathrm{d}\mathbf{S}).

How do I decide which way the normal should point?

For an open surface (a disk, a graph, a cap) the orientation is your free choice, but it must be stated, because it fixes the sign of the flux; if the surface bounds a Stokes loop, the right-hand rule ties n^\hat{\mathbf{n}} to the direction you traverse the boundary. For a closed surface the universal convention is the outward normal, so positive flux means net outflow. In practice, compute ∂ur×∂vr\partial_u\mathbf{r}\times\partial_v\mathbf{r}, check the sign of one component you can reason about (does the zz-slot point up? does the radial part point away from the origin?), and swap the cross-product order — or negate — if it disagrees with the orientation you want.

Why does the graph flux formula have no square root when the area formula does?

Because flux needs the normal direction times the area, and the square root is precisely the area magnitude. Write F⋅n^ dS\mathbf{F}\cdot\hat{\mathbf{n}}\,\mathrm{d}S: the unit normal n^=(−fx,−fy,1)/1+fx2+fy2\hat{\mathbf{n}}=(-f_x,-f_y,1)/\sqrt{1+f_x^2+f_y^2} carries a 1/⋯1/\sqrt{\cdots}, and the scalar area dS=1+fx2+fy2 dx dy\mathrm{d}S=\sqrt{1+f_x^2+f_y^2}\,\mathrm{d}x\,\mathrm{d}y carries the matching ⋯\sqrt{\cdots}. Being reciprocals, they cancel, leaving the clean (−fx,−fy,1) dx dy(-f_x,-f_y,1)\,\mathrm{d}x\,\mathrm{d}y. A scalar integral, with no normal to normalize, keeps its square root — which is why measuring surface area is genuinely harder than computing flux through the same graph.

Can I integrate flux over a Möbius band?

No — and the reason is exactly why orientation matters. Flux requires a continuous choice of unit normal over the whole surface, and a Möbius band admits none: slide a normal once around the band and it returns reversed. Such a surface is non-orientable, and ∬SF⋅dS\iint_S\mathbf{F}\cdot\mathrm{d}\mathbf{S} is simply undefined on it. The scalar integral ∬Sg dS\iint_S g\,\mathrm{d}S is fine, though, because it uses only the positive magnitude dS\mathrm{d}S and never the normal — you can compute the area or painted mass of a Möbius strip without trouble. Orientability is the precise dividing line between the two kinds of surface integral.

If two surfaces share the same boundary loop, do they give the same flux?

For a general field, no — but for a divergence-free field, yes, a deep and useful fact. If ∇⋅F=0\nabla\cdot\mathbf{F}=0, two surfaces sharing a boundary loop bound a closed region, and the divergence theorem forces their fluxes to be equal (both equal the enclosed sources, which are zero). This is why the magnetic flux ΦB=∬SB⋅dS\Phi_B=\iint_S\mathbf{B}\cdot\mathrm{d}\mathbf{S} through a circuit depends only on the loop, not on the spanning surface, since ∇⋅B=0\nabla\cdot\mathbf{B}=0. For a field with sources, the two fluxes differ by exactly the source enclosed between the surfaces — the content of Gauss's law.

How is this one integral the basis of the divergence and Stokes theorems?

Both great theorems put a flux integral on one side and reduce it to something lower-dimensional. The divergence theorem says the flux out of a closed surface equals the volume integral of ∇⋅F\nabla\cdot\mathbf{F} — the outflow through the boundary equals the sources inside. Stokes' theorem says the flux of the curl ∇×F\nabla\times\mathbf{F} through an open surface equals the circulation ∮F⋅dℓ\oint\mathbf{F}\cdot\mathrm{d}\boldsymbol{\ell} around its rim. In both, the flux integral connects a field's local behaviour (divergence, curl) to a global boundary quantity — which is why mastering F⋅dS\mathbf{F}\cdot\mathrm{d}\mathbf{S} is the prerequisite for the rest of this chapter.

Before this

Where this leads