Vector Operators in Curvilinear Coordinates

Cartesian coordinates are a luxury: the basis vectors x^,y^,z^\hat{\mathbf{x}},\hat{\mathbf{y}},\hat{\mathbf{z}} point the same way at every point in space, so the gradient, divergence and curl are just tidy sums of partial derivatives. The moment a problem has cylindrical or spherical symmetry — a charged wire, a planet, a waveguide, a hydrogen atom — those constant axes become a liability, and it pays to lay a curved grid over space instead. On such a grid the local axes swivel and stretch from point to point, and that single fact is the origin of every extra term that makes ∇⋅A\nabla\cdot\mathbf{A} in spherical coordinates look so much busier than in Cartesian. The device that tames the complication is a set of three numbers, the scale factors hi=∣∂r/∂ui∣h_i=\lvert\partial\mathbf{r}/\partial u_i\rvert, which convert a step in coordinate value into a step in physical length. Once the three hih_i are known as functions of position, the gradient, divergence, curl and Laplacian follow mechanically — you never differentiate a basis vector by hand. The strategy is to give each operator its coordinate-free geometric meaning (gradient as the differential of a scalar, divergence as flux per unit volume, curl as circulation per unit area) and evaluate it on an infinitesimal curvilinear box with edge lengths hi duih_i\,\mathrm{d}u_i; the Divergence and Stokes theorems make the limits exact. The payoff is unification: cylindrical, spherical, parabolic, elliptic and toroidal systems are all one formula with different hih_i inserted, and this is the form in which Laplace's equation, the diffusion equation and Maxwell's equations are solved whenever geometry has symmetry to exploit.

Key takeaways
  • In orthogonal curvilinear coordinates (u1,u2,u3)(u_1,u_2,u_3) each coordinate carries a scale factor hi=∣∂r/∂ui∣h_i=\lvert\partial\mathbf{r}/\partial u_i\rvert that turns a coordinate increment dui\mathrm{d}u_i into a physical arc length hi duih_i\,\mathrm{d}u_i.
  • The whole geometry is packed into one object, the line element ds2=h12 du12+h22 du22+h32 du32\mathrm{d}s^2=h_1^2\,\mathrm{d}u_1^2+h_2^2\,\mathrm{d}u_2^2+h_3^2\,\mathrm{d}u_3^2; every vector operator is read off from it.
  • Gradient uses one factor 1/hi1/h_i; divergence and Laplacian carry the volume Jacobian J=h1h2h3J=h_1h_2h_3; curl is a 3×33\times3 determinant of the covariant components hiAih_iA_i.
  • Inserting the scale factors recovers cylindrical (1,ρ,1)(1,\rho,1) and spherical (1,r,rsin⁡θ)(1,r,r\sin\theta) formulas with no extra labour — one master result, many special cases.
  • Every formula must collapse to the Cartesian expressions when all hi=1h_i=1; any candidate that fails this limit is wrong.
  • Key idea: every orthogonal-coordinate vector operator is built from the three scale factors hi=∣∂r/∂ui∣h_i=\lvert\partial\mathbf{r}/\partial u_i\rvert and the metric ds2=∑ihi2 dui2\mathrm{d}s^2=\sum_i h_i^2\,\mathrm{d}u_i^2; divergence and Laplacian additionally weight by the volume Jacobian J=h1h2h3J=h_1h_2h_3.
The core insight

Every orthogonal-coordinate vector operator is built from the three scale factors hi=∣∂r/∂ui∣h_i=\lvert\partial\mathbf{r}/\partial u_i\rvert and the metric ds2=∑ihi2 dui2\mathrm{d}s^2=\sum_i h_i^2\,\mathrm{d}u_i^2; the divergence and Laplacian additionally weight by the volume Jacobian J=h1h2h3J=h_1h_2h_3.

Where this lives today

The curvilinear operators are the first line of almost every quantitative model that has symmetry to exploit. Separation of variables — the workhorse of mathematical physics — only works because the Laplacian in the right coordinate system splits into independent ordinary differential equations: the spherical Laplacian gives the Legendre equation and the spherical harmonics behind electrostatic multipoles, the CMB power spectrum, and every atomic orbital; the cylindrical Laplacian gives Bessel's equation and the modes of optical fibres and microwave waveguides. Numerical practice leans just as hard on it: finite-element and spectral solvers map irregular geometries onto reference grids through exactly the Jacobian J=h1h2h3J=h_1h_2h_3, and computational fluid dynamics writes the Navier–Stokes equations in body-fitted coordinates so a turbine blade or an artery wall becomes a coordinate surface. In general relativity the same bookkeeping, promoted to a non-diagonal metric gμνg_{\mu\nu}, becomes the covariant derivative — the Lamé coefficients are the flat-space ancestor of the Christoffel symbols. Whenever a simulation reports a field on a sphere, a cylinder, or a warped mesh, equations (4)–(7) are running underneath.

The physical picture

