Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 27

Vector Calculus Operators in Cartesian Coordinates

Recommended resources

Hello! Welcome to the third lesson in our module on Mathematical Methods for Physics.

In our previous lesson, we explored how Fourier series allow us to decompose complex periodic functions of a single variable (like time) into a sum of simple sinusoids. This is incredibly useful for analyzing periodic phenomena. However, many fundamental laws of physics, particularly in electromagnetism and fluid mechanics, are not described by functions of a single variable, but by fields—quantities that vary from point to point in space.

This lesson marks our transition into the powerful language of vector calculus, which is essential for describing these fields. Our learning outcome is to: Define and apply the gradient, divergence, and curl operators to scalar and vector fields in Cartesian coordinates. These three operators form the foundation of field theory and will be indispensable tools throughout your study of physics.

1. From Functions to Fields

Before we define the operators, let's clarify what we mean by "fields."

  • A scalar field is a function that assigns a single number (a scalar) to every point in space. Think of the temperature T(x, y, z) in a room or the pressure P(x, y, z) within a fluid.
  • A vector field is a function that assigns a vector to every point in space. Examples include the velocity field **v**(x, y, z) of a flowing river, which describes the speed and direction of the water at each point, or the electric field **E**(x, y, z) surrounding a charge.

To get a better visual intuition for vector fields, please start by watching the first part of this video.

Vector Fields, Divergence, and Curl

This clip from 'Professor Dave Explains' provides a clear visual introduction to the concept of vector fields and demonstrates how to plot one from its mathematical definition.

Watch the video from the beginning to 4:16. Focus on how a vector field is represented as a function with vector components that depend on spatial coordinates.


2. The Gradient: The Direction of Steepest Ascent

The first operator, the gradient, acts on a scalar field and produces a vector field. It tells us the direction and magnitude of the steepest increase of the scalar field at any given point.

We define a vector differential operator, called "del" or "nabla," denoted by ∇. In Cartesian coordinates, it is:

When ∇ acts on a scalar field φ(x, y, z), the result is the gradient of φ, written as grad(φ) or ∇φ:

The following video offers an excellent explanation of the gradient's physical meaning and its applications. Given your interest in rigorous foundations, pay close attention to the connections made to potential energy and optimization.

The Gradient Operator in Vector Calculus: Directions of Fastest Change & the Directional Derivative

This video by Steve Brunton provides a deep dive into the gradient. It clearly explains its physical meaning, its property of linearity, and its application in physics, such as deriving a force from a potential.

Watch the specified sections of the video: (0:09 - 3:17) Focus on the definition and a computational example. (4:55 - 7:23) Understand the physical interpretation of the gradient using the temperature field example. This is the core concept. (9:21 - 14:44) Pay attention to the crucial application of deriving the gravitational force vector field from the scalar potential energy field. This concept, F = -∇U, is fundamental in both mechanics and electromagnetism.

As the video highlights, the gradient ∇φ is a vector that:

  • Points in the direction of the maximum rate of increase of φ.
  • Has a magnitude equal to that maximum rate of increase.

This is why conservative forces in physics, like gravity and electrostatic forces, can be expressed as the negative gradient of a scalar potential energy U: F = -∇U. The force vector points in the direction of the steepest decrease in potential energy.

Test your understanding!

The altitude of a mountain is described by the scalar field h(x, y) = 1000 - 0.01x^2 - 0.02y^2, where x, y, and h are in meters. You are standing at the point (50, 100).

  1. Calculate the gradient of the altitude, ∇h, at your location.
  2. In which direction (as a vector) should you walk to ascend the mountain most steeply?
  3. What is the slope of the ground in that direction?
Show answer
  1. First, we compute the gradient vector field: Now, evaluate it at the point (50, 100):
  2. The gradient points in the direction of steepest ascent. So, you should walk in the direction of the vector (-1, -4).
  3. The slope in the steepest direction is the magnitude of the gradient at that point: This means for every meter you travel horizontally in the direction (-1, -4), you will ascend approximately 4.12 meters vertically.

3. The Divergence: A Measure of Source or Sink

The next operator, the divergence, acts on a vector field and produces a scalar field. It measures the extent to which the vector field "flows" out of (diverges from) an infinitesimal volume around a point.

The divergence of a vector field **F** = F_x \mathbf{\hat{i}} + F_y \mathbf{\hat{j}} + F_z \mathbf{\hat{k}} is defined as the dot product of ∇ and **F**:

Notice the result is a scalar.

  • ∇ ⋅ **F** > 0: The point is a source of the field (more flows out than in).
  • ∇ ⋅ **F** < 0: The point is a sink of the field (more flows in than out).
  • ∇ ⋅ **F** = 0: The field is solenoidal or divergence-free. There are no sources or sinks.
Vector Review: Divergence & Curl of a Vector Field
This image visually contrasts the concepts of divergence (left), representing outflow from a source, and curl (right), representing rotation or circulation.

For a deeper dive, let's turn to a more rigorous text.

3 Grad, Div and Curl

The following text from David Tong's lecture notes on Vector Calculus formally defines the divergence and provides important physical examples. Pay attention to the example of the radial vector field, as it is central to electrostatics.

Read the first half of Section 3.2, 'Div and Curl,' starting from 'At this stage we take an interesting and bold mathematical step...' down to the end of the 'Simple Examples' part. Focus on the definition of divergence and the examples provided.

The example **F** = **r̂** / r^2 from the notes is profound. It describes the electric field of a point charge or the gravitational field of a point mass. As the notes mention and the HKUST text (LINK, section 1) calculates explicitly, ∇ ⋅ **F** = 0 everywhere except at the origin r=0, where the point charge (the source) is located. This is the essence of Gauss's Law in differential form, which we will study in depth later: ∇ ⋅ **E** = ρ/ε₀.


4. The Curl: A Measure of Rotation

The final operator, the curl, acts on a vector field in 3D and produces another vector field. It measures the microscopic circulation or rotation of the field at a point.

The curl of a vector field **F** is defined as the cross product of ∇ and **F**. It's most easily remembered using a determinant form:

Expanding this gives:

The resulting vector ∇ × **F** indicates:

  • Direction: The axis about which the field circulates, according to the right-hand rule.
  • Magnitude: The "strength" of the circulation.
  • ∇ × **F** = 0: The field is irrotational.

To see how this is calculated, let's watch another short clip.

Vector Fields, Divergence, and Curl

This clip, also from 'Professor Dave Explains,' demonstrates the calculation of the curl using the determinant method.

Watch from 7:43 to 10:37. Focus on setting up the determinant and carrying out the partial derivatives to find the resulting curl vector.

The curl is central to Faraday's Law of Induction (∇ × **E** = -∂**B**/∂t) and Ampere's Law (∇ × **B** = μ₀**J** + ...), which describe how changing magnetic fields create rotational electric fields, and how electric currents create circulating magnetic fields.

Test your understanding!

Consider the vector field **F**(x, y, z) = -y \mathbf{\hat{i}} + x \mathbf{\hat{j}} + 0 \mathbf{\hat{k}}. This field describes a fluid rotating counter-clockwise around the z-axis.

  1. Calculate the divergence ∇ ⋅ **F**. What does the result tell you about this fluid flow?
  2. Calculate the curl ∇ × **F**. What do the direction and magnitude of the result tell you?
Show answer
  1. Divergence:

    A divergence of zero means the fluid is incompressible; there are no sources or sinks. The amount of fluid flowing into any region is equal to the amount flowing out.

  2. Curl:

    The curl is 2**k̂**. This is a constant vector pointing in the positive z-direction. It tells us that the fluid is rotating around the z-axis (by the right-hand rule) and that the "amount" of rotation is uniform everywhere in the fluid, with a magnitude of 2.


5. Two Fundamental Identities

There are two critically important identities that connect these operators. Their proofs are a direct consequence of the equality of mixed partial derivatives (e.g., ∂²φ/∂x∂y = ∂²φ/∂y∂x), assuming the fields are sufficiently smooth.

  1. The curl of a gradient is always zero: ∇ × (∇φ) = 0
  2. The divergence of a curl is always zero: ∇ ⋅ (∇ × F) = 0

For a rigorous perspective on these identities and their importance, please refer to the following resources.

Vector Calculus for Engineers

This document from HKUST's 'Vector Calculus for Engineers' provides straightforward proofs for both identities.

Read the two examples in 'Lecture 19 | Curl' that show ∇×(∇f) = 0 and ∇⋅(∇×u) = 0. Follow the cancellation of terms based on the equality of mixed partials.

These identities are not just mathematical curiosities; they have profound physical meaning:

  • ∇ × (∇φ) = 0: This proves that any conservative field (one that can be written as the gradient of a scalar potential, **F** = ∇φ) must be irrotational (∇ × **F** = 0). This is why the static electric field, being conservative (**E** = -∇V), has zero curl.
  • ∇ ⋅ (∇ × F) = 0: This proves that any field that can be written as the curl of another field (a vector potential, **B** = ∇ × **A**) must be solenoidal (divergence-free, ∇ ⋅ **B** = 0). This is the mathematical foundation for the law ∇ ⋅ **B** = 0 in electromagnetism, which states that there are no magnetic monopoles.

Conclusion

In this lesson, we have defined the three fundamental operators of vector calculus and explored their physical significance. These are the alphabet of field theory.

Key Takeaways:

  • Gradient (∇φ): Acts on a scalar field, produces a vector field that points in the direction of the steepest ascent. Conservative forces are derived from the gradient of a potential (**F** = -∇U).
  • Divergence (∇ ⋅ F): Acts on a vector field, produces a scalar field that measures the "source" or "sink" strength at a point.
  • Curl (∇ × F): Acts on a vector field, produces a vector field that measures the microscopic rotation or circulation at a point.
  • Key Identities:
    • ∇ × (∇φ) = 0: A conservative field is always irrotational.
    • ∇ ⋅ (∇ × F) = 0: A field derived from a vector potential is always divergence-free.

Preview of the Next Lesson:
We have now learned how to differentiate fields. The natural next step is to learn how to integrate them. In the next lesson, we will begin this journey by defining line integrals. We will see how to integrate a vector field along a path, a procedure that has a direct and crucial physical application: calculating the work done by a force field as a particle moves along a trajectory.