In short
Vector calculus studies how scalar and vector quantities change across space. The gradient tells you the direction a scalar field increases fastest. Divergence measures how much a vector field spreads out from a point. Curl measures how much it swirls. Line integrals add up a field's contribution along a path. Together, these four tools let you describe everything from heat flow to electromagnetism.
You are standing on a hillside. The ground under your feet has a temperature — say the rock is warm from the afternoon sun. Every point on the hill has its own temperature. That is a scalar field: a single number assigned to every point in space.
Now think about the wind. At every point on the hill, the wind blows in some direction with some strength. That is a vector field: a vector (direction and magnitude) assigned to every point.
You already know how to differentiate a function of one variable — that is the derivative, and it tells you the rate of change along a single line. But temperature on a hillside is a function of three variables (x, y, z). Wind is a vector that depends on position. How do you talk about rates of change when the input is a point in space and the output might be a vector?
That is what vector calculus answers. It gives you four new tools — gradient, divergence, curl, and line integrals — each one a natural extension of the derivative or integral you already know, adapted for fields that live in two or three dimensions.
The gradient: which way is uphill?
Start with the simplest question you can ask about a scalar field. You are standing at a point on that hillside, and the temperature varies from place to place. In which direction should you walk to warm up the fastest?
Take a concrete scalar field in two dimensions:
Think of this as the temperature at every point (x, y) on a metal plate. At the origin, T(0, 0) = 100 — the hottest point. As you move away from the origin in any direction, the temperature drops (both x^2 and 2y^2 are positive, so they subtract from 100).
You already know partial derivatives. The partial derivative \partial T / \partial x = -2x tells you how fast T changes as you move in the x-direction alone. The partial derivative \partial T / \partial y = -4y tells you the same for the y-direction.
The gradient packages both of these into one vector:
At the point (1, 1), the gradient is \nabla T = (-2, -4). This vector points in the direction of steepest increase of T. Its magnitude |\nabla T| = \sqrt{4 + 16} = \sqrt{20} = 2\sqrt{5} tells you how steep that increase is.
Since \nabla T = (-2, -4) at (1, 1), the temperature increases fastest in the direction toward the origin — back toward the hot centre. That matches the picture: the origin is the maximum, and the gradient always points uphill.
Two things to notice in the picture. First, every gradient arrow is perpendicular to the nearest contour ellipse. This is not a coincidence — the gradient is always perpendicular to level curves. A level curve is a path along which T does not change, and the gradient points in the direction T changes fastest, so they have to be at right angles.
Second, the gradient is zero at the origin, where the field has its maximum. That is the multivariable version of f'(x) = 0 at a maximum or minimum.
Gradient
For a scalar field f(x, y, z) with continuous partial derivatives, the gradient is the vector field
At each point, \nabla f points in the direction of steepest increase of f, and its magnitude |\nabla f| equals the rate of increase in that direction.
The symbol \nabla is called nabla or del. It behaves like a vector of differentiation operators: \nabla = (\partial/\partial x, \;\partial/\partial y, \;\partial/\partial z). On its own, \nabla is not a vector and not a number — it is an operator that needs a function to act on. When you "multiply" it by a scalar field f, you get the gradient \nabla f. When you take its "dot product" with a vector field, you get something called the divergence. When you take its "cross product" with a vector field, you get the curl. The notation is compact and powerful.
Divergence: is the field spreading out?
Now move from scalar fields to vector fields. A vector field \mathbf{F}(x, y, z) assigns a vector to every point in space — think of it as the velocity of a flowing fluid at each location.
Here is a natural question: is the fluid spreading out from a point, or piling up at it? If you imagine a tiny box around a point, is more fluid leaving the box than entering it?
Take a concrete vector field in two dimensions:
At (1, 0), the vector is (1, 0) — pointing right. At (0, 2), the vector is (0, 2) — pointing up. At (3, 1), the vector is (3, 1) — pointing away from the origin. Every vector points directly outward from the origin, and vectors farther from the origin are longer.
If this field represented fluid flow, the fluid is clearly spreading outward from the origin in all directions. The divergence is the number that measures this spreading.
Divergence
For a vector field \mathbf{F} = (F_1, F_2, F_3) in three dimensions, the divergence is the scalar field
It measures the rate at which the field "spreads out" from each point. Positive divergence means the field is a source (expanding). Negative divergence means the field is a sink (contracting). Zero divergence means the field is incompressible — nothing is being created or destroyed.
For \mathbf{F}(x, y) = (x, y): the divergence is \partial x / \partial x + \partial y / \partial y = 1 + 1 = 2. A constant, positive everywhere. The field is uniformly expanding — every tiny box has more flow leaving than entering, at the same rate everywhere.
Now take a different field: \mathbf{G}(x, y) = (-y, x). At (1, 0) the vector is (0, 1) — pointing up. At (0, 1) it is (-1, 0) — pointing left. At (-1, 0) it is (0, -1) — pointing down. The vectors go around the origin in a circle, anticlockwise. The divergence is \partial(-y)/\partial x + \partial(x)/\partial y = 0 + 0 = 0. No spreading, no compressing — the fluid just circulates. This field has zero divergence but is clearly doing something. What it is doing is called curl.
A physical way to remember divergence: imagine placing a tiny sponge at a point in the flow. If the sponge absorbs fluid (flow converges), the divergence is negative. If it gets pushed outward (flow diverges), the divergence is positive. If the flow just slides past without the sponge getting fatter or thinner, the divergence is zero.
Curl: is the field spinning?
The field \mathbf{G} = (-y, x) has zero divergence, but it is clearly rotating. The curl is the tool that detects rotation.
Imagine placing a tiny paddlewheel in the flow at some point. If the flow pushes one side of the paddlewheel harder than the other, the wheel spins — and the curl measures how fast it spins and around which axis.
For a vector field \mathbf{F} = (F_1, F_2, F_3) in three dimensions, the curl is defined as:
Curl
The curl of a vector field is itself a vector field. At each point, the direction of the curl vector is the axis around which the field rotates, and its magnitude measures how fast the rotation is.
This formula looks intimidating, but there is a clean way to remember it. Arrange \nabla and \mathbf{F} as a 3 \times 3 determinant:
Expand this determinant exactly the way you expand any 3 \times 3 determinant, and you get the formula above. The determinant is a mnemonic device — it is not literally a determinant of numbers — but it always gives the right answer.
For the circulating field \mathbf{G} = (-y, x, 0) in three dimensions (treating it as a 2D field lying in the xy-plane):
The curl points straight up out of the xy-plane — that is the axis of rotation. Its magnitude is 2, which is twice the angular velocity. The paddlewheel spins anticlockwise (following the right-hand rule), which is exactly what you see in the picture of \mathbf{G}.
For the expanding field \mathbf{F} = (x, y, 0):
Zero curl everywhere. The field spreads out but does not rotate. A paddlewheel placed in this flow would be pushed outward but would not spin.
These two examples illustrate the central distinction: divergence detects sources and sinks; curl detects rotation. A field can have one, both, or neither.
A compact notation: the del operator
You have now seen \nabla f (gradient), \nabla \cdot \mathbf{F} (divergence), and \nabla \times \mathbf{F} (curl). The operator \nabla appears in all three, playing different roles:
- \nabla acting on a scalar → gradient (a vector)
- \nabla \cdot acting on a vector → divergence (a scalar)
- \nabla \times acting on a vector → curl (a vector)
This is the power of the nabla notation. Three conceptually different operations are unified into one symbol used three different ways. There are even deeper identities connecting them. For instance, the curl of a gradient is always zero: \nabla \times (\nabla f) = \mathbf{0} for any smooth scalar field f. And the divergence of a curl is always zero: \nabla \cdot (\nabla \times \mathbf{F}) = 0 for any smooth vector field \mathbf{F}. These are not coincidences — they reflect a deep mathematical structure that becomes fully visible in differential geometry.
Line integrals: adding up along a path
Ordinary integration adds up the values of a function along the x-axis — a straight line. A line integral adds up the values of a field along a curve in space.
Here is the physical picture. A force field \mathbf{F} acts on a particle. The particle moves along a curved path C from point A to point B. How much work does the field do on the particle?
At each tiny step along the path, the work done is \mathbf{F} \cdot d\mathbf{r} — the component of the force in the direction of motion, times the tiny distance moved. The total work is the sum of all these tiny contributions:
This is the line integral of \mathbf{F} along the curve C.
To compute it, you need to parametrise the curve — write it as \mathbf{r}(t) = (x(t), y(t)) for t running from some start value a to some end value b. Then d\mathbf{r} = (x'(t), y'(t))\,dt, and the line integral becomes an ordinary single-variable integral:
That is the computational formula. The right-hand side is just a definite integral of a scalar function — something you already know how to evaluate.
Computing them: two worked examples
Example 1: Gradient and line integral of a force field
Consider the force field \mathbf{F}(x, y) = (2x, \; 4y). A particle moves along the straight line from (0, 0) to (3, 1). Find the work done by the force.
Step 1. Parametrise the path. A straight line from (0, 0) to (3, 1) can be written as \mathbf{r}(t) = (3t, \; t) for t \in [0, 1].
Why: at t = 0, the point is (0, 0); at t = 1, the point is (3, 1). The parametrisation sweeps out the line segment.
Step 2. Compute \mathbf{r}'(t) = (3, 1), the tangent vector to the path.
Why: you need d\mathbf{r} = \mathbf{r}'(t)\,dt to set up the line integral.
Step 3. Evaluate \mathbf{F} along the path. At the point \mathbf{r}(t) = (3t, t):
Why: you substitute the parametric coordinates into the force field to get the force at each point along the path.
Step 4. Compute the dot product \mathbf{F}(\mathbf{r}(t)) \cdot \mathbf{r}'(t):
Why: the dot product picks out the component of force in the direction of motion — only that component does work.
Step 5. Integrate from t = 0 to t = 1:
Result: The work done by \mathbf{F} along the straight-line path from the origin to (3, 1) is 11 units.
Notice something: the field \mathbf{F} = (2x, 4y) is actually the gradient of the scalar field \phi(x, y) = x^2 + 2y^2. So W = \phi(3, 1) - \phi(0, 0) = (9 + 2) - 0 = 11. When the force is a gradient, the work depends only on the endpoints, not on the path taken — a fact that connects directly to the idea of conservative fields and potential energy in physics.
Example 2: Curl and circulation around a loop
Take the vector field \mathbf{G}(x, y) = (-y, \; x) — the swirling field from earlier. Compute the line integral of \mathbf{G} around the unit circle, traversed anticlockwise.
Step 1. Parametrise the unit circle: \mathbf{r}(t) = (\cos t, \; \sin t) for t \in [0, 2\pi].
Why: as t goes from 0 to 2\pi, the point traces the full circle anticlockwise.
Step 2. Compute \mathbf{r}'(t) = (-\sin t, \; \cos t).
Why: differentiating the parametric equations gives the tangent vector at each point of the circle.
Step 3. Evaluate \mathbf{G} along the circle:
Why: substitute x = \cos t, y = \sin t into \mathbf{G} = (-y, x).
Step 4. Dot product:
Why: the Pythagorean identity collapses the dot product to 1 at every point on the circle. The force is always perfectly aligned with the direction of motion.
Step 5. Integrate:
Result: The circulation of \mathbf{G} around the unit circle is 2\pi.
The result 2\pi is exactly the circumference of the unit circle. That is because \mathbf{G} is a unit-length vector field on the circle that points exactly in the direction of motion at every point — so the integrand is 1 everywhere, and the integral just measures the length of the path. This is a special case of a general pattern: the circulation of a field around a closed loop is related to the curl enclosed inside the loop — a fact known as Green's theorem (or Stokes' theorem in three dimensions).
Common confusions
-
"The gradient is a scalar." The gradient of a scalar field is a vector field. Gradient takes scalars and produces vectors. The confusion comes from the word "derivative" — in one dimension, the derivative is a number, but in multiple dimensions the analog is a vector that points in the direction of steepest ascent.
-
"Divergence and curl are the same kind of thing." Divergence takes a vector field and returns a scalar (a single number at each point). Curl takes a vector field and returns another vector field (a vector at each point). They measure fundamentally different properties: spreading versus spinning.
-
"If the curl is zero, the field is constant." A field with zero curl can be very far from constant — it just means the field has no rotational component. The field \mathbf{F} = (x, y) has zero curl but is different at every point. Zero curl means the field is irrotational, not that it is uniform.
-
"Line integrals always depend on the path." Sometimes they do, but when the vector field is a gradient of some scalar function \phi (a conservative field), the line integral depends only on the starting and ending points: \int_C \nabla \phi \cdot d\mathbf{r} = \phi(B) - \phi(A). The path between A and B does not matter. This is the fundamental theorem of line integrals, the multivariable analog of the fundamental theorem of calculus.
-
"Curl only exists in three dimensions." The full cross-product formula for curl requires three dimensions. In two dimensions, the curl of (F_1, F_2) is treated as the scalar \partial F_2/\partial x - \partial F_1/\partial y — it measures rotation in the plane. The generalisation to higher dimensions uses the language of differential forms, which you will encounter in more advanced courses.
Going deeper
If you came here to understand what gradient, divergence, curl, and line integrals are, you have the picture — you can stop here. What follows is for readers who want to see the deeper connections tying these four ideas together.
The fundamental theorem of line integrals
In single-variable calculus, the fundamental theorem says:
The multivariable analog is:
If a vector field \mathbf{F} is the gradient of some scalar function \phi — called a potential function — then the line integral of \mathbf{F} along any path from A to B equals \phi(B) - \phi(A). The path does not matter.
This is why conservative forces in physics (gravity, electrostatics) have potential energy: the work done depends only on where you start and end, not on which route you take. Friction is not conservative precisely because its "field" is not a gradient — it has nonzero curl.
How do you tell whether a field is conservative? In a simply connected region, a field is conservative if and only if its curl is zero. So \nabla \times \mathbf{F} = \mathbf{0} is the test. For the field \mathbf{F} = (2x, 4y) from Example 1, the curl is \partial(4y)/\partial x - \partial(2x)/\partial y = 0 - 0 = 0, confirming it is conservative with potential \phi = x^2 + 2y^2.
Green's theorem: connecting line integrals to curl
Green's theorem says that the circulation of a field around a closed curve C equals the total curl inside the region R bounded by C:
Check this against Example 2. The field \mathbf{G} = (-y, x) has \partial F_2/\partial x - \partial F_1/\partial y = 1 - (-1) = 2. The region inside the unit circle has area \pi. So the double integral on the right is 2\pi — matching the circulation 2\pi that you computed directly.
Green's theorem is a two-dimensional case of the more general Stokes' theorem, which relates the circulation of a field around a boundary curve to the flux of the curl through the surface bounded by that curve. It is one of the cornerstones of physics, connecting local behaviour (what the field does at each point) to global behaviour (what happens when you integrate around a boundary).
The Laplacian
Apply the divergence to the gradient: \nabla \cdot (\nabla f). The result is a scalar called the Laplacian of f:
The Laplacian appears everywhere in physics. The heat equation (\partial T / \partial t = k \nabla^2 T) says that temperature diffuses at a rate proportional to its Laplacian. Laplace's equation (\nabla^2 \phi = 0) describes gravitational and electric potentials in free space. The wave equation, quantum mechanics, fluid dynamics — the Laplacian is the single most important second-order differential operator in all of mathematical physics.
For the temperature field T(x, y) = 100 - x^2 - 2y^2:
The negative Laplacian tells you the origin is a maximum: the function curves downward in every direction.
Where this leads next
You now have the vocabulary and intuition for vector calculus. Each of these ideas opens its own door.
- Directional Derivative — how the gradient generalises the derivative in any direction, not just along the coordinate axes.
- Surface Integrals — the next step after line integrals: integrating over a surface in three-dimensional space.
- Green's Theorem — the formal statement and proof of the connection between circulation and curl in the plane.
- Stokes' Theorem — the three-dimensional generalisation of Green's theorem, relating surface integrals of curl to line integrals along the boundary.
- Divergence Theorem — Gauss's theorem: the total divergence inside a region equals the flux through its boundary surface.