# Gradient Divergence Curl

### Del Operator

In vector calculus del operator is a symbolic vector and is used as a partial differential operator for calculations. It is noted by the nabla symbol:

In the Cartesian coordinate system for three dimensions, del operator is defined as:

where

are the unit vectors for the x,y,z axis respectively.

If this operator is applied in a scalar field, it denotes the gradient, and if it is applied in a vector field it denotes the divergence and the curl of this field.

### Gradient

Consider that you are in a big theater and you are watching a performance. As closer you are to the sound source, the sound intensity is higher. As further you are from the sound source, the sound intensity is lower. Since the intensity I of the sound is a scalar, we can consider the whole theater a scalar field. The intensity I of the sound at each point in the theater can be given by the function:

Gradient is a vector that can be derived from a scalar field and at each point of this scalar field, gradient points towards the direction of increment of the scalar field. In this case at each point of the whole theater there is a vector that points towards the source of the sound and the magnitude of the vector at each point expresses the magnitude of the change of the intensity of the sound.

So for the gradient we need a scalar field as input and we get a vector field as output. In order to calculate gradient, the following formula is used:

**Example 1:**

Consider the function:

The gradient of f is:

**Example 2:**

Consider the function:

The gradient of f is:

**Figure 1: Plot of f(x,y)=sin(x)+cos(y)+4 with it’s gradient**

In Figure 1 the function is plotted with its gradient. We can see that the vectors of the gradient are sourcing from the lower points of the function and they are pointing towards the higher points.

Now, consider that the plot of figure 1 expresses the surface of a landscape. Gradient expresses the slope of the hills. This applies for a movement directly towards the top of each hill. But what would be the slope if we wanted to move towards the top of a hill following an easier route by an angle θ in respect to the direct upwards route, like any curvy road that leads upwards to a hill?

In other words we want to calculate how gradient of f(x,y) changes in the direction of another vector. Consider that this easier route is defined by the vector:

then the rate of change of

across

is the dot product:

This dot product expresses the change of the gradient of a function, across a vector.

### Divergence

Consider a vector field, for example the forces that are applied on charged particles in a room, in which there is an electric field. If the force vector is:

Then divergence is given by the formula:

So divergence has as input a vector field and as output, a scalar field. Divergence expresses how much the magnitude of the vectors changes in space.

For each point in space, if the divergence is positive, it means that at this point the magnitude of the vectors increases, or that this point is sourcing the vectors. The vectors that are pointing outwards this point are stronger than those vectors that are pointing inwards this point.

On the contrary, if at a point in space divergence is negative, it means that at this point the magnitude of the vectors decreases, or that this point is sinking the vectors. The vectors that are pointing towards this point are stronger than those vectors that are pointing outwards of this point.

**Example 1:**

Then

**Example 2:**

In Figure 2 we can see the plot of the vector field:

**Figure 2: Plot of Vector Field**

The divergence of this vector field is:

As we can understand from the plot, points A and B have positive divergence because the vectors that are pointing towards these points are not as intensive as those that are pointing outwards of these points. So these points are sources of the vector field. Also a source would be any point that increases the vector field.

On the contrary, point C has negative divergence since it has only vectors pointing inwards to this point. It is a sink of the vector field. Also sink would be any point that decreases the vector field.

### Curl (Rotation)

Consider that you are on a river. You throw a ball in the water. Will this ball rotate around itself? It depends from the water flow around the ball. If the water flow from one side of the ball is higher than the flow from the other, then the ball will rotate. Generally in a vector field, if at any point the vectors are not equal around it, then there is rotation (curl).

For the vector field:

Curl is given by the formula:

Curl has as input a vector field and as output another new vector field. When the result is positive, there is an anticlockwise rotation and when the result is negative there is a clockwise rotation.

**Example 1:**

The curl is:

**Example 2:**

In figure 3 we can see the plot of the vector field:

**Figure 3: Plot of Vector Field**

The curl of this vector field is:

Visually from the plot we can understand that the vector field has rotation, since if we put an “object” in the field, the vectors at its sides are not equal, so it will rotate clockwise. We can get the verification for these observations from the calculations. The result is negative so we have rotation and is clockwise. The object will rotate with its rotation axis parallel to the z axis because the only unit vector is the unit vector k.