Gradient

Gradient vector, directional derivatives, and connection to conservative force fields and potentials.

What it is

The gradient is a vector differential operator acting on a differentiable scalar field ϕ(x,y,z)\phi(x,y,z) to yield a vector field ∇⃗ϕ\vec{\nabla}\phi. In Cartesian coordinates it is defined as:

∇⃗ϕ=∂ϕ∂xi^+∂ϕ∂yj^+∂ϕ∂zk^\vec{\nabla}\phi = \frac{\partial \phi}{\partial x} \hat{i} + \frac{\partial \phi}{\partial y} \hat{j} + \frac{\partial \phi}{\partial z} \hat{k}

Geometrically, the gradient exhibits two core properties:

  1. Direction of maximal rate of increase: The vector ∇⃗ϕ(P)\vec{\nabla}\phi(P) points in the exact spatial direction along which the scalar value ϕ\phi increases most rapidly away from point PP.
  2. Orthogonality to equipotential surfaces: At any regular point, ∇⃗ϕ\vec{\nabla}\phi is perpendicular to the level surface ϕ(x,y,z)=C\phi(x,y,z) = C passing through that point. Its magnitude ∥∇⃗ϕ∥\|\vec{\nabla}\phi\| equals the maximum directional derivative per unit length.

Why it appears in physics

The gradient serves as the universal mathematical bridge linking scalar potential landscapes (potential energy, electrostatic potential, temperature, hydrostatic pressure) to physical forces and transport fluxes:

  • Conservative forces: F⃗=−∇⃗U\vec{F} = -\vec{\nabla} U. Particles are accelerated towards lower potential energy states.
  • Electrostatics: E⃗=−∇⃗V\vec{E} = -\vec{\nabla} V. The electric field points along the steepest descent of electric potential.
  • Fourier's law of heat conduction: q⃗=−k∇⃗T\vec{q} = -k \vec{\nabla} T. Heat flows down temperature gradients.
  • Fick's law of molecular diffusion: J⃗=−D∇⃗c\vec{J} = -D \vec{\nabla} c. Mass flux moves from high to low concentration.

Visual or geometric intuition

Picture a topographic mountain defined by elevation contours z=h(x,y)z = h(x,y). Standing on the slope:

  • Walking along an elevation contour preserves altitude (dh=0dh = 0).
  • Facing perpendicular to the contour directly uphill points along ∇⃗h\vec{\nabla} h. It is the path of steepest ascent.
  • Releasing a spherical marble from rest causes it to roll down the path of steepest descent, −∇⃗h-\vec{\nabla} h.

