Divergence and Curl — Theory
1. Vector fields
A vector field assigns a vector to each point in space. In two dimensions, a vector field is often written as
\[
\mathbf F(x,y)=\langle P(x,y),Q(x,y)\rangle.
\]
In three dimensions, it is written as
\[
\mathbf F(x,y,z)=\langle P(x,y,z),Q(x,y,z),R(x,y,z)\rangle.
\]
Vector fields are used to model fluid velocity, force fields, electric fields, magnetic fields,
wind, and many other physical systems.
2. Divergence
Divergence measures how much a vector field spreads outward from a point. For a 3D vector field
\(\mathbf F=\langle P,Q,R\rangle\),
\[
\nabla\cdot\mathbf F
=
\frac{\partial P}{\partial x}
+
\frac{\partial Q}{\partial y}
+
\frac{\partial R}{\partial z}.
\]
In short notation,
\[
\nabla\cdot\mathbf F=P_x+Q_y+R_z.
\]
For a 2D vector field \(\mathbf F=\langle P,Q\rangle\),
\[
\nabla\cdot\mathbf F=P_x+Q_y.
\]
3. Physical meaning of divergence
Divergence has a clear fluid-flow interpretation:
- If \(\nabla\cdot\mathbf F>0\), the point behaves like a source or local outflow.
- If \(\nabla\cdot\mathbf F<0\), the point behaves like a sink or local inflow.
- If \(\nabla\cdot\mathbf F=0\), the field has no net local expansion or compression.
A divergence-free field is often called incompressible in fluid-flow contexts.
4. Curl / rotor in three dimensions
Curl, also called rotor in some textbooks, measures local rotation of a vector field.
For \(\mathbf F=\langle P,Q,R\rangle\),
\[
\nabla\times\mathbf F
=
\left\langle
R_y-Q_z,\,
P_z-R_x,\,
Q_x-P_y
\right\rangle.
\]
Written as a determinant mnemonic:
\[
\nabla\times\mathbf F
=
\begin{vmatrix}
\mathbf i & \mathbf j & \mathbf k\\
\partial/\partial x & \partial/\partial y & \partial/\partial z\\
P & Q & R
\end{vmatrix}.
\]
The curl vector gives the axis and strength of local spinning motion.
5. Scalar curl in two dimensions
In two dimensions, the curl is usually represented as a scalar:
\[
\operatorname{curl}\mathbf F
=
Q_x-P_y.
\]
This scalar is the \(z\)-component of the 3D curl if the 2D field is treated as
\(\langle P,Q,0\rangle\).
- Positive scalar curl means counterclockwise local rotation.
- Negative scalar curl means clockwise local rotation.
- Zero scalar curl means no local spinning tendency in the plane.
6. Example: \(\mathbf F=\langle x,y,z\rangle\)
Start with
\[
\mathbf F=\langle x,y,z\rangle.
\]
Here \(P=x\), \(Q=y\), and \(R=z\). The divergence is:
\[
\nabla\cdot\mathbf F
=
P_x+Q_y+R_z
=
1+1+1
=
3.
\]
The curl is:
\[
\nabla\times\mathbf F
=
\langle R_y-Q_z,\ P_z-R_x,\ Q_x-P_y\rangle
=
\langle 0-0,\ 0-0,\ 0-0\rangle
=
\langle 0,0,0\rangle.
\]
So this field is a pure radial source field: it expands outward but does not rotate locally.
7. Example: 2D rotation field
Consider the 2D field
\[
\mathbf F=\langle -y,x\rangle.
\]
The divergence is:
\[
\nabla\cdot\mathbf F
=
P_x+Q_y
=
0+0
=
0.
\]
The scalar curl is:
\[
\operatorname{curl}\mathbf F
=
Q_x-P_y
=
1-(-1)
=
2.
\]
This field has no source or sink behavior, but it has positive counterclockwise rotation.
8. The Jacobian matrix
The Jacobian matrix of a vector field contains all first partial derivatives of its components.
For \(\mathbf F=\langle P,Q,R\rangle\),
\[
J_{\mathbf F}
=
\begin{bmatrix}
P_x & P_y & P_z\\
Q_x & Q_y & Q_z\\
R_x & R_y & R_z
\end{bmatrix}.
\]
Divergence is the trace of this matrix:
\[
\nabla\cdot\mathbf F=P_x+Q_y+R_z.
\]
Curl uses the antisymmetric part of the same derivative information.
10. Divergence-free and curl-free fields
A field is divergence-free if
\[
\nabla\cdot\mathbf F=0.
\]
In fluid flow, this often means incompressible flow.
A field is curl-free if
\[
\nabla\times\mathbf F=\mathbf 0.
\]
In many simply connected regions, a curl-free vector field is conservative, meaning it can be
written as the gradient of a potential function.
11. Common mistakes
- Mixing divergence and curl: divergence is a dot product with \(\nabla\), while curl is a cross product with \(\nabla\).
- Forgetting the third component: in 3D, divergence includes \(R_z\).
- Using the wrong sign in curl: the 2D scalar curl is \(Q_x-P_y\), not \(P_y-Q_x\).
- Assuming zero divergence means zero curl: a field can have zero divergence and nonzero curl.
- Assuming zero curl means zero divergence: a field can have zero curl and nonzero divergence.
- Ignoring units: divergence and curl usually have units of field unit divided by position unit.
- Reading a slice as the whole 3D field: a graph slice shows a cross-section, while the formulas still compute the full 3D result.