Picture the coordinate surfaces as a curved cage drawn on space. Where they cross, three coordinate curves pass through the point and the local unit vectors e^1,e^2,e^3\hat{\mathbf{e}}_1,\hat{\mathbf{e}}_2,\hat{\mathbf{e}}_3 point along them. A unit step dui=1\mathrm{d}u_i=1 no longer means one metre: it means hih_i metres. The scale factors are the local exchange rate between "coordinate units" and "physical metres", and since every differential operator is a rate of change per physical metre, each derivative ∂/∂ui\partial/\partial u_i is divided by its hih_i. The first figure is the elementary curvilinear box on which all four operators are evaluated: its edges are hi duih_i\,\mathrm{d}u_i, its faces have areas like h2h3 du2 du3h_2h_3\,\mathrm{d}u_2\,\mathrm{d}u_3, and its volume is J du1du2du3J\,\mathrm{d}u_1\mathrm{d}u_2\mathrm{d}u_3.

Figure
The elementary curvilinear box: edges are physical lengths h₁du₁, h₂du₂, h₃du₃, the shaded face has area h₂h₃du₂du₃, and the enclosed volume is J du₁du₂du₃ with Jacobian J = h₁h₂h₃ — divergence is flux through the faces per unit volume, curl is circulation around a face per unit area
The curvilinear box every operator is evaluated on — J = h₁h₂h₃ h₂ du₂ h₃ du₃ h₁ du₁ u₁,u₂,u₃ dV = h₁h₂h₃ du₁du₂du₃ face dS₁ = h₂h₃ du₂du₃ edges swivel and stretch: hᵢ carry all the geometry

The volume Jacobian J=h1h2h3J=h_1h_2h_3 appears in the divergence and Laplacian because those operators measure flux per unit volume, and both the box volume and the face areas are coordinate-dependent — tracking how a face area changes as you cross the box generates the derivative-of-hh terms. Curl, by contrast, is circulation per unit area and involves products of only two scale factors. The second figure makes this concrete for the workhorse case, spherical coordinates, whose scale factors (1, r, rsin⁡θ)(1,\,r,\,r\sin\theta) give the volume element its famous r2sin⁡θr^2\sin\theta.

Figure
Spherical coordinates carry the relation h_r = 1, h_θ = r, h_φ = r sinθ, so the volume element is dV = r²sinθ dr dθ dφ — integrating it over the ball gives the volume 4πr³/3 and over the surface gives the area 4πr², the r²sinθ being the Jacobian that makes both come out right
Spherical scale factors (1, r, r sinθ) and the element dV = r²sinθ dr dθ dφ z axis r θ φ edges of dV: dr = h_r dr = dr r dθ = h_θ dθ r sinθ dφ = h_φ dφ J = h_r h_θ h_φ = r² sinθ ∫J = 4πr³/3 (ball), ∮ = 4πr² (shell)

The core equations

Everything begins with the map from coordinates to physical space. Differentiating the position vector along each coordinate curve gives a tangent vector; its length is the scale factor and its direction is the local unit vector. In orthogonal systems the three tangent directions are mutually perpendicular, which keeps every later formula diagonal.

r=r(u1,u2,u3),hi=∣∂r∂ui∣,e^i=1hi∂r∂ui(1)\mathbf{r}=\mathbf{r}(u_1,u_2,u_3),\qquad h_i=\left|\frac{\partial\mathbf{r}}{\partial u_i}\right|,\qquad \hat{\mathbf{e}}_i=\frac{1}{h_i}\frac{\partial\mathbf{r}}{\partial u_i} \qquad (1)

where: r\mathbf{r} — position vector as a function of the coordinates; uiu_i — the three curvilinear coordinates, i=1,2,3i=1,2,3; hih_i — scale factor, the physical length per unit change in uiu_i; e^i\hat{\mathbf{e}}_i — unit tangent along the uiu_i-curve. Reading it: a coordinate step dui\mathrm{d}u_i moves you hi duih_i\,\mathrm{d}u_i metres along e^i\hat{\mathbf{e}}_i. The line element collects the three scale factors into the single object from which every operator descends. Because the triad is orthonormal the metric is diagonal — no cross terms dui duj\mathrm{d}u_i\,\mathrm{d}u_j.

dr=∑ihi dui e^i,ds2=h12 du12+h22 du22+h32 du32(2)\mathrm{d}\mathbf{r}=\sum_{i}h_i\,\mathrm{d}u_i\,\hat{\mathbf{e}}_i,\qquad \mathrm{d}s^2=h_1^2\,\mathrm{d}u_1^2+h_2^2\,\mathrm{d}u_2^2+h_3^2\,\mathrm{d}u_3^2 \qquad (2)

where: dr\mathrm{d}\mathbf{r} — infinitesimal physical displacement; ds\mathrm{d}s — physical arc length. Reading it: the hi2h_i^2 are the diagonal entries of the metric tensor; knowing them is knowing the geometry. From the line element the geometric measures follow at once. The box built from the three edge vectors has volume equal to the product of the edge lengths (orthogonality again), and each face area is the product of two of them.

dV=h1h2h3 du1 du2 du3,dS1=h2h3 du2 du3 e^1(3)\mathrm{d}V=h_1h_2h_3\,\mathrm{d}u_1\,\mathrm{d}u_2\,\mathrm{d}u_3,\qquad \mathrm{d}\mathbf{S}_1=h_2h_3\,\mathrm{d}u_2\,\mathrm{d}u_3\,\hat{\mathbf{e}}_1 \qquad (3)