Minimal symbolic language

  • Del operator in Cartesian coordinates: ∇⃗=i^∂∂x+j^∂∂y+k^∂∂z\vec{\nabla} = \hat{i} \frac{\partial}{\partial x} + \hat{j} \frac{\partial}{\partial y} + \hat{k} \frac{\partial}{\partial z}.
  • Gradient of scalar field: ∇⃗ϕ=(∂ϕ∂x,∂ϕ∂y,∂ϕ∂z)\vec{\nabla}\phi = \left(\frac{\partial \phi}{\partial x}, \frac{\partial \phi}{\partial y}, \frac{\partial \phi}{\partial z}\right).
  • Directional derivative along unit vector u^\hat{u}: Du^ϕ=∇⃗ϕ⋅u^=∥∇⃗ϕ∥cos⁡θD_{\hat{u}}\phi = \vec{\nabla}\phi \cdot \hat{u} = \|\vec{\nabla}\phi\| \cos\theta.
  • Maximal directional derivative: Attained when u^\hat{u} is aligned with ∇⃗ϕ\vec{\nabla}\phi (cos⁡θ=1\cos\theta = 1), yielding max⁡(Du^ϕ)=∥∇⃗ϕ∥\max(D_{\hat{u}}\phi) = \|\vec{\nabla}\phi\|.
  • Exact total differential: dϕ=∇⃗ϕ⋅dr⃗=∂ϕ∂xdx+∂ϕ∂ydy+∂ϕ∂zdzd\phi = \vec{\nabla}\phi \cdot d\vec{r} = \frac{\partial \phi}{\partial x} dx + \frac{\partial \phi}{\partial y} dy + \frac{\partial \phi}{\partial z} dz.
  • In cylindrical coordinates (r,θ,z)(r, \theta, z): ∇⃗ϕ=∂ϕ∂re^r+1r∂ϕ∂θe^θ+∂ϕ∂ze^z\vec{\nabla}\phi = \frac{\partial \phi}{\partial r} \hat{e}_r + \frac{1}{r} \frac{\partial \phi}{\partial \theta} \hat{e}_\theta + \frac{\partial \phi}{\partial z} \hat{e}_z.
  • In spherical coordinates (r,θ,φ)(r, \theta, \varphi): ∇⃗ϕ=∂ϕ∂re^r+1r∂ϕ∂θe^θ+1rsin⁡θ∂ϕ∂φe^φ\vec{\nabla}\phi = \frac{\partial \phi}{\partial r} \hat{e}_r + \frac{1}{r} \frac{\partial \phi}{\partial \theta} \hat{e}_\theta + \frac{1}{r \sin\theta} \frac{\partial \phi}{\partial \varphi} \hat{e}_\varphi.

What the result means

The gradient vector ∇⃗ϕ\vec{\nabla}\phi provides a complete local answer to two critical questions:

  1. In which direction must one move to observe the fastest rate of change of ϕ\phi?
  2. What is the spatial rate of change (per meter) along that steepest trajectory? If ∇⃗ϕ=0⃗\vec{\nabla}\phi = \vec{0}, the point is a stationary critical point (local extremum or saddle point), corresponding in physics to a mechanical equilibrium state (where net force F⃗=−∇⃗U=0⃗\vec{F} = -\vec{\nabla} U = \vec{0}).

When not to use it

  • Do not apply the gradient operator to an existing vector field A⃗\vec{A} expecting a vector result; the gradient of a vector is a second-rank tensor (e.g. fluid rate-of-strain tensor ∇v⃗\nabla \vec{v}).
  • Do not apply Cartesian partial derivative expressions in curvilinear systems without scale factors (1/r1/r and 1/(rsin⁡θ)1/(r\sin\theta)).
  • Do not confuse the gradient's direction with transport flux: physical transport laws feature a crucial negative sign (flux flows counter to the gradient).

Operational summary

To compute ∇⃗ϕ\vec{\nabla}\phi: differentiate ϕ\phi partially with respect to each coordinate, scaling by metric Lamé coefficients in curvilinear bases. The resulting vector carries physical units of [ϕ]/[length][\phi]/[\text{length}] and stands perpendicular to equipotential surfaces.

Procedure

Before calculating

Confirm that the target mathematical object is a scalar field ϕ(x,y,z)\phi(x,y,z) and choose the most symmetry-adapted coordinate system (Cartesian, cylindrical, or spherical).

Step 1: Identify the mathematical object

Write down the analytical formula for the scalar potential ϕ\phi, tracking physical constants (G,M,q,k,DG, M, q, k, D) and ensuring spatial coordinates adhere to SI units.

Step 2: Choose the operation

