Learning Objectives
- Determine divergence from the formula for a given vector field.
Divergence is an operation on a vector field that tells us how the field behaves toward or away from a point. Locally, the divergence of a vector field in or at a particular point is a measure of the “outflowing-ness” of the vector field at . If represents the velocity of a fluid, then the divergence of at measures the net rate of change with respect to time of the amount of fluid flowing away from (the tendency of the fluid to flow “out of” ). In particular, if the amount of fluid flowing into P is the same as the amount flowing out, then the divergence at is zero.
definition
If is a vector field in and , , and all exist, then the divergence of is defined by
.
Note the divergence of a vector field is not a vector field, but a scalar function. In terms of the gradient operator , divergence can be written symbolically as the dot product
.
Note this is merely helpful notation, because the dot product of a vector of operators and a vector of functions is not meaningfully defined given our current definition of dot product.
If is a vector field in , and and both exist, then the divergence of is defined similarly as
.
To illustrate this point, consider the two vector fields in Figure 1. At any particular point, the amount flowing in is the same as the amount flowing out, so at every point the “outflowing-ness” of the field is zero. Therefore, we expect the divergence of both fields to be zero, and this is indeed the case, as
.

Figure 1. (a) Vector field has zero divergence. (b) Vector field also has zero divergence.

Figure 2. This vector field has negative divergence.
Example: calculating divergence at a Point
If , then find the divergence of at .
try it
Find for .
Watch the following video to see the worked solution to the above Try It
One application for divergence occurs in physics, when working with magnetic fields. A magnetic field is a vector field that models the influence of electric currents and magnetic materials. Physicists use divergence in Gauss’s law for magnetism, which states that if is a magnetic field, then ; in other words, the divergence of a magnetic field is zero.
Example: determining whether a field is magnetic
Is it possible for to be a magnetic field?
Another application for divergence is detecting whether a field is source free. Recall that a source-free field is a vector field that has a stream function; equivalently, a source-free field is a field with a flux that is zero along any closed curve. The next two theorems say that, under certain conditions, source-free vector fields are precisely the vector fields with zero divergence.
theorem: divergence of a source-free vector field
If is a source-free continuous vector field with differentiable component functions, then .
Proof
Since is source free, there is a function with and . Therefore, and by Clairaut’s theorem.
The converse of Divergence of a Source-Free Vector Field Theorem is true on simply connected regions, but the proof is too technical to include here. Thus, we have the following theorem, which can test whether a vector field in is source free.
Theorem: divergence test for source-free vector fields
Let be a continuous vector field with differentiable component functions with a domain that is simply connected. Then, if and only if is source free.
Example: determining whether a field is Source free
Is field source free?
try it
Let be a rotational field where and are positive constants. Is source free?
Recall that the flux form of Green’s theorem says that
,
where is a simple closed curve and is the region enclosed by . Since , Green’s theorem is sometimes written as
.
Therefore, Green’s theorem can be written in terms of divergence. If we think of divergence as a derivative of sorts, then Green’s theorem says the “derivative” of on a region can be translated into a line integral of along the boundary of the region. This is analogous to the Fundamental Theorem of Calculus, in which the derivative of a function on a line segment can be translated into a statement about on the boundary of . Using divergence, we can see that Green’s theorem is a higher-dimensional analog of the Fundamental Theorem of Calculus.
We can use all of what we have learned in the application of divergence. Let be a vector field modeling the velocity of a fluid. Since the divergence of at point measures the “outflowing-ness” of the fluid at , implies that more fluid is flowing out of than flowing in. Similarly, implies the more fluid is flowing in to than is flowing out, and implies the same amount of fluid is flowing in as flowing out.
Example: determining the flow of a fluid
Suppose , models the flow of a fluid. Is more fluid flowing into point than flowing out?
try it
For vector field , find all points such that the amount of fluid flowing in to equals the amount of fluid flowing out of .
Candela Citations
- CP 6.40. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 3. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-3/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction