Gradient, Divergence and Curl: the Basics

We first consider the position vector, r:

r = x x + y y + z z ,

where x, y, and z are rectangular unit vectors. Since the unit vectors for rectangular coordinates are constants, we have for dr:

dr = dx x + dy y + dz z

The operator, del: , is defined to be (in rectangular coordinates):

( ) = x ( ) /x + y ( ) /y + z ( ) /z .

Note: the unit vectors are placed here in front of the operation, e.g., ( ) /x , to show that the operation is not performed on the unit vector itself. After the operations, the unit vectors will be placed after as is more usual.

This operator operates as a vector.


1. Gradient

If the del operator, , operates on a scalar function, f(x,y,z), we get the gradient

f = (f/x) x + (f/y) y + (f/z) z .

We can interpret this gradient as a vector with the magnitude and direction of the maximum change of the function in space.
We can relate the gradient to the differential change in the function: 

df = (f/x) dx + (f/y) dy + (f/z) dz = f dr = df

Note: We will use this relation to determine the del operator, , in other coordinate systems later.


Since the del operator should be treated as a vector, there are two ways for a vector to multiply another vector: dot product and cross product. We first consider the dot product:


2. Divergence

The divergence of a vector is defined to be:

A = [x /x + y /y + z /z ] [Ax x + Ay y + Az z]

= (Ax /x) + (Ay /y) + (Az /z) ;

since the rectangular unit vectors are constant, x/x = 0 (etc.).
This will not necessarily be true for unit vectors in other coordinate systems. We'll see examples of this soon. 

To get some idea of what the divergence of a vector is, we consider Gauss' theorem (sometimes called the divergence theorem). We start with:

A dV = [(Ax /x) + (Ay /y) + (Az /z)] dx dy dz

[(Ax /x)dx dydz + (Ay /y)dy dxdz + (Az /z)dz dxdy] .

We can see that each term as written in the last expression gives the value of the change in vector A that cuts perpendicular through the surface. For instance, consider the first term: (Ax/x)dx dydz . The first part: (Ax/x)dx gives the change in the x-component of A and the second part, dydz, gives the yz surface (or x component of the surface, Sx) where we define the direction of the surface vector as that direction that is perpendicular to its surface. The other two terms give the change in the component of A that is perpendicular to the xz (Sy) and xy (Sz) surfaces. We thus can write:

A dV = closed surface A dS

where the vector S is the surface area vector. Thus we see that the volume integral of the divergence of vector A is equal to the net amount of A that cuts through (or diverges from) the closed surface that surrounds the volume over which the volume integral is taken. Hence the name divergence for A .

Example from electromagnetism: Consider a single point charge, q, and its electric field: E = (kq/r2)r which points radially away from the center. Now lets enclose that charge in a sphere of radius, r, with the charge initially at the center. The dS vector will also point radially away from the center. Since the magnitude of the electric field will remain the same at all points on the surface (since r is constant), the dot product of  E dS will be a constant; and so the integral over the entire surface will simply give (kq/r2)*(4pr2) = 4pkq, and with k = 1/(4peo), we can write this as q/eo . We recognize that the charge is the source of all the field, so it really doesnt matter where the charge is inside the sphere it doesnt have to be at the center of the sphere. If there is no charge inside, then the integral is equal to zero. Thus, E dV = closed surface E dS = qenclosed/eo . If we write E dV = qenclosed/eo in differential form, we get E = (dqenclosed/eo)/dV = r/eo where r is the charge density.
For magnetic fields, since there are no monopoles, the magnetic pole density is always zero, so B = 0.
For gravity, we get:
g = -4pGrm , where rm is the mass density.
Due to the spherical symmetry of the fields from point charges and masses, we will have to wait until we get expressed in spherical form to show that the divergence theorem actually works that is, that both sides of the equation give the same result. We do this in the section on Kinematics in 3-D.


3. Curl

The curl of a vector is defined to be:

A = [x /x + y /y + z /z ] [Ax x + Ay y + Az z] =

(Ay /x)(z) + (Az /x)(-y) + (Ax/y)(-z) + (Az/y)(x) + (Ax/z)(y) + (Ay/z)(-x

= (Az/y - Ay/z) x + (Ax/z - Az /x) y + (Ay /x - Ax/y) z 

where we have used the fact that the unit vectors do not change with position (x/x = 0) and the fact that (x x=0 and x y=z, etc.). For other coordinate systems, unit vectors may change with position.

To see what the curl of a vector means, we use Stokes Theorem. We begin with:

surface ( A) dS =

[(Az/y - Ay/z) x + (Ax/z - Az /x) y + (Ay /x - Ax/y) z ] d[Sxx + Syy + Szz] 

= [(Az/y - Ay/z) dSx + (Ax/z - Az /x) dSy + (Ay /x - Ax/y) dSz] .

The dSx = dy*dz = dy dz, etc. However, we must worry about direction since x y = z but y x = -z. After taking this into account, we get:

( A) dS =

[(Az/y + Ay/z) dydz + (Ax/z + Az /x) dxdz + (Ay /x + Ax/y) dxdy] .

Regrouping gives:

( A) dS = 

[Ax/z) dz + (Ax/y) dy] dx + [Ay/x) dx + (Ay/ z) dz] dy + [Az/y) dy + (Az/x) dx] dz . 

Now we note that dAx = (Ax/x)dx + (Ax/y)dy + (Ax/z)dz . In the above integration, x was held constant when we integrated over the other variables, so the (Ax/x)dx term is zero. Thus the above double integral becomes:

( A) dS = [dAx dx + dAy dy + dAz dz] = closed loop A dr

If the integral around a closed loop is not zero, then that implies that there is some circulation of the vector field. Note that if the curl of the vector is zero everywhere, then there cannot be any circulation of the vector field anywhere in space. Hence the name of curl for A .

Another derivation of Stokes Theorem can be found in Volume 2 of the Feynmann lectures at: .

Important Use: We can see an immediate use for the curl if we recall our discussion about work. If the curl of a force field is zero, then the work done around a closed path must be zero regardless of the closed path chosen. This means that the work done between any two points must be path-independent! This then allows a potential energy change to be defined for this force that depends only on the beginning and ending points.

Example: Consider the example problem we had in the last section:
Fx = ax3 + bxy2 + cz
Fy = ay3 + bx2y
Fz = cx .

We found that this force gave us a work that was independent of path (we tried two different paths and got the same result). Lets look at the curl of this F. It should equal zero if the Work that this force does is independent of path.

F = [x /x + y /y + z /z ] [Fx x + Fy y + Fz z] =

= (Fz/y - Fy/z) x + (Fx/z - Fz /x) y + (Fy /x - Fx/y) z 

= (0 0) x + (c c) y + (2bxy 2bxy) z  = 0.

To see both the curl and divergence of a couple of force functions, see this word document.

Return to PHYS 380 Outline