Deploy the gradient formula matching the chosen geometry:

  • Cartesian: ∇⃗ϕ=∂ϕ∂xi^+∂ϕ∂yj^+∂ϕ∂zk^\vec{\nabla}\phi = \frac{\partial \phi}{\partial x} \hat{i} + \frac{\partial \phi}{\partial y} \hat{j} + \frac{\partial \phi}{\partial z} \hat{k}.
  • Cylindrical: ∇⃗ϕ=∂ϕ∂re^r+1r∂ϕ∂θe^θ+∂ϕ∂ze^z\vec{\nabla}\phi = \frac{\partial \phi}{\partial r} \hat{e}_r + \frac{1}{r} \frac{\partial \phi}{\partial \theta} \hat{e}_\theta + \frac{\partial \phi}{\partial z} \hat{e}_z.
  • Spherical: ∇⃗ϕ=∂ϕ∂re^r+1r∂ϕ∂θe^θ+1rsin⁡θ∂ϕ∂φe^φ\vec{\nabla}\phi = \frac{\partial \phi}{\partial r} \hat{e}_r + \frac{1}{r} \frac{\partial \phi}{\partial \theta} \hat{e}_\theta + \frac{1}{r\sin\theta} \frac{\partial \phi}{\partial \varphi} \hat{e}_\varphi.

Step 3: Conserve units and signs

Differentiate partially with respect to each coordinate while holding all others fixed. If computing a conservative force F⃗=−∇⃗U\vec{F} = -\vec{\nabla} U or electric field E⃗=−∇⃗V\vec{E} = -\vec{\nabla} V, carefully distribute the essential negative sign across every component.

Step 4: Calculate

Assemble the full vector expression. When evaluating at a concrete spatial point P(x0,y0,z0)P(x_0, y_0, z_0), substitute coordinates into the analytical vector and compute the Euclidean magnitude ∥∇⃗ϕ∥\|\vec{\nabla}\phi\|.

Step 5: Interpret the result

Examine the derived vector:

  • The vector is strictly normal to the local equipotential contour.
  • The magnitude quantifies the spatial rate of variation per meter.
  • For conservative forces, verify that the vector pulls toward lower energy regions.

Self-check checklist

  • Is the output an authentic vector rather than a scalar?
  • Do the physical dimensions equal [potential]/[meter][\text{potential}] / [\text{meter}]?
  • Were the 1/r1/r and 1/(rsin⁡θ)1/(r\sin\theta) geometric Lamé scale factors preserved in angular components?
  • Was the negative sign preserved for conservative fields?

Guided example

Physical situation

In a region of space, the electrostatic potential is described in volts by the quadratic scalar field: V(x,y,z)=100−2x2+3y2−z2[V]V(x,y,z) = 100 - 2x^2 + 3y^2 - z^2 \quad [\text{V}] where coordinates x,y,zx, y, z are given in meters. We wish to determine the electric field vector E⃗\vec{E} at point P(2,−1,3)P(2, -1, 3) and calculate the instantaneous acceleration of a proton (q=+1.602×10−19 Cq = +1.602 \times 10^{-19} \text{ C}, m=1.673×10−27 kgm = 1.673 \times 10^{-27} \text{ kg}) placed at rest at that point.

Mathematical translation

The fundamental electrostatics relation is: E⃗=−∇⃗V=−(∂V∂xi^+∂V∂yj^+∂V∂zk^)\vec{E} = -\vec{\nabla} V = -\left( \frac{\partial V}{\partial x} \hat{i} + \frac{\partial V}{\partial y} \hat{j} + \frac{\partial V}{\partial z} \hat{k} \right) The electrostatic force is F⃗=qE⃗\vec{F} = q \vec{E}, and by Newton's second law, acceleration is a⃗=qmE⃗\vec{a} = \frac{q}{m} \vec{E}.