where: dV\mathrm{d}V — physical volume of the curvilinear box; dS1\mathrm{d}\mathbf{S}_1 — vector area element on the face of constant u1u_1. The gradient measures rate of change per physical length, so each partial derivative is divided by one scale factor — it is the only operator that carries no Jacobian.

∇ϕ=e^1h1∂ϕ∂u1+e^2h2∂ϕ∂u2+e^3h3∂ϕ∂u3(4)\nabla\phi=\frac{\hat{\mathbf{e}}_1}{h_1}\frac{\partial\phi}{\partial u_1}+\frac{\hat{\mathbf{e}}_2}{h_2}\frac{\partial\phi}{\partial u_2}+\frac{\hat{\mathbf{e}}_3}{h_3}\frac{\partial\phi}{\partial u_3} \qquad (4)

where: ϕ\phi — a scalar field; ∇ϕ\nabla\phi — its gradient vector, pointing along steepest ascent with magnitude equal to the physical slope. Reading it: divide each ∂ϕ/∂ui\partial\phi/\partial u_i by hih_i. The divergence is net outward flux per unit volume. The face areas hjhkh_jh_k are themselves coordinate-dependent, so they sit inside the derivatives, with the 1/(h1h2h3)1/(h_1h_2h_3) prefactor supplied by the box volume.

∇⋅A=1h1h2h3[∂∂u1(h2h3A1)+∂∂u2(h3h1A2)+∂∂u3(h1h2A3)](5)\nabla\cdot\mathbf{A}=\frac{1}{h_1h_2h_3}\left[\frac{\partial}{\partial u_1}(h_2h_3A_1)+\frac{\partial}{\partial u_2}(h_3h_1A_2)+\frac{\partial}{\partial u_3}(h_1h_2A_3)\right] \qquad (5)

where: A\mathbf{A} — vector field with physical components Ai=A⋅e^iA_i=\mathbf{A}\cdot\hat{\mathbf{e}}_i; hjhkh_jh_k — the area factor of the face pierced by AiA_i. Reading it: weight each component by its face area before differentiating. The curl is circulation per unit area, assembling into a determinant whose bottom row holds the covariant components hiAih_iA_i — the projections of A\mathbf{A} onto the physical edge vectors.

∇×A=1h1h2h3∣h1e^1h2e^2h3e^3∂∂u1∂∂u2∂∂u3h1A1h2A2h3A3∣(6)\nabla\times\mathbf{A}=\frac{1}{h_1h_2h_3}\begin{vmatrix}h_1\hat{\mathbf{e}}_1 & h_2\hat{\mathbf{e}}_2 & h_3\hat{\mathbf{e}}_3\\[2pt] \dfrac{\partial}{\partial u_1} & \dfrac{\partial}{\partial u_2} & \dfrac{\partial}{\partial u_3}\\[6pt] h_1A_1 & h_2A_2 & h_3A_3\end{vmatrix} \qquad (6)

where: hiAih_iA_i — covariant component, the piece of A\mathbf{A} appearing in the circulation integral ∮A⋅dr\oint\mathbf{A}\cdot\mathrm{d}\mathbf{r}. Reading it: expand along the top row as for the Cartesian curl, but differentiate hiAih_iA_i, not AiA_i. The Laplacian is ∇⋅(∇ϕ)\nabla\cdot(\nabla\phi), inheriting the Jacobian of the divergence and the 1/hi1/h_i of the gradient in one self-adjoint second-order operator.

∇2ϕ=1h1h2h3[∂∂u1 ⁣(h2h3h1∂ϕ∂u1)+∂∂u2 ⁣(h3h1h2∂ϕ∂u2)+∂∂u3 ⁣(h1h2h3∂ϕ∂u3)](7)\nabla^2\phi=\frac{1}{h_1h_2h_3}\left[\frac{\partial}{\partial u_1}\!\left(\frac{h_2h_3}{h_1}\frac{\partial\phi}{\partial u_1}\right)+\frac{\partial}{\partial u_2}\!\left(\frac{h_3h_1}{h_2}\frac{\partial\phi}{\partial u_2}\right)+\frac{\partial}{\partial u_3}\!\left(\frac{h_1h_2}{h_3}\frac{\partial\phi}{\partial u_3}\right)\right] \qquad (7)

where: ∇2ϕ\nabla^2\phi — the Laplacian of ϕ\phi; each bracket is the divergence formula with Ai=(1/hi)∂ϕ/∂uiA_i=(1/h_i)\partial\phi/\partial u_i inserted. Reading it: the coefficient of each second derivative is hjhk/hih_jh_k/h_i, perpendicular face area over parallel edge length. A final identity closes the loop between the tangent basis e^i\hat{\mathbf{e}}_i and the gradient (normal) basis ∇ui\nabla u_i, and fixes the handedness of the triad.

e^i=hi ∇ui,e^i×e^j=εijk e^k(8)\hat{\mathbf{e}}_i=h_i\,\nabla u_i,\qquad \hat{\mathbf{e}}_i\times\hat{\mathbf{e}}_j=\varepsilon_{ijk}\,\hat{\mathbf{e}}_k \qquad (8)

where: ∇ui\nabla u_i — gradient of the coordinate function, normal to the constant-uiu_i surface; εijk\varepsilon_{ijk} — Levi-Civita symbol enforcing a right-handed ordering. In an orthogonal system tangent and normal directions coincide, so e^i\hat{\mathbf{e}}_i and ∇ui\nabla u_i differ only by the factor hih_i.

