Divergence

In vector calculus, **divergence** is a vector operator that operates on a vector field, producing a scalar field giving the quantity of the vector field's source at each point. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point.

As an example, consider air as it is heated or cooled. The velocity of the air at each point defines a vector field. While air is heated in a region, it expands in all directions, and thus the velocity field points outward from that region. The divergence of the velocity field in that region would thus have a positive value. While the air is cooled and thus contracting, the divergence of the velocity has a negative value.

## Physical interpretation of divergence

In physical terms, the divergence of a vector field is the extent to which the vector field flux behaves like a source at a given point. It is a local measure of its "outgoingness" – the extent to which there is more of the field vectors exiting an infinitesimal region of space than entering it. A point at which the flux is outgoing has positive divergence, and is often called a "source" of the field. A point at which the flux is directed inward has negative divergence, and is often called a "sink" of the field. The greater the flux of field through a small surface enclosing a given point, the greater the value of divergence at that point. A point at which there is zero flux through an enclosing surface has zero divergence.

The divergence of a vector field is often illustrated using the example of the velocity field of a fluid, a liquid or gas. A moving gas has a velocity, a speed and direction, at each point which can be represented by a vector, so the velocity of the gas forms a vector field. If a gas is heated, it will expand. This will cause a net motion of gas particles outward in all directions. Any closed surface in the gas will enclose gas which is expanding, so there will be an outward flux of gas through the surface. So the velocity field will have positive divergence everywhere. Similarly, if the gas is cooled, it will contract. There will be more room for gas particles in any volume, so the external pressure of the fluid will cause a net flow of gas volume inward through any closed surface. Therefore the velocity field has negative divergence everywhere. In contrast in an unheated gas with a constant density, the gas may be moving, but the volume rate of gas flowing into any closed surface must equal the volume rate flowing out, so the *net* flux of fluid through any closed surface is zero. Thus the gas velocity has zero divergence everywhere. A field which has zero divergence everywhere is called solenoidal.

If the fluid is heated only at one point or small region, or a small tube is introduced which supplies a source of additional fluid at one point, the fluid there will expand, pushing fluid particles around it outward in all directions. This will cause an outward velocity field throughout the fluid, centered on the heated point. Any closed surface enclosing the heated point will have a flux of fluid particles passing out of it, so there is positive divergence at that point. However any closed surface *not* enclosing the point will have a constant density of fluid inside, so just as many fluid particles are entering as leaving the volume, thus the net flux out of the volume is zero. Therefore the divergence at any other point is zero.

## Definition

The divergence of a vector field **F**(**x**) at a point **x**0 is defined as the limit of the ratio of the surface integral of **F** out of the surface of a closed volume *V* enclosing **x**0 to the volume of *V*, as *V* shrinks to zero

div
⁡

F

x

0

=

lim

V
→
0

1

V

{\displaystyle \left.\operatorname {div} \mathbf {F} \right|\_{\mathbf {x\_{0}} }=\lim \_{V\rightarrow 0}{1 \over |V|}}

S
(
V
)

{\displaystyle \scriptstyle S(V)}

F

⋅

n
^

d
S

{\displaystyle \mathbf {F} \cdot \mathbf {\hat {n}} \,dS}

where |*V*| is the volume of *V*, *S*(*V*) is the boundary of *V*, and **n̂** is the outward unit normal to that surface. It can be shown that the above limit always converges to the same value for any sequence of volumes that contain **x**0 and approach zero volume. The result, div **F**, is a scalar function of **x**.

Since this definition is coordinate-free, it shows that the divergence is the same in any coordinate system. However it is not often used practically to calculate divergence; when the vector field is given in a coordinate system the coordinate definitions below are much simpler to use.

A vector field with zero divergence everywhere is called *solenoidal* – in which case any closed surface has no net flux across it.

## Definition in coordinates

### Cartesian coordinates

In three-dimensional Cartesian coordinates, the divergence of a continuously differentiable vector field

F

=

F

x

i

F

y

j

F

z

k

{\displaystyle \mathbf {F} =F\_{x}\mathbf {i} +F\_{y}\mathbf {j} +F\_{z}\mathbf {k} }

 is defined as the scalar-valued function:

div
⁡

F