Step-by-step calculation

  1. Calculate partial derivatives: ∂V∂x=−4x,∂V∂y=+6y,∂V∂z=−2z\frac{\partial V}{\partial x} = -4x, \quad \frac{\partial V}{\partial y} = +6y, \quad \frac{\partial V}{\partial z} = -2z

  2. Assemble potential gradient: ∇⃗V=(−4x)i^+(6y)j^+(−2z)k^\vec{\nabla} V = (-4x) \hat{i} + (6y) \hat{j} + (-2z) \hat{k}

  3. Incorporate electrostatic negative sign: E⃗(x,y,z)=−∇⃗V=(4x)i^−(6y)j^+(2z)k^[V/m]\vec{E}(x,y,z) = -\vec{\nabla} V = (4x) \hat{i} - (6y) \hat{j} + (2z) \hat{k} \quad [\text{V/m}]

  4. Evaluate at P(2,−1,3)P(2, -1, 3): E⃗(P)=4(2)i^−6(−1)j^+2(3)k^=8i^+6j^+6k^[V/m]\vec{E}(P) = 4(2) \hat{i} - 6(-1) \hat{j} + 2(3) \hat{k} = 8 \hat{i} + 6 \hat{j} + 6 \hat{k} \quad [\text{V/m}] Electric field magnitude: ∥E⃗∥=82+62+62=136≈11.66 V/m\|\vec{E}\| = \sqrt{8^2 + 6^2 + 6^2} = \sqrt{136} \approx 11.66 \text{ V/m}

  5. Compute proton acceleration: a⃗=1.602×10−19 C1.673×10−27 kg(8i^+6j^+6k^)=(7.66i^+5.75j^+5.75k^)×108[m/s2]\vec{a} = \frac{1.602 \times 10^{-19} \text{ C}}{1.673 \times 10^{-27} \text{ kg}} (8 \hat{i} + 6 \hat{j} + 6 \hat{k}) = (7.66 \hat{i} + 5.75 \hat{j} + 5.75 \hat{k}) \times 10^8 \quad [\text{m/s}^2] ∥a⃗∥=qm∥E⃗∥≈1.117×109 m/s2\|\vec{a}\| = \frac{q}{m} \|\vec{E}\| \approx 1.117 \times 10^9 \text{ m/s}^2

Reading the result

The electric field points in direction (+8,+6,+6)(+8, +6, +6), which marks the steepest descent of electric potential. The positively charged proton accelerates in that same direction at over 1.1×109 m/s21.1 \times 10^9 \text{ m/s}^2.

Common error avoided

Dropping the negative sign in E⃗=−∇⃗V\vec{E} = -\vec{\nabla} V, which would incorrectly predict that positive charges are pushed toward higher potential energy states.


Inverse example

Given result

Astronomical measurements yield the gravitational field of a central point mass MM: g⃗(r)=−GMr2e^r\vec{g}(r) = -\frac{G M}{r^2} \hat{e}_r

What physical question it can answer

What scalar gravitational potential function Φ(r)\Phi(r) produces this field? Using g⃗=−∇⃗Φ\vec{g} = -\vec{\nabla}\Phi with radial symmetry in spherical coordinates: −dΦdre^r=−GMr2e^r  ⟹  dΦdr=GMr2-\frac{d\Phi}{dr} \hat{e}_r = -\frac{G M}{r^2} \hat{e}_r \implies \frac{d\Phi}{dr} = \frac{G M}{r^2} Integrating with the asymptotic reference Φ(∞)=0\Phi(\infty) = 0: Φ(r)=−∫∞rGMr′2dr′=−GMr\Phi(r) = -\int_\infty^r \frac{G M}{r'^2} dr' = -\frac{G M}{r} This reconstructs the Newtonian gravitational potential well.

Common errors

Error 1: Dropping the negative sign between potential and force

Setting F⃗=∇⃗U\vec{F} = \vec{\nabla} U instead of F⃗=−∇⃗U\vec{F} = -\vec{\nabla} U. This inverts physical dynamics, predicting particles accelerate toward energy peaks rather than stable equilibrium valleys.

Error 2: Omitting metric scale factors in curvilinear systems

Writing ∇θ=∂θϕ\nabla_\theta = \partial_\theta \phi instead of 1r∂θϕ\frac{1}{r} \partial_\theta \phi in polar/spherical coordinates. This induces immediate dimensional error ([rad−1][\text{rad}^{-1}] instead of [m−1][\text{m}^{-1}]).

Error 3: Confusing gradient direction with equipotential tangents

Believing the gradient runs parallel to contour curves. The gradient is strictly perpendicular to equipotential surfaces; directional derivatives along tangents are identically zero.

Error 4: Attempting to take the gradient of a vector field

Applying ∇⃗\vec{\nabla} to a vector field A⃗\vec{A} expecting an ordinary vector. The gradient of a vector is a second-order rank-2 tensor (Jacobian matrix).

Error 5: Treating nabla as an ordinary commutative vector

Neglecting the differential character of ∇⃗\vec{\nabla}: ∇⃗\vec{\nabla} does not commute with scalar fields, and product rules require Leibniz expansion: ∇⃗(fg)=f∇⃗g+g∇⃗f\vec{\nabla}(f g) = f \vec{\nabla}g + g \vec{\nabla}f.

Quick detection rule

If a gradient output lacks vector components, fails to have units divided by length, or is not normal to level contours, the calculation is fundamentally flawed.

Physical applications

1. Conservative forces and potential energy in classical mechanics

In Newtonian mechanics, every conservative force field derives from a potential: F⃗=−∇⃗U\vec{F} = -\vec{\nabla} U. Equilibrium states occur precisely where ∇⃗U=0⃗\vec{\nabla} U = \vec{0}, determining orbital mechanics and atomic trap stability.

2. Electrostatics and classical electrodynamics

The electrostatic field is the negative gradient of voltage: E⃗=−∇⃗V\vec{E} = -\vec{\nabla} V. In relativistic electrodynamics, fields derive from the four-gradient of the electromagnetic four-potential AμA^\mu.

3. Fluid dynamics and potential flow

For irrotational inviscid fluid flows, velocity vectors derive from a velocity potential: v⃗=∇⃗Φ\vec{v} = \vec{\nabla} \Phi. This enables analytical lift calculations across airfoils and oceanic surface wave dynamics.

4. Transport phenomena: Heat conduction and diffusion

Non-equilibrium fluxes are driven by spatial gradients:

  • Fourier's law: q⃗=−k∇⃗T\vec{q} = -k \vec{\nabla} T (thermal conduction).
  • Fick's law: J⃗=−D∇⃗c\vec{J} = -D \vec{\nabla} c (molecular diffusion).
  • Ohm's law: J⃗=−σ∇⃗V\vec{J} = -\sigma \vec{\nabla} V (electrical current density).

5. Chemical thermodynamics and electrochemical gradients

Ion transport across cellular membranes (such as neuron sodium-potassium pumps) is driven by the electrochemical gradient ∇⃗μi\vec{\nabla} \mu_i, governing active biological transport.

Practice

Problem 1: Restoring force in an anisotropic potential well

A polar molecule sits in an anisotropic 3D potential: U(x,y,z)=U0(x2a2+y2b2+z2c2)U(x,y,z) = U_0 \left( \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} \right) with U0=5.0×10−20 JU_0 = 5.0 \times 10^{-20} \text{ J}, a=1.0 nma = 1.0 \text{ nm}, b=2.0 nmb = 2.0 \text{ nm}, c=3.0 nmc = 3.0 \text{ nm}.

  1. Derive the analytical force vector F⃗=−∇⃗U\vec{F} = -\vec{\nabla} U.
  2. Compute force vector magnitude at position r⃗=(1.0,1.0,1.0) nm\vec{r} = (1.0, 1.0, 1.0) \text{ nm}.

Solution:

  1. Partial derivatives: ∂U∂x=2U0xa2,∂U∂y=2U0yb2,∂U∂z=2U0zc2\frac{\partial U}{\partial x} = \frac{2 U_0 x}{a^2}, \quad \frac{\partial U}{\partial y} = \frac{2 U_0 y}{b^2}, \quad \frac{\partial U}{\partial z} = \frac{2 U_0 z}{c^2} F⃗=−2U0(xa2i^+yb2j^+zc2k^)\vec{F} = -2 U_0 \left( \frac{x}{a^2} \hat{i} + \frac{y}{b^2} \hat{j} + \frac{z}{c^2} \hat{k} \right)
  2. Evaluating at r⃗=(1,1,1) nm\vec{r} = (1, 1, 1) \text{ nm}: Fx=−100 pN,Fy=−25 pN,Fz=−11.11 pNF_x = -100 \text{ pN}, \quad F_y = -25 \text{ pN}, \quad F_z = -11.11 \text{ pN} F⃗=−100i^−25j^−11.11k^[pN]\vec{F} = -100 \hat{i} - 25 \hat{j} - 11.11 \hat{k} \quad [\text{pN}] ∥F⃗∥=1002+252+11.112≈103.67 pN\|\vec{F}\| = \sqrt{100^2 + 25^2 + 11.11^2} \approx 103.67 \text{ pN}

Problem 2: Temperature gradient and Fourier heat flux

A heat spreader exhibits the thermal distribution: T(x,y)=T0+αx2−βyT(x,y) = T_0 + \alpha x^2 - \beta y where T0=300 KT_0 = 300 \text{ K}, α=200 K/m2\alpha = 200 \text{ K/m}^2, β=50 K/m\beta = 50 \text{ K/m}, and conductivity k=1.5 W/(m⋅K)k = 1.5 \text{ W/(m}\cdot\text{K)}.

  1. Calculate ∇⃗T\vec{\nabla} T at (x,y)=(0.10 m,0.50 m)(x,y) = (0.10 \text{ m}, 0.50 \text{ m}).
  2. Calculate the heat flux vector q⃗\vec{q} via Fourier's law.

Solution:

  1. ∇⃗T=2αxi^−βj^=40i^−50j^[K/m]\vec{\nabla} T = 2\alpha x \hat{i} - \beta \hat{j} = 40 \hat{i} - 50 \hat{j} \quad [\text{K/m}]. ∥∇⃗T∥=402+502≈64.03 K/m\|\vec{\nabla} T\| = \sqrt{40^2 + 50^2} \approx 64.03 \text{ K/m}
  2. q⃗=−k∇⃗T=−1.5(40i^−50j^)=−60i^+75j^[W/m2]\vec{q} = -k \vec{\nabla} T = -1.5 (40 \hat{i} - 50 \hat{j}) = -60 \hat{i} + 75 \hat{j} \quad [\text{W/m}^2]. ∥q⃗∥≈96.05 W/m2\|\vec{q}\| \approx 96.05 \text{ W/m}^2

Problem 3: Spherical coordinates gradient for an electric dipole

The electrostatic potential of a point dipole pp along the zz-axis is: V(r,θ)=14πε0pcos⁡θr2V(r, \theta) = \frac{1}{4\pi\varepsilon_0} \frac{p \cos\theta}{r^2} Compute E⃗=−∇⃗V\vec{E} = -\vec{\nabla} V in spherical coordinates.

Solution:

∇⃗V=∂V∂re^r+1r∂V∂θe^θ\vec{\nabla} V = \frac{\partial V}{\partial r} \hat{e}_r + \frac{1}{r} \frac{\partial V}{\partial \theta} \hat{e}_\theta ∂V∂r=−2pcos⁡θ4πε0r3,1r∂V∂θ=−psin⁡θ4πε0r3\frac{\partial V}{\partial r} = -\frac{2p\cos\theta}{4\pi\varepsilon_0 r^3}, \quad \frac{1}{r} \frac{\partial V}{\partial \theta} = -\frac{p\sin\theta}{4\pi\varepsilon_0 r^3} E⃗=−∇⃗V=p4πε0r3(2cos⁡θe^r+sin⁡θe^θ)\vec{E} = -\vec{\nabla} V = \frac{p}{4\pi\varepsilon_0 r^3} (2\cos\theta \hat{e}_r + \sin\theta \hat{e}_\theta)