# Gradient, Divergence, and Curl

Physics I · Differential Equations and Vector Calculus · https://tryals.app/learn/physics-i/gradient-divergence-and-curl

## Spatial Operators Overview

These three **differential operators** map how scalar and vector fields change across space. They form the core building blocks of vector calculus.

| Operator | Input | Output | What It Measures |
| --- | --- | --- | --- |
| **Gradient** ($\nabla\phi$) | Scalar | Vector | Steepest increase direction and rate |
| **Divergence** ($\nabla\cdot\vec{F}$) | Vector | Scalar | Net outward flux, sources/sinks |
| **Curl** ($\nabla\times\vec{F}$) | Vector | Vector | Local rotational spinning effect |

**Common pitfall:** Always type-check your inputs and outputs. A phrase like **div of a scalar** is mathematically meaningless since divergence only accepts vector fields.

## Formulas and Identities

The **gradient**, **divergence**, and **curl** use distinct partial derivative structures:

$$\nabla\phi = \frac{\partial\phi}{\partial x}\hat{i} + \frac{\partial\phi}{\partial y}\hat{j} + \frac{\partial\phi}{\partial z}\hat{k}$$

$$\nabla\cdot\vec{F} = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z}$$

$$\nabla\times\vec{F} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ \partial_x & \partial_y & \partial_z \\ F_x & F_y & F_z \end{vmatrix}$$

**Key identities** connect these operations:

- $\nabla\times(\nabla\phi) = \vec{0}$ (curl of gradient is zero)
- $\nabla\cdot(\nabla\times\vec{F}) = 0$ (divergence of curl is zero)
- $\nabla^{2}\phi = \nabla\cdot(\nabla\phi)$ (the **Laplacian**)

**Physics link:** $\vec{E} = -\nabla V$ defines electric field as the negative gradient of potential, while $\nabla\cdot\vec{E} = \rho/\varepsilon_0$ is Gauss's law.

## Practice questions

4 of this lesson's 13 practice questions, with answers. The full set is in the app.

### 1. Sort each identity as Always True or Not Always True.

**Answer:**

- Always true: ∇ × ($\nabla f$) = 0 (curl of gradient is zero), ∇ · ($\nabla \times F$) = 0 (divergence of curl is zero), $\nabla(fg) = f \nabla g$ + g$\nabla f$ (product rule), $\nabla^{2}f$ = ∇ · ($\nabla f$)
- Not always true: $\nabla \times F$ = 0 for any F, $\nabla \cdot F$ = 0 for any F

**Why:** The curl of a gradient and divergence of a curl are always zero by Clairaut's theorem.

Page: https://tryals.app/practice/physics-i/gradient-divergence-and-curl/sort-each-identity-as-always-true-or-not-always-true

### 2. You stand on a hillside where the height is $h(x,y)$. What does the **gradient** $\nabla h$ at your feet tell you?

A. The curvature of the hill at your position
B. The direction water would flow, with magnitude equal to your altitude
C. The direction of steepest ascent, and its slope
D. The compass direction of the summit

**Answer:** C. The direction of steepest ascent, and its slope

**Why:** $\nabla h$ points straight up the local slope and its length is that slope. It is a strictly local instrument, a compass for "uphill", not a map to the peak. Gradient-descent algorithms in machine learning walk against exactly this vector.

Page: https://tryals.app/practice/physics-i/gradient-divergence-and-curl/you-stand-on-a-hillside-where-the-height-is-h-x-y-what-does-the

### 3. The gradient of a scalar field points in the direction of steepest increase. Why is it perpendicular to the level surfaces?

A. Because steepest ascent is always vertical in three dimensions
B. Because the gradient is a vector and level surfaces are scalars
C. Because level surfaces are defined to be perpendicular to the gradient
D. Because moving along a level surface changes nothing

**Answer:** D. Because moving along a level surface changes nothing

**Why:** Zero change along the surface forces a zero dot product. This is why a contour map shows the steepest route as the one crossing contours at right angles.

Page: https://tryals.app/practice/physics-i/gradient-divergence-and-curl/the-gradient-of-a-scalar-field-points-in-the-direction-of-steepest

### 4. Order the steps to compute $\nabla \times F$ for $F = (P, Q, R)$ in Cartesian coordinates.

**Answer:**

1. Identify components P, Q, R of F
2. Compute $\partial R/\partial y$ − $\partial Q/\partial z$ (x-component)
3. Compute $\partial P/\partial z$ − $\partial R/\partial x$ (y-component)
4. Compute $\partial Q/\partial x$ − $\partial P/\partial y$ (z-component)
5. Assemble the curl vector

**Why:** The curl is computed component by component using partial derivatives.

Page: https://tryals.app/practice/physics-i/gradient-divergence-and-curl/order-the-steps-to-compute-f-for-f-p-q-r-in-cartesian
