Divergence is a vector operator that represents the volume density of the outward flux of a vector field.

Divergence takes in a vector-valued function defining this vector field, and outputs a scalar-valued function , where the is the Del operator () and is the vector field.

divergence.png

Divergence

For a vector function , its divergence is

Intuition of Divergence

Intuitively, the divergence measures “how much a vector field is a source or a sink.” For example, in the below diagram, the divergence is for the “source point” and for the “sink point”.

The divergence would also be positive if the vector field passing through it is speeding up:

Linking Divergence Definition to Intuition

How does the divergence definition leads to change of volume density? Say we have a 2D function

And the formula for its divergence is the following:

Let’s focus on the component only. Suppose and , we have an outward fluid flow

Suppose and , we have an inward fluid flow

The observation can also generalized to , where means more is leaving than is coming in.

And divergence adds contributions of all the axis together:

References