The Gradient
Chapter 2 — Vector Calculus
The gradient is the multivariable cousin of the ordinary derivative. Given a scalar field \(f(x,y,z)\), the gradient packages its three partial derivatives into a single vector field that tells you, at every point, the direction and rate of steepest increase of \(f\).
Definition (Cartesian)
In Cartesian coordinates,
\[\vec{\nabla} f = \left(\frac{\partial f}{\partial x},\ \frac{\partial f}{\partial y},\ \frac{\partial f}{\partial z}\right).\]
You can think of \(\vec{\nabla}\) ("del" or "nabla") as a vector-valued differential operator \(\vec{\nabla} = \left(\partial_x,\partial_y,\partial_z\right)\). The gradient is what happens when you apply it to a scalar.
Geometric meaning
Two key facts about \(\vec{\nabla} f\) at a point \(P\):
- Direction: \(\vec{\nabla} f\) points in the direction of steepest ascent of \(f\) at \(P\).
- Magnitude: \(|\vec{\nabla} f|\) equals the slope of \(f\) in that steepest direction.
Equivalently, the directional derivative of \(f\) along a unit vector \(\hat{u}\) is \(\hat{u}\cdot\vec{\nabla} f\). That's maximized when \(\hat{u}\) points along \(\vec{\nabla} f\), and is zero when \(\hat{u}\) is tangent to a level set of \(f\).
The electrostatics connection
The electric field is minus the gradient of the potential:
\[\vec{E} = -\vec{\nabla} V.\]
The minus sign is because positive charges experience a force that pushes them downhill in potential, toward lower \(V\). If you know \(V(x,y,z)\), you can read off \(\vec{E}\) by taking three partial derivatives — no integration required.
The gradient theorem
For any smooth scalar field \(f\) and any curve \(C\) from \(P_1\) to \(P_2\),
\[\int_C \vec{\nabla} f \cdot d\vec{r} = f(P_2) - f(P_1).\]
This is the multivariable fundamental theorem of calculus: the line integral of a gradient depends only on the endpoints. Applied to \(\vec{E} = -\vec{\nabla} V\), it reproduces \(\int_{P_1}^{P_2}\vec{E}\cdot d\vec{r} = V(P_1) - V(P_2) = -\Delta V\).
Worked example
Suppose \(V(x,y) = -c\,xy\). Then
\[\vec{\nabla} V = (-cy,\ -cx,\ 0),\qquad \vec{E} = -\vec{\nabla} V = (cy,\ cx,\ 0).\]
That's exactly the field from the lecture-notes example: \(\vec{E}=(cy,cx,0)\). The gradient recovers \(\vec{E}\) from \(V\) in one step.
Practice Problems
Hint
Solution
\(\partial_x f = 2xy\), \(\partial_y f = x^2\), \(\partial_z f = 3z^2\).
Answer: \(\vec{\nabla} f = (2xy,\ x^2,\ 3z^2)\).
Hint
Solution
Only the \(z\)-partial is nonzero: \(\partial_z V = -E_0\), so \(\vec{\nabla} V = (0,0,-E_0)\).
Answer: \(\vec{E} = (0,0,E_0)\) — a uniform field pointing in the \(+\hat{z}\) direction.
Hint
Solution
\(\frac{dV}{dr} = -\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\), so \(\vec{\nabla} V = -\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}\).
Answer: \(\vec{E} = -\vec{\nabla} V = \frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}\), the Coulomb field.
Hint
Solution
\(\hat{u}\cdot\vec{\nabla} f = (1/\sqrt{2})(3+0) = 3/\sqrt{2}\). \(|\vec{\nabla} f| = \sqrt{9+16}=5\), direction \((3/5,0,4/5)\).
Answer: directional derivative \(3/\sqrt{2}\); steepest rate \(5\) along \((3,0,4)/5\).
Hint
Solution
For each coordinate \(x_i\), \(\partial_i(fg) = f\,\partial_i g + g\,\partial_i f\). Stacking the three components gives exactly \(f\vec{\nabla} g + g\vec{\nabla} f\).
Answer: follows from applying the scalar product rule to each partial derivative.