=
∇
⋅

F

=

(

∂

∂
x

,

∂

∂
y

,

∂

∂
z

)

⋅
(

F

x

,

F

y

,

F

z

# )

∂

F

x

∂
x

∂

F

y

∂
y

∂

F

z

∂
z

.

{\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} =\left({\frac {\partial }{\partial x}},{\frac {\partial }{\partial y}},{\frac {\partial }{\partial z}}\right)\cdot (F\_{x},F\_{y},F\_{z})={\frac {\partial F\_{x}}{\partial x}}+{\frac {\partial F\_{y}}{\partial y}}+{\frac {\partial F\_{z}}{\partial z}}.}

Although expressed in terms of coordinates, the result is invariant under rotations, as the physical interpretation suggests. This is because the trace of the Jacobian matrix of an *N*-dimensional vector field **F** in *N*-dimensional space is invariant under any invertible linear transformation.

The common notation for the divergence ∇ · **F** is a convenient mnemonic, where the dot denotes an operation reminiscent of the dot product: take the components of the ∇ operator (see del), apply them to the corresponding components of **F**, and sum the results. Because applying an operator is different from multiplying the components, this is considered an abuse of notation.

### Cylindrical coordinates

For a vector expressed in **local** unit cylindrical coordinates as

F

=

e

r

F

r

e

θ

F

θ

e

z

F

z

,

{\displaystyle \mathbf {F} =\mathbf {e} \_{r}F\_{r}+\mathbf {e} \_{\theta }F\_{\theta }+\mathbf {e} \_{z}F\_{z},}

where **e***a* is the unit vector in direction *a*, the divergence is

div
⁡

F

=
∇
⋅

F

=

1
r

∂

∂
r

(

r

F

r

)

1
r

∂

F

θ

∂
θ

∂

F

z

∂
z

.

{\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {1}{r}}{\frac {\partial }{\partial r}}\left(rF\_{r}\right)+{\frac {1}{r}}{\frac {\partial F\_{\theta }}{\partial \theta }}+{\frac {\partial F\_{z}}{\partial z}}.}

The use of local coordinates is vital for the validity of the expression. If we consider **x** the position vector and the functions

r
(

x

)

{\displaystyle r(\mathbf {x} )}

,

θ
(

x

)

{\displaystyle \theta (\mathbf {x} )}

, and

z
(

x

)

{\displaystyle z(\mathbf {x} )}

, which assign the corresponding **global** cylindrical coordinate to a vector, in general

r
(

F

(

x

)
)
≠

F

r

(

x

)

{\displaystyle r(\mathbf {F} (\mathbf {x} ))\neq F\_{r}(\mathbf {x} )}

,

θ
(

F

(

x

)
)
≠

F

θ

(

x

)

{\displaystyle \theta (\mathbf {F} (\mathbf {x} ))\neq F\_{\theta }(\mathbf {x} )}

, and

z
(

F

(

x

)
)
≠

F

z

(

x

)

{\displaystyle z(\mathbf {F} (\mathbf {x} ))\neq F\_{z}(\mathbf {x} )}

. In particular, if we consider the identity function

F

(

x

# )

x

{\displaystyle \mathbf {F} (\mathbf {x} )=\mathbf {x} }

, we find that:

θ
(

F

(

x

)
# )
θ
≠

F

θ

(

x

# )
0

{\displaystyle \theta (\mathbf {F} (\mathbf {x} ))=\theta \neq F\_{\theta }(\mathbf {x} )=0}

.
### Spherical coordinates

In spherical coordinates, with *θ* the angle with the *z* axis and *φ* the rotation around the *z* axis, and

F

{\displaystyle \mathbf F }

 again written in local unit coordinates, the divergence is

div
⁡

F

=
∇
⋅

F

=

1

r

2

∂

∂
r

(

r

2

F

r

)

1

r
sin
⁡
θ

∂

∂
θ

(
sin
⁡
θ

F

θ

)

1

r
sin
⁡
θ

∂

F

φ

∂
φ

.

{\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {1}{r^{2}}}{\frac {\partial }{\partial r}}\left(r^{2}F\_{r}\right)+{\frac {1}{r\sin \theta }}{\frac {\partial }{\partial \theta }}(\sin \theta \,F\_{\theta })+{\frac {1}{r\sin \theta }}{\frac {\partial F\_{\varphi }}{\partial \varphi }}.}

### Tensor field

Let

A

{\displaystyle \mathbf{A}}

 be continuously differentiable second-order tensor field defined as follows:

A

=

[

A

11

A

12

A

13

A

21

A

22

A

23

A

31

A

32

A

33

]

{\displaystyle \mathbf {A} ={\begin{bmatrix}A\_{11}&A\_{12}&A\_{13}\\A\_{21}&A\_{22}&A\_{23}\\A\_{31}&A\_{32}&A\_{33}\end{bmatrix}}}

the divergence in cartesian coordinate system is a first-order tensor field and can be defined in two ways:

div
⁡
(

A

# )

∂

A

i
k

∂

x

k

e

i

=

A

i
k
,
k

e

i

=

[

∂

A

11

∂

x

1

∂

A

12

∂

x

2

∂

A

13

∂

x

3

∂

A

21

∂

x

1

∂

A

22

∂

x

2

∂

A

23

∂

x

3

∂

A

31

∂

x

1

∂

A

32

∂

x

2

∂

A

33

∂

x

3

]

{\displaystyle \operatorname {div} (\mathbf {A} )={\cfrac {\partial A\_{ik}}{\partial x\_{k}}}~\mathbf {e} \_{i}=A\_{ik,k}~\mathbf {e} \_{i}={\begin{bmatrix}{\dfrac {\partial A\_{11}}{\partial x\_{1}}}+{\dfrac {\partial A\_{12}}{\partial x\_{2}}}+{\dfrac {\partial A\_{13}}{\partial x\_{3}}}\\{\dfrac {\partial A\_{21}}{\partial x\_{1}}}+{\dfrac {\partial A\_{22}}{\partial x\_{2}}}+{\dfrac {\partial A\_{23}}{\partial x\_{3}}}\\{\dfrac {\partial A\_{31}}{\partial x\_{1}}}+{\dfrac {\partial A\_{32}}{\partial x\_{2}}}+{\dfrac {\partial A\_{33}}{\partial x\_{3}}}\end{bmatrix}}}

and

∇
⋅

A

=

∂

A

k
i

∂

x

k

e

i

=

A

k
i
,
k

e

i

=

[

∂

A

11

∂

x

1

∂

A

21

∂

x

2

∂

A

31

∂

x

3

∂

A

12

∂

x

1

∂

A

22

∂

x

2

∂

A

32

∂

x

3

∂

A

13

∂

x

1

∂

A

23

∂

x

2

∂

A

33

∂

x

3

]

{\displaystyle \nabla \cdot \mathbf {A} ={\cfrac {\partial A\_{ki}}{\partial x\_{k}}}~\mathbf {e} \_{i}=A\_{ki,k}~\mathbf {e} \_{i}={\begin{bmatrix}{\dfrac {\partial A\_{11}}{\partial x\_{1}}}+{\dfrac {\partial A\_{21}}{\partial x\_{2}}}+{\dfrac {\partial A\_{31}}{\partial x\_{3}}}\\{\dfrac {\partial A\_{12}}{\partial x\_{1}}}+{\dfrac {\partial A\_{22}}{\partial x\_{2}}}+{\dfrac {\partial A\_{32}}{\partial x\_{3}}}\\{\dfrac {\partial A\_{13}}{\partial x\_{1}}}+{\dfrac {\partial A\_{23}}{\partial x\_{2}}}+{\dfrac {\partial A\_{33}}{\partial x\_{3}}}\\\end{bmatrix}}}

We have

div
⁡
(

A

T

# )
∇
⋅

A

{\displaystyle \operatorname {div} (\mathbf {A^{T}} )=\nabla \cdot \mathbf {A} }

We should note that if tensor is symmetric

A

i
j

=

A

j
i

{\displaystyle A\_{ij} = A\_{ji} }

 then

div
⁡
(

A

# )
∇
⋅

A

{\displaystyle \operatorname {div} (\mathbf {A} )=\nabla \cdot \mathbf {A} }

 and this cause that often in literature this two definitions (and symbols

d
i
v

{\displaystyle \mathrm{div}}

 and

∇
⋅

{\displaystyle \nabla \cdot}

 ) are switched and interchangeably used (especially in mechanics equations where tensor symmetry is assumed).

Expressions of

∇
⋅

A

{\displaystyle \nabla \cdot \mathbf{A}}

 in cylindrical and spherical coordinates are given in the article del in cylindrical and spherical coordinates.

### General coordinates

Using Einstein notation we can consider the divergence in  general coordinates, which we write as *x*1, ..., *x**i*, ...,*x**n*, where n is the number of dimensions of the domain. Here, the upper index refers to the number of the coordinate or component, so *x*2 refers to the second component, and not the quantity *x* squared. The index variable *i* is used to refer to an arbitrary element, such as *x**i*. The divergence can then be written via the Voss- Weyl formula, as:

div
⁡
(

F

# )

1
ρ

∂

(

ρ

F

i

)

∂

x

i

,

{\displaystyle \operatorname {div} (\mathbf {F} )={\frac {1}{\rho }}{\frac {\partial \left(\rho \,F^{i}\right)}{\partial x^{i}}},}

where

ρ

{\displaystyle \rho}

 is the local coefficient of the volume element and *F**i*  are the components of **F** with respect to the local **unnormalized** covariant basis (sometimes written as

e

i

=
∂

x

/

∂

x
i

{\displaystyle \mathbf{e}\_i = \partial \mathbf{x}/\partial x^i}

). The Einstein notation implies summation over *i*, since it appears as both an upper and lower index.

The volume coefficient

ρ

{\displaystyle \rho}

 is a function of position which depends on the coordinate system. In Cartesian, cylindrical and spherical coordinates, using the same conventions as before, we have

# ρ
1

{\displaystyle \rho =1}

,

# ρ
r

{\displaystyle \rho =r}

 and

# ρ

r

2

sin
⁡

θ

{\displaystyle \rho =r^{2}\sin {\theta }}

, respectively. It can also be expressed as

# ρ

det
⁡

g

a
b

{\displaystyle \rho ={\sqrt {\operatorname {det} g\_{ab}}}}

, where

g

a
b

{\displaystyle g\_{ab}}

 is the metric tensor. Since the determinant is a scalar quantity which doesn't depend on the indices, we can suppress them and simply write

# ρ

det
⁡
g

{\displaystyle \rho ={\sqrt {\operatorname {det} g}}}

. Another expression comes from computing the determinant of the Jacobian for transforming from Cartesian coordinates, which for *n* = 3 gives

# ρ

∂
(
x
,
y
,
z
)

∂
(

x

1

,

x

2

,

x

3

)

.

{\displaystyle \rho =\left|{\frac {\partial (x,y,z)}{\partial (x^{1},x^{2},x^{3})}}\right|.}

Some conventions expect all local basis elements to be normalized to unit length, as was done in the previous sections. If we write

e

^

i

{\displaystyle \hat{\mathbf{e}}\_i}

 for the normalized basis, and

F
^

i

{\displaystyle {\hat {F}}^{i}}

 for the components of **F** with respect to it, we have that

F

=

F

i

e

i

=

F

i

‖

e

i

‖

e

i

‖

e

i

‖

=

F

i

g

i
i

e

^

i

=

F
^

i

e

^

i

,

{\displaystyle \mathbf {F} =F^{i}\mathbf {e} \_{i}=F^{i}{\lVert {\mathbf {e} \_{i}}\rVert }{\frac {\mathbf {e} \_{i}}{\lVert {\mathbf {e} \_{i}}\rVert }}=F^{i}{\sqrt {g\_{ii}}}\,{\hat {\mathbf {e} }}\_{i}={\hat {F}}^{i}{\hat {\mathbf {e} }}\_{i},}

using one of the properties of the metric tensor. By dotting both sides of the last equality with the contravariant element

e

^

i

{\displaystyle \hat{\mathbf{e}}^i}

, we can conclude that

F

i

=

F
^

i

/

g

i
i

{\displaystyle F^{i}={\hat {F}}^{i}/{\sqrt {g\_{ii}}}}

. After substituting, the formula becomes:

div
⁡
(

F

# )

1
ρ

∂

(

ρ

g

i
i

F
^

i

)

∂

x

i

=

1

det
⁡
g

∂

(

det
⁡
g

g

i
i

F
^

i

)

∂

x

i

{\displaystyle \operatorname {div} (\mathbf {F} )={\frac {1}{\rho }}{\frac {\partial \left({\frac {\rho }{\sqrt {g\_{ii}}}}{\hat {F}}^{i}\right)}{\partial x^{i}}}={\frac {1}{\sqrt {\operatorname {det} g}}}{\frac {\partial \left({\sqrt {\frac {\operatorname {det} g}{g\_{ii}}}}\,{\hat {F}}^{i}\right)}{\partial x^{i}}}}

.
See  *§ Generalizations* for further discussion.

## Properties

Main articles: Vector calculus identities
The following properties can all be derived from the ordinary differentiation rules of calculus. Most importantly, the divergence is a linear operator, i.e.,

div
⁡
(
a

F

b

G

# )
a
div
⁡

F

b
div
⁡

G

{\displaystyle \operatorname {div} (a\mathbf {F} +b\mathbf {G} )=a\operatorname {div} \mathbf {F} +b\operatorname {div} \mathbf {G} }

for all vector fields **F** and **G** and all real numbers *a* and *b*.

There is a product rule of the following type: if φ is a scalar-valued function and **F** is a vector field, then

div
⁡
(
φ

F

# )
grad
⁡
φ
⋅

F

φ
div
⁡

F

,

{\displaystyle \operatorname {div} (\varphi \mathbf {F} )=\operatorname {grad} \varphi \cdot \mathbf {F} +\varphi \operatorname {div} \mathbf {F} ,}

or in more suggestive notation

∇
⋅
(
φ

F

# )
(
∇
φ
)
⋅

F

φ
(
∇
⋅

F

)
.

{\displaystyle \nabla \cdot (\varphi \mathbf {F} )=(\nabla \varphi )\cdot \mathbf {F} +\varphi (\nabla \cdot \mathbf {F} ).}

Another product rule for the cross product of two vector fields **F** and **G** in three dimensions involves the curl and reads as follows:

div
⁡
(

F

×

G

# )
curl
⁡

F

⋅

G

−

F

⋅
curl
⁡

G

,

{\displaystyle \operatorname {div} (\mathbf {F} \times \mathbf {G} )=\operatorname {curl} \mathbf {F} \cdot \mathbf {G} -\mathbf {F} \cdot \operatorname {curl} \mathbf {G} ,}

or

∇
⋅
(

F

×

G

# )
(
∇
×

F

)
⋅

G

−

F

⋅
(
∇
×

G

)
.

{\displaystyle \nabla\cdot(\mathbf{F}\times\mathbf{G})
= (\nabla\times\mathbf{F})\cdot\mathbf{G}
- \mathbf{F}\cdot(\nabla\times\mathbf{G}).}

The Laplacian of a scalar field is the divergence of the field's gradient:

div
⁡
(
grad
⁡
φ
# )
Δ
φ
.

{\displaystyle \operatorname {div} (\operatorname {grad} \varphi )=\Delta \varphi .}

The divergence of the curl of any vector field (in three dimensions) is equal to zero:

∇
⋅
(
∇
×

F

# )
0
.

{\displaystyle \nabla \cdot (\nabla \times \mathbf{F}) = 0 .}

If a vector field **F** with zero divergence is defined on a ball in **R**3, then there exists some vector field **G** on the ball with **F** = curl **G**. For regions in **R**3 more topologically complicated than this, the latter statement might be false (see Poincaré lemma). The degree of *failure* of the truth of the statement, measured by the homology of the chain complex

{

scalar fields on

U
}

→
grad

{

vector fields on

U
}

→
curl

{

vector fields on

U
}

→
div

{

scalar fields on

U
}

{\displaystyle \{{\text{scalar fields on }}U\}~{\overset {\operatorname {grad} }{\rightarrow }}~\{{\text{vector fields on }}U\}~{\overset {\operatorname {curl} }{\rightarrow }}~\{{\text{vector fields on }}U\}~{\overset {\operatorname {div} }{\rightarrow }}~\{{\text{scalar fields on }}U\}}

serves as a nice quantification of the complicatedness of the underlying region *U*. These are the beginnings and main motivations of de Rham cohomology.

## Decomposition theorem

Main articles: Helmholtz decomposition
It can be shown that any stationary flux **v**(**r**) that is twice continuously differentiable in **R**3 and vanishes sufficiently fast for |**r**| → ∞ can be decomposed uniquely into an *irrotational part* **E**(**r**) and a *source-free part* **B**(**r**). Moreover, these parts are explicitly determined by the respective *source densities* (see above) and *circulation densities* (see the article Curl):

For the irrotational part one has

E

=
−
∇
Φ
(

r

)
,

{\displaystyle \mathbf {E} =-\nabla \Phi (\mathbf {r} ),}

with

Φ
(

r

# )

∫

R

3

d

3

r

′

div
⁡

v

(

r

′

)

4
π

r

−

r

′

.

{\displaystyle \Phi (\mathbf {r} )=\int \_{\mathbb {R} ^{3}}\,d^{3}\mathbf {r} '\;{\frac {\operatorname {div} \mathbf {v} (\mathbf {r} ')}{4\pi \left|\mathbf {r} -\mathbf {r} '\right|}}.}

The source-free part, **B**, can be similarly written: one only has to replace the *scalar potential* Φ(**r**) by a *vector potential* **A**(**r**) and the terms −∇Φ by +∇ × **A**, and the source density div **v**
by the circulation density ∇ × **v**.

This "decomposition theorem" is a by-product of the stationary case of electrodynamics. It is a special case of the more general Helmholtz decomposition, which works in dimensions greater than three as well.

## Relation with the exterior derivative

One can express the divergence as a particular case of the exterior derivative, which takes a 2-form to a 3-form in **R**3. Define the current two-form as

# j

F

1

d
y
∧
d
z

F

2

d
z
∧
d
x

F

3

d
x
∧
d
y
.

{\displaystyle j=F\_{1}\,dy\wedge dz+F\_{2}\,dz\wedge dx+F\_{3}\,dx\wedge dy.}

It measures the amount of "stuff" flowing through a surface per unit time in a "stuff fluid" of density *ρ* = 1 *dx* ∧ *dy* ∧ *dz* moving with local velocity **F**. Its exterior derivative *dj* is then given by

d
# j

(

∂

F

1

∂
x

∂

F

2

∂
y

∂

F

3

∂
z

)

d
x
∧
d
y
∧
d
# z
(
∇
⋅

F

)
ρ
.

{\displaystyle dj=\left({\frac {\partial F\_{1}}{\partial x}}+{\frac {\partial F\_{2}}{\partial y}}+{\frac {\partial F\_{3}}{\partial z}}\right)dx\wedge dy\wedge dz=(\nabla \cdot {\mathbf {F} })\rho .}

Thus, the divergence of the vector field **F** can be expressed as:

∇
⋅

F

=

⋆

d

⋆

(

F

♭

)

.

{\displaystyle \nabla \cdot {\mathbf {F} }={\star }d{\star }{\big (}{\mathbf {F} }^{\flat }{\big )}.}

Here the superscript ♭ is one of the two musical isomorphisms, and ⋆ is the Hodge star operator. Working with the current two-form and the exterior derivative is usually easier than working with the vector field and divergence, because unlike the divergence, the exterior derivative commutes with a change of (curvilinear) coordinate system.

## Generalizations

The divergence of a vector field can be defined in any number of dimensions. If

F

=
(

F

1

,

F

2

,
…

F

n

)
,

{\displaystyle \mathbf {F} =(F\_{1},F\_{2},\ldots F\_{n}),}

in a Euclidean coordinate system with coordinates *x*1, *x*2, ..., *x**n*, define

div
⁡

F

=
∇
⋅

F

=

∂

F

1

∂

x

1

∂

F

2

∂

x

2

⋯

∂

F

n

∂

x

n

.

{\displaystyle \operatorname {div} \mathbf {F} =\nabla \cdot \mathbf {F} ={\frac {\partial F\_{1}}{\partial x\_{1}}}+{\frac {\partial F\_{2}}{\partial x\_{2}}}+\cdots +{\frac {\partial F\_{n}}{\partial x\_{n}}}.}

The appropriate expression is more complicated in curvilinear coordinates.

In the case of one dimension, **F** reduces to a regular function, and the divergence reduces to the derivative.

For any *n*, the divergence is a linear operator, and it satisfies the "product rule"

∇
⋅
(
φ

F

# )
(
∇
φ
)
⋅

F

φ
(
∇
⋅

F

)

{\displaystyle \nabla \cdot (\varphi \mathbf {F} )=(\nabla \varphi )\cdot \mathbf {F} +\varphi (\nabla \cdot \mathbf {F} )}

for any scalar-valued function φ.

The divergence of a vector field extends naturally to any differentiable manifold of dimension *n* that has a volume form (or density) μ, e.g. a Riemannian or Lorentzian manifold. Generalising the construction of a two-form for a vector field on **R**3, on such a manifold a vector field *X* defines an (*n* − 1)-form *j* = *iX μ* obtained by contracting *X* with μ. The divergence is then the function defined by

d
# j
(
div
⁡
X
)
μ
.

{\displaystyle dj=(\operatorname {div} X)\mu .}

Standard formulas for the Lie derivative allow us to reformulate this as

L

X

# μ
(
div
⁡
X
)
μ
.

{\displaystyle {\mathcal {L}}\_{X}\mu =(\operatorname {div} X)\mu .}

This means that the divergence measures the rate of expansion of a volume element as we let it flow with the vector field.

On a pseudo-Riemannian manifold, the divergence with respect to the metric volume form can be computed in terms of the Levi-Civita connection ∇:

div
⁡
# X
∇
⋅
# X

X

a

;
a

,

{\displaystyle \operatorname {div} X=\nabla \cdot X={X^{a}}\_{;a},}

where the second expression is the contraction of the vector field valued 1-form ∇*X* with itself and the last expression is the traditional coordinate expression from Ricci calculus.

An equivalent expression without using connection is

div
⁡
(
X
# )

1

det
⁡
g

∂

a

(

det
⁡
g

X

a

)

,

{\displaystyle \operatorname {div} (X)={\frac {1}{\sqrt {\operatorname {det} g}}}\partial \_{a}\left({\sqrt {\operatorname {det} g}}\,X^{a}\right),}

where g is the metric and ∂*a* denotes the partial derivative with respect to coordinate *x**a*.

Divergence can also be generalised to tensors. In Einstein notation, the divergence of a contravariant vector Fμ is given by

∇
⋅

F

=

∇

μ

F

μ

,

{\displaystyle \nabla \cdot \mathbf {F} =\nabla \_{\mu }F^{\mu },}

where ∇*μ* denotes the covariant derivative.

Equivalently, some authors define the divergence of a mixed tensor by using the musical isomorphism ♯: if *T* is a (*p*, *q*)-tensor (*p* for the contravariant vector and *q* for the covariant one), then we define the *divergence of T* to be the (*p*, *q* − 1)-tensor

(
div
⁡
T
)
(

Y

1

,
…
,

Y

q
−
1

# )

trace

(

X
↦
♯
(
∇
T
)
(
X
,
⋅
,

Y

1

,
…
,

Y

q
−
1

)

)

;

{\displaystyle (\operatorname {div} T)(Y\_{1},\ldots ,Y\_{q-1})={\operatorname {trace} }{\Big (}X\mapsto \sharp (\nabla T)(X,\cdot ,Y\_{1},\ldots ,Y\_{q-1}){\Big )};}

that is, we take the trace over the *first two* covariant indices of the covariant derivative

## Notes

1. ↑  The choice of "first" covariant index of a tensor is intrinsic and depends on the ordering of the terms of the Cartesian product of vector spaces on which the tensor is given as a multilinear map V × V × ... × V → **R**. But equally well defined choices for the divergence could be made by using other indices. Consequently, it is more natural to specify the divergence of *T* with respect to a specified index. There are however two important special cases where this choice is essentially irrelevant: with a totally symmetric contravariant tensor, when every choice is equivalent, and with a totally antisymmetric contravariant tensor (a.k.a. a *k*-vector), when the choice affects only the sign.

## References

1. ↑ Cylindrical coordinates at Wolfram Mathworld
2. ↑ Spherical coordinates at Wolfram Mathworld