Derivation AGradient from the differential of a scalar

The goal is to pin down the gradient not by guessing where the scale factors go, but by demanding the one property that defines it in any coordinate system: that the change in a scalar over an infinitesimal displacement equal the dot product of the gradient with that displacement, dϕ=∇ϕ⋅dr\mathrm{d}\phi=\nabla\phi\cdot\mathrm{d}\mathbf{r}. Writing both sides in the curvilinear basis and matching coefficients of the independent increments dui\mathrm{d}u_i forces the 1/hi1/h_i factors into place with no freedom left, and shows why the gradient is the one operator that carries a single scale factor rather than the Jacobian.

Step 1. Expand the scalar change as a total differential, dϕ=∑i(∂ϕ/∂ui) dui\mathrm{d}\phi=\sum_i(\partial\phi/\partial u_i)\,\mathrm{d}u_i. Why: this is pure calculus — it is how a function of three coordinates changes, with no geometry assumed yet.

Step 2. Write the same change through the defining property, dϕ=∇ϕ⋅dr\mathrm{d}\phi=\nabla\phi\cdot\mathrm{d}\mathbf{r}, and substitute the line element dr=∑ihi dui e^i\mathrm{d}\mathbf{r}=\sum_i h_i\,\mathrm{d}u_i\,\hat{\mathbf{e}}_i from equation (2), giving dϕ=∑i(∇ϕ)i hi dui\mathrm{d}\phi=\sum_i(\nabla\phi)_i\,h_i\,\mathrm{d}u_i. Why: this injects the geometry — each unit of dui\mathrm{d}u_i is worth hih_i physical metres, so the component of the gradient gets multiplied by hih_i.

Step 3. The increments du1,du2,du3\mathrm{d}u_1,\mathrm{d}u_2,\mathrm{d}u_3 are independent, so the coefficients from Steps 1 and 2 must match term by term, forcing (∇ϕ)i hi=∂ϕ/∂ui(\nabla\phi)_i\,h_i=\partial\phi/\partial u_i, hence (∇ϕ)i=(1/hi) ∂ϕ/∂ui(\nabla\phi)_i=(1/h_i)\,\partial\phi/\partial u_i. Why: matching coefficients of independent differentials converts a defining identity into an explicit formula.

Step 4. Reassemble the vector, ∇ϕ=∑i(e^i/hi) ∂ϕ/∂ui\nabla\phi=\sum_i(\hat{\mathbf{e}}_i/h_i)\,\partial\phi/\partial u_i, and check the Cartesian limit hi=1h_i=1, which returns ∂x,∂y,∂z\partial_x,\partial_y,\partial_z. Why: recovering the familiar operator when the grid is straight is the minimum sanity test every curvilinear formula must pass. *For example, setting (hr,hθ,hϕ)=(1,r,rsin⁡θ)(h_r,h_\theta,h_\phi)=(1,r,r\sin\theta) gives ∇ϕ=∂rϕ e^r+(1/r)∂θϕ e^θ+(1/(rsin⁡θ))∂ϕϕ e^ϕ\nabla\phi=\partial_r\phi\,\hat{\mathbf{e}}_r+(1/r)\partial_\theta\phi\,\hat{\mathbf{e}}_\theta+(1/(r\sin\theta))\partial_\phi\phi\,\hat{\mathbf{e}}_\phi, the standard spherical gradient.*

Go deeper · Derivation B · 1 minDivergence from the flux balance on a curvilinear box
Derivation BDivergence from the flux balance on a curvilinear box

The goal is to derive the divergence from its coordinate-free meaning — net outward flux per unit volume in the limit of a vanishing region — by evaluating that flux on the elementary box of the first figure. The subtlety, and the whole reason the formula looks different from Cartesian, is that the area of a face is not constant: as you move from u1u_1 to u1+du1u_1+\mathrm{d}u_1 the opposite face has a different area because h2h3h_2h_3 depends on u1u_1, so keeping that area factor inside the difference is exactly what produces the derivative-of-hh terms.

Step 1. Build the box with edges from uiu_i to ui+duiu_i+\mathrm{d}u_i; its volume is dV=h1h2h3 du1du2du3\mathrm{d}V=h_1h_2h_3\,\mathrm{d}u_1\mathrm{d}u_2\mathrm{d}u_3 from equation (3). Why: the flux-per-volume definition needs the physical volume in the denominator, where the Jacobian first enters.

Step 2. Compute the flux through the two faces of constant u1u_1. The outward flux equals A1A_1 times the face area h2h3 du2du3h_2h_3\,\mathrm{d}u_2\mathrm{d}u_3, and because that area is u1u_1-dependent the net contribution is Φ1=[(h2h3A1)∣u1+du1−(h2h3A1)∣u1] du2du3\Phi_1=[(h_2h_3A_1)|_{u_1+\mathrm{d}u_1}-(h_2h_3A_1)|_{u_1}]\,\mathrm{d}u_2\mathrm{d}u_3. Why: the product h2h3A1h_2h_3A_1, not A1A_1 alone, is what is evaluated on the two faces — this is the crux that a naive treatment gets wrong.

Step 3. Taylor-expand the bracket to first order, Φ1=∂u1(h2h3A1) du1du2du3\Phi_1=\partial_{u_1}(h_2h_3A_1)\,\mathrm{d}u_1\mathrm{d}u_2\mathrm{d}u_3; the other two face pairs are cyclic permutations with h3h1A2h_3h_1A_2 and h1h2A3h_1h_2A_3. Why: first-order expansion is exact in the vanishing-box limit, and cyclic symmetry saves repeating the algebra.

Step 4. Divide the total flux Φ1+Φ2+Φ3\Phi_1+\Phi_2+\Phi_3 by the volume dV\mathrm{d}V; the common du1du2du3\mathrm{d}u_1\mathrm{d}u_2\mathrm{d}u_3 cancels and leaves ∇⋅A=1h1h2h3[∂u1(h2h3A1)+∂u2(h3h1A2)+∂u3(h1h2A3)]\nabla\cdot\mathbf{A}=\dfrac{1}{h_1h_2h_3}[\partial_{u_1}(h_2h_3A_1)+\partial_{u_2}(h_3h_1A_2)+\partial_{u_3}(h_1h_2A_3)]. Why: this ratio is precisely the geometric definition of divergence, now explicit in the scale factors. *As a check: inserting (1,ρ,1)(1,\rho,1) gives 1ρ∂ρ(ρAρ)+1ρ∂ϕAϕ+∂zAz\tfrac1\rho\partial_\rho(\rho A_\rho)+\tfrac1\rho\partial_\phi A_\phi+\partial_z A_z, the standard cylindrical divergence; inserting (1,r,rsin⁡θ)(1,r,r\sin\theta) gives 1r2∂r(r2Ar)+1rsin⁡θ∂θ(sin⁡θAθ)+1rsin⁡θ∂ϕAϕ\tfrac1{r^2}\partial_r(r^2A_r)+\tfrac1{r\sin\theta}\partial_\theta(\sin\theta A_\theta)+\tfrac1{r\sin\theta}\partial_\phi A_\phi, the standard spherical divergence.*

Go deeper · Derivation C · 1 minCurl from circulation around an elementary loop
Derivation CCurl from circulation around an elementary loop

The goal is to extract one component of the curl from its geometric definition — circulation per unit area — and then argue by symmetry that the three components assemble into the compact determinant of equation (6). Working on the constant-u3u_3 face, Stokes' theorem equates the e^3\hat{\mathbf{e}}_3 component of the curl to the line integral of A\mathbf{A} around the loop bounding that face, divided by its area. The key point is that the tangential contribution along each edge is AiA_i times the physical edge length hi duih_i\,\mathrm{d}u_i, so it is the covariant product hiAih_iA_i that gets differentiated.

Step 1. Choose a rectangular loop on the constant-u3u_3 surface, running u1→u1+du1u_1\to u_1+\mathrm{d}u_1 and u2→u2+du2u_2\to u_2+\mathrm{d}u_2, traversed counter-clockwise; its area is h1h2 du1du2h_1h_2\,\mathrm{d}u_1\mathrm{d}u_2. Why: Stokes' theorem needs an oriented bounding loop, and the face area sets the denominator of the circulation-per-area limit.

Step 2. Add the circulation along the two u1u_1-edges. The tangential piece is A1A_1 times the physical length h1 du1h_1\,\mathrm{d}u_1, and the two edges run in opposite senses, giving −∂u2(h1A1) du1du2-\partial_{u_2}(h_1A_1)\,\mathrm{d}u_1\mathrm{d}u_2. Why: the covariant component h1A1h_1A_1 is the natural line-integral density, and the opposite orientation of the parallel edges produces the derivative.

Step 3. The two u2u_2-edges give, by the same argument, +∂u1(h2A2) du1du2+\partial_{u_1}(h_2A_2)\,\mathrm{d}u_1\mathrm{d}u_2. Why: this pair carries the opposite sign under the counter-clockwise traversal, so the two pairs make an antisymmetric combination.

Step 4. Divide the total circulation by the area h1h2 du1du2h_1h_2\,\mathrm{d}u_1\mathrm{d}u_2 to get (∇×A)3=1h1h2[∂u1(h2A2)−∂u2(h1A1)](\nabla\times\mathbf{A})_3=\dfrac{1}{h_1h_2}[\partial_{u_1}(h_2A_2)-\partial_{u_2}(h_1A_1)]; cycling 1→2→31\to2\to3 generates the other two components, precisely the cofactor expansion of the determinant in equation (6). Why: the three components share one antisymmetric pattern, and a determinant of the covariant row is the compact bookkeeping for it. *As a check: the cyclic assembly reproduces the 3×33\times3 determinant, and the Cartesian limit hi=1h_i=1 returns the familiar (∂xAy−∂yAx)(\partial_x A_y-\partial_y A_x)-type components.*

Limiting cases

Every named coordinate system is one line of the master formulas with its scale factors substituted — the general result is only specialized, never re-derived.

CaseResultMeaning
Cartesian (x,y,z)(x,y,z)(h1,h2,h3)=(1,1,1)(h_1,h_2,h_3)=(1,1,1), J=1J=1unit vectors constant; all derivative-of-hh terms vanish and the textbook ∂x,∂y,∂z\partial_x,\partial_y,\partial_z operators return
Cylindrical (ρ,ϕ,z)(\rho,\phi,z)(1,ρ,1)(1,\rho,1), J=ρJ=\rhogives ∇⋅A=1ρ∂ρ(ρAρ)+1ρ∂ϕAϕ+∂zAz\nabla\cdot\mathbf{A}=\tfrac1\rho\partial_\rho(\rho A_\rho)+\tfrac1\rho\partial_\phi A_\phi+\partial_z A_z and ∇2ϕ=1ρ∂ρ(ρ ∂ρϕ)+1ρ2∂ϕ2ϕ+∂z2ϕ\nabla^2\phi=\tfrac1\rho\partial_\rho(\rho\,\partial_\rho\phi)+\tfrac1{\rho^2}\partial_\phi^2\phi+\partial_z^2\phi
Spherical (r,θ,ϕ)(r,\theta,\phi)(1,r,rsin⁡θ)(1,r,r\sin\theta), J=r2sin⁡θJ=r^2\sin\thetagives the familiar 1r2∂r(r2Ar)+⋯\tfrac1{r^2}\partial_r(r^2A_r)+\cdots divergence and the spherical Laplacian used for multipoles and the hydrogen atom
Parabolic cylinder (u,v,z)(u,v,z)(u2+v2,u2+v2,1)(\sqrt{u^2+v^2},\sqrt{u^2+v^2},1)two equal scale factors; the natural frame for edge-diffraction and certain electrostatic wedge problems
Prolate spheroidalhξ=hη=aξ2−η2ξ2−1h_\xi=h_\eta=a\sqrt{\tfrac{\xi^2-\eta^2}{\xi^2-1}}-typeseparates the two-centre problem (H₂⁺ molecular ion, charged conducting ellipsoids)

Worked examples

1 · From the master formula to the spherical Laplacian (confidence builder)

Specialize the general Laplacian (7) to spherical coordinates, then test it on ϕ=r2\phi=r^2 and ϕ=1/r\phi=1/r.

Step 1. Insert (hr,hθ,hϕ)=(1,r,rsin⁡θ)(h_r,h_\theta,h_\phi)=(1,r,r\sin\theta), for which J=r2sin⁡θJ=r^2\sin\theta. The three coefficients hjhk/hih_jh_k/h_i become hθhϕ/hr=r2sin⁡θh_\theta h_\phi/h_r=r^2\sin\theta, hϕhr/hθ=sin⁡θh_\phi h_r/h_\theta=\sin\theta, and hrhθ/hϕ=1/sin⁡θh_r h_\theta/h_\phi=1/\sin\theta.

Step 2. Assemble equation (7) and pull the constant sin⁡θ\sin\theta out of the radial term to reach the standard form ∇2ϕ=1r2∂r(r2∂rϕ)+1r2sin⁡θ∂θ(sin⁡θ ∂θϕ)+1r2sin⁡2θ∂ϕ2ϕ\nabla^2\phi=\dfrac1{r^2}\partial_r(r^2\partial_r\phi)+\dfrac1{r^2\sin\theta}\partial_\theta(\sin\theta\,\partial_\theta\phi)+\dfrac1{r^2\sin^2\theta}\partial_\phi^2\phi.

Step 3. Test on ϕ=r2\phi=r^2 (spherically symmetric, so only the radial term survives): ∇2r2=1r2∂r(r2⋅2r)=1r2∂r(2r3)=1r2(6r2)=6\nabla^2 r^2=\dfrac1{r^2}\partial_r(r^2\cdot 2r)=\dfrac1{r^2}\partial_r(2r^3)=\dfrac1{r^2}(6r^2)=\mathbf{6}. Cross-check in Cartesian, where r2=x2+y2+z2r^2=x^2+y^2+z^2 gives ∇2r2=2+2+2=6\nabla^2 r^2=2+2+2=\mathbf{6} — the two agree exactly.

Step 4. Test on the Coulomb potential ϕ=1/r\phi=1/r: ∇2(1/r)=1r2∂r ⁣(r2⋅(−1/r2))=1r2∂r(−1)=0\nabla^2(1/r)=\dfrac1{r^2}\partial_r\!\big(r^2\cdot(-1/r^2)\big)=\dfrac1{r^2}\partial_r(-1)=\mathbf{0} for r≠0r\ne0. The spherical Laplacian gives ∇²r² = 6 and ∇²(1/r) = 0 away from the origin — the latter is why 1/r is the free-space potential of a point charge.

2 · Cylindrical divergence and a flux check with numbers

Take the radial field A=ρ e^ρ\mathbf{A}=\rho\,\hat{\mathbf{e}}_\rho. Compute its divergence, then verify the Divergence Theorem on a cylinder of radius R=2R=2 and height L=5L=5.

Step 1. Here Aρ=ρA_\rho=\rho, Aϕ=Az=0A_\phi=A_z=0, with (hρ,hϕ,hz)=(1,ρ,1)(h_\rho,h_\phi,h_z)=(1,\rho,1). Equation (5) gives ∇⋅A=1ρ∂ρ(ρ⋅ρ)=1ρ(2ρ)=2\nabla\cdot\mathbf{A}=\dfrac1\rho\partial_\rho(\rho\cdot\rho)=\dfrac1\rho(2\rho)=\mathbf{2}, a uniform divergence.

Step 2. Volume integral: ∫V∇⋅A dV=2×(πR2L)=2×20π=40π\displaystyle\int_V\nabla\cdot\mathbf{A}\,\mathrm{d}V=2\times(\pi R^2 L)=2\times20\pi=\mathbf{40\pi}, using the cylinder volume πR2L=π⋅4⋅5\pi R^2 L=\pi\cdot4\cdot5.

Step 3. Surface flux: the field is purely radial, so the flat top and bottom (normals along ±e^z\pm\hat{\mathbf{e}}_z) contribute nothing. The curved side has outward normal e^ρ\hat{\mathbf{e}}_\rho, area 2πRL2\pi R L, and there Aρ=RA_\rho=R, so the flux is R×2πRL=2πR2L=2π⋅4⋅5=40πR\times2\pi R L=2\pi R^2 L=2\pi\cdot4\cdot5=\mathbf{40\pi}.

Step 4. The two independent computations agree: ∫∇·A dV = ∮A·dS = 40π, confirming both the cylindrical divergence formula and Gauss's theorem.

3 · Why a point source has zero divergence

The inverse-square field A=(k/r2) e^r\mathbf{A}=(k/r^2)\,\hat{\mathbf{e}}_r models a point source of strength kk. Show its divergence vanishes for r>0r>0 yet its flux through any enclosing sphere is 4πk4\pi k.

Step 1. With Ar=k/r2A_r=k/r^2 the spherical divergence gives ∇⋅A=1r2∂r ⁣(r2⋅kr2)=1r2∂r(k)=0\nabla\cdot\mathbf{A}=\dfrac1{r^2}\partial_r\!\big(r^2\cdot\tfrac{k}{r^2}\big)=\dfrac1{r^2}\partial_r(k)=\mathbf{0} for every r≠0r\ne0 — the Jacobian's r2r^2 exactly cancels the field's 1/r21/r^2, the signature of an inverse-square law. Yet the flux through a sphere of radius RR is Φ=(k/R2)(4πR2)=4πk\Phi=(k/R^2)(4\pi R^2)=\mathbf{4\pi k}, independent of RR. The divergence is zero away from the origin, where the source hides as a delta-function singularity; the finite flux 4πk4\pi k is Gauss's law for a point charge with k=q/(4πε0)k=q/(4\pi\varepsilon_0).

Physics of the portrait

The scale factors hih_i carry a name — the Lamé coefficients — after the mathematician who turned Descartes' straight axes into a supple, curved coordinate machinery fit for continuous media.

Origins · 1 minGabriel Lamé and how this was discovered
GL
Gabriel Lamé
1795–1870 · curvilinear coordinates and the theory of elasticity

Gabriel Lamé trained as a mining engineer at the École Polytechnique and spent a formative decade in St. Petersburg before returning to Paris, where he became a leading French mathematical physicist of his generation — Gauss reportedly called him the foremost of his day. His enduring contribution here is the systematic development of general curvilinear coordinates: in memoirs from the 1830s and in his 1859 treatise Leçons sur les coordonnées curvilignes et leurs diverses applications, he introduced the three scale factors now universally written h1,h2,h3h_1,h_2,h_3 and called Lamé coefficients, and showed how the operators of physics transform when the coordinate surfaces bend. He was driven not by abstraction but by heat conduction and, above all, elasticity — the Lamé parameters λ\lambda and μ\mu of a stressed solid are also his — where curvilinear coordinates were the only practical route to boundary conditions on curved bodies. The formulas of this article are the modern, tidied form of exactly the machinery he built.

History
1637
— Descartes founds analytic geometry, fixing points by rectangular coordinates
1833
— Lamé introduces general curvilinear coordinates and the scale factors that bear his name
1859
— Lamé publishes Leçons sur les coordonnées curvilignes, systematizing the operators on curved grids
1873
— Maxwell's Treatise writes the field equations in general orthogonal coordinates
1901
— Gibbs and Wilson codify modern vector analysis and the ∇ notation in Vector Analysis

Going further

Texts. Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 3 (Vector Analysis) and the coordinate-systems sections · Stone & Goldbart, Mathematics for Physics, Ch. on vector calculus and curvilinear coordinates · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 10 · Boas, Mathematical Methods in the Physical Sciences, 3rd ed., Ch. 6 · Morse & Feshbach, Methods of Theoretical Physics, Vol. 1, Ch. 1 (the classic table of separable coordinate systems). The key self-consistency checks for the formulas in this article are: the gradient follows from dϕ=∇ϕ⋅dr\mathrm{d}\phi=\nabla\phi\cdot\mathrm{d}\mathbf{r}; the divergence reductions to (1,ρ,1)(1,\rho,1) and (1,r,rsin⁡θ)(1,r,r\sin\theta) yield the standard cylindrical and spherical forms; the Laplacian is confirmed by composing gradient and divergence and checking ∇2r2=6\nabla^2 r^2=6, ∇2(1/r)=0\nabla^2(1/r)=0, the cylindrical flux 40π40\pi, and the point-source flux 4πk4\pi k; the spherical Jacobian is r2sin⁡θr^2\sin\theta and the cylindrical Jacobian is ρ\rho.

Prerequisites. Scalar and Vector Fields · The Gradient Operator · Divergence of a Vector Field · Curl of a Vector Field · The Divergence (Gauss) Theorem · Stokes' Theorem. Leads to. The Laplacian Operator · The Del Operator and Vector Differential Identities · Surface Integrals and Flux · Volume Integrals.

Ask the tutor: Ask me to specialize any of these operators to your coordinate system — cylindrical, spherical, parabolic, or a mesh of your own — and watch the scale factors do all the work.

What exactly is a scale factor, in one sentence?

It is the local conversion between a change in a coordinate's value and the physical distance that change moves you: hi=∣∂r/∂ui∣h_i=\lvert\partial\mathbf{r}/\partial u_i\rvert, so moving from uiu_i to ui+duiu_i+\mathrm{d}u_i carries you hi duih_i\,\mathrm{d}u_i metres along the uiu_i-curve. In Cartesian coordinates a step of one in xx is always one metre, so hx=1h_x=1. In spherical coordinates a step of one radian in ϕ\phi moves you rsin⁡θr\sin\theta metres — larger far from the axis, zero on it. Because every derivative in physics is really "per unit physical length," you divide each ∂/∂ui\partial/\partial u_i by its hih_i, and that one idea builds every operator here.

Why does the Jacobian appear in the divergence and Laplacian but not the gradient?

The gradient is a rate of change per unit length, so it only needs the single factor 1/hi1/h_i that converts a coordinate slope into a physical one. The divergence is flux per unit volume, and two facts about volume enter: the box volume h1h2h3 du1du2du3h_1h_2h_3\,\mathrm{d}u_1\mathrm{d}u_2\mathrm{d}u_3 supplies the 1/(h1h2h3)1/(h_1h_2h_3) prefactor, and the face areas hjhkh_jh_k are coordinate-dependent, so they sit inside the derivatives. The Laplacian is a divergence of a gradient, inheriting both at once. Rule of thumb: one scale factor per spatial derivative in the gradient, a full Jacobian whenever you measure something per unit volume.

Why must the field components go in as physical components rather than raw derivatives?

The physical components Ai=A⋅e^iA_i=\mathbf{A}\cdot\hat{\mathbf{e}}_i are the ones with honest units — what an instrument reads along each unit direction. But the operators mix two other kinds: the covariant pieces hiAih_iA_i that appear in line integrals (curl), and the area-weighted pieces that appear in flux (divergence). The scale-factor formulas are written so you always feed in the physical AiA_i and let the hih_i do the rest, sparing you the raised-and-lowered-index bookkeeping of full tensor calculus — which is why the curl determinant carries hiAih_iA_i and the divergence carries hjhkAih_jh_kA_i.

Does "orthogonal" matter, or can any curved coordinates be used?

Any smooth, invertible coordinate change is allowed, but if the coordinate surfaces do not meet at right angles the metric acquires off-diagonal terms gijg_{ij} with i≠ji\ne j, and the tidy formulas here no longer hold — you need the general tensor expressions with det⁡g\sqrt{\det g} in place of h1h2h3h_1h_2h_3. Orthogonality is what makes gij=hi2δijg_{ij}=h_i^2\delta_{ij} diagonal, so the volume is a plain product of edge lengths and each operator decouples into three clean terms. Fortunately almost every coordinate system of practical importance — cylindrical, spherical, parabolic, elliptic, toroidal, spheroidal — is orthogonal, which is why the scale-factor machinery is so widely useful.

How is this related to the metric tensor and general relativity?

Directly: the line element ds2=∑ihi2 dui2\mathrm{d}s^2=\sum_i h_i^2\,\mathrm{d}u_i^2 is the special, diagonal case of the general metric ds2=∑ijgij duiduj\mathrm{d}s^2=\sum_{ij}g_{ij}\,\mathrm{d}u_i\mathrm{d}u_j, with gij=hi2δijg_{ij}=h_i^2\delta_{ij}. The Jacobian h1h2h3h_1h_2h_3 is det⁡g\sqrt{\det g}, and the divergence ∇⋅A=1g∂i(g Ai)\nabla\cdot\mathbf{A}=\tfrac1{\sqrt{g}}\partial_i(\sqrt{g}\,A^i) is the covariant divergence for a diagonal metric. In curved spacetime the metric becomes non-diagonal in a way no coordinate change can remove, and its derivatives become the Christoffel symbols. So the Lamé coefficients are the flat-space, orthogonal ancestors of the connection coefficients of general relativity — same idea, one level up.

What is the single most common mistake, and how do I avoid it?

Differentiating a vector field as though the basis vectors were constant. In curvilinear coordinates e^i\hat{\mathbf{e}}_i rotates from point to point — in spherical coordinates ∂θe^r=e^θ\partial_\theta\hat{\mathbf{e}}_r=\hat{\mathbf{e}}_\theta, for instance — so a divergence written as the bare sum ∂rAr+∂θAθ+∂ϕAϕ\partial_r A_r+\partial_\theta A_\theta+\partial_\phi A_\phi omits real physical terms and is wrong. The cure is to never differentiate a unit vector by hand: use equations (4)–(7) as written, feeding in the physical components and scale factors, since those formulas have already absorbed the basis rotation into the hih_i derivatives. If a result ever fails the Cartesian check (all hi=1h_i=1) or the standard reductions, you have almost certainly dropped one of these terms.

Before this

Where this leads