Math graphic
📐 Concept diagram

07-04 — Vector Fields

Phase: 7 — Calculus IV: Vector Calculus Subject: 07-04 Prerequisites: Multivariable functions and partial derivatives (Phase 6), vectors (Phase 3) Next subject: 07-05 — Line Integrals


Learning Objectives

By the end of this subject, you will be able to:

  1. Define a vector field and distinguish between 2D and 3D vector fields with proper notation
  2. Sketch and interpret vector fields, identifying sources, sinks, circulation, and equilibrium points
  3. Compute and interpret the gradient vector field ∇f from a scalar function f, and find potential functions φ for conservative vector fields
  4. Classify vector fields as gradient (conservative) or non-gradient, and understand the physical significance of each
  5. Recognize common physical vector fields: gravitational, electric, fluid velocity, and magnetic fields

Core Content

1. Definition and Notation

⚠️ CRITICAL FOUNDATION: Vector fields F(x,y) = ⟨P,Q⟩ assign a vector to every point. They model gravity, fluid flow, and electromagnetic fields. Understanding conservative fields (F = ∇f) and their properties is the foundation for all fundamental theorems of vector calculus.

A vector field on a domain D in ℝ² or ℝ³ is a function F that assigns a vector to each point in D:

F: D → ℝ²    or    F: D → ℝ³

Notation in 2D:

$F(x, y) = P(x, y) i + Q(x, y) j = ⟨P(x, y), Q(x, y)⟩
$

Where P and Q are the scalar component functions.

Notation in 3D:

$F(x, y, z) = P(x, y, z) i + Q(x, y, z) j + R(x, y, z) k
$

Interpretation: At each point (x, y, z), you place a vector with tail at that point, pointing in the direction of F(x, y, z) with magnitude |F|.

Examples: - Velocity field of a fluid: F(x, y) = ⟨−y, x⟩ (rotation about origin) - Gravitational field: F(x, y, z) = −(GM/r³)⟨x, y, z⟩ (points toward origin) - Wind velocity on a weather map - Electric field around a charge

2. Sketching Vector Fields

To sketch a vector field, evaluate F at a grid of sample points and draw arrows.

Example 1: F(x, y) = ⟨x, y⟩ (a "radial" or "source" field)

At (1,0): F = ⟨1,0⟩  — points right
At (0,1): F = ⟨0,1⟩  — points up
At (1,1): F = ⟨1,1⟩  — points to upper right
At (2,0): F = ⟨2,0⟩  — longer arrow, still right
At (0,0): F = ⟨0,0⟩  — zero vector (a "source" or equilibrium point)

Interpretation: This field points radially outward from the origin,
with magnitude = distance from origin. If this were a velocity field,
it would represent expansion away from the origin.

Example 2: F(x, y) = ⟨−y, x⟩ (a "rotational" field)

At (1,0): F = ⟨0,1⟩   — points up
At (0,1): F = ⟨−1,0⟩  — points left
At (−1,0): F = ⟨0,−1⟩ — points down
At (0,−1): F = ⟨1,0⟩  — points right

Interpretation: The field circulates counterclockwise about the origin.
At any point, F is perpendicular to the position vector ⟨x,y⟩, since
⟨−y,x⟩ · ⟨x,y⟩ = −yx + xy = 0. Magnitude = √(x²+y²) = distance from origin.

Example 3: F(x, y) = ⟨x, −y⟩ (a "saddle" field)

At (1,0): F = ⟨1,0⟩   — right
At (−1,0): F = ⟨−1,0⟩ — left
At (0,1): F = ⟨0,−1⟩  — down
At (0,−1): F = ⟨0,1⟩  — up

Interpretation: Flow toward the x-axis, away from the y-axis.

3. Gradient Vector Fields

Given a scalar function f(x, y) (or f(x, y, z)), the gradient is a vector field:

$∇f(x, y) = ⟨∂f/∂x, ∂f/∂y⟩   (2D)
∇f(x, y, z) = ⟨∂f/∂x, ∂f/∂y, ∂f/∂z⟩   (3D)
$

Key properties of gradient fields: - The gradient points in the direction of steepest increase of f - The magnitude |∇f| gives the rate of increase in that direction - ∇f is perpendicular to the level curves/surfaces of f

Example: f(x, y) = x² + y² (paraboloid bowl).

∇f = ⟨2x, 2y⟩ — same as F in Example 1!
So F(x,y) = ⟨x,y⟩ is a gradient field with potential f(x,y) = (1/2)(x²+y²).

Definition — Conservative Vector Field: A vector field F is conservative (or a gradient field) if there exists a scalar function φ (called the potential function) such that:

$F = ∇φ
$

In physics, conservative forces (gravity, electrostatic) have the property that work done is path-independent.

4. Finding Potential Functions

Given F = ⟨P, Q⟩, to check if F is conservative and find φ:

Necessary condition (2D): If F = ⟨P, Q⟩ is conservative on a simply-connected domain, then:

$∂P/∂y = ∂Q/∂x
$

This is the cross-partial test or Clairaut's theorem condition. If it fails, F is NOT conservative.

Sufficient: If ∂P/∂y = ∂Q/∂x on a simply-connected domain, then F IS conservative (and a potential exists).

Finding φ: 1. Integrate P w.r.t x: φ(x, y) = ∫ P(x, y) dx + g(y) 2. Differentiate this φ w.r.t. y and set equal to Q to solve for g'(y) 3. Integrate g'(y) to find g(y) 4. Write φ(x, y)

Example: F(x, y) = ⟨2xy + 1, x² + 3y²⟩.

$Check: ∂P/∂y = 2x, ∂Q/∂x = 2x. ✓ Conservative.

Find φ:
Step 1: φ = ∫ (2xy + 1) dx = x²y + x + g(y)
Step 2: ∂φ/∂y = x² + g'(y) = Q = x² + 3y²
       → g'(y) = 3y²
Step 3: g(y) = y³ + C
Step 4: φ(x, y) = x²y + x + y³ + C
$

3D condition: F = ⟨P, Q, R⟩ is conservative on a simply-connected domain if and only if:

curl F = 0

Which means:

$∂R/∂y = ∂Q/∂z,   ∂P/∂z = ∂R/∂x,   ∂Q/∂x = ∂P/∂y
$

We'll explore curl in depth in 07-07.

5. Examples of Important Vector Fields

Gravitational field (inverse square law):

$F(r) = −(GMm/|r|³) r = −(GMm/r²) r̂
$

Where r = ⟨x, y, z⟩, r = |r|, and r̂ = r/r.

In component form:

$F(x, y, z) = ⟨−GMmx/(x²+y²+z²)^{3/2}, −GMmy/(x²+y²+z²)^{3/2}, −GMmz/(x²+y²+z²)^{3/2}⟩
$

This is conservative with potential φ(x, y, z) = GMm/r (gravitational potential energy).

Velocity field of a fluid rotating as a rigid body:

$F(x, y) = ⟨−ωy, ωx⟩   (2D, ω = angular velocity)
F(x, y, z) = ⟨−ωy, ωx, 0⟩   (3D, rotation about z-axis)
$

Magnetic field around a wire:

$B(x, y) = ⟨−y/(x²+y²), x/(x²+y²)⟩   (2D cross-section)
$

This is NOT conservative (it circulates; we'll see in 07-07 that its curl is nonzero... actually, at points away from the origin its curl is zero, but the domain is not simply connected!).

6. Non-Conservative Vector Fields

A field is non-conservative if: - The cross-partial test fails in 2D (∂P/∂y ≠ ∂Q/∂x) - curl F ≠ 0 in 3D - Even if curl = 0, the domain is not simply connected (e.g., the field circulates around a "hole")

Example (2D non-conservative): F(x, y) = ⟨−y, x⟩.

∂P/∂y = −1, ∂Q/∂x = 1. They differ, so NOT conservative.
Intuitively: if you go around a closed loop, the field keeps pushing you along —
you'd accumulate work (nonzero circulation).

Finding potential when cross-partial fails: If ∂P/∂y ≠ ∂Q/∂x, the field is provably NOT the gradient of any scalar function. The integration method will fail (you'll get contradictory requirements for g(y)).

Common Misconceptions

  1. "All vector fields are gradient fields." No — only conservative fields are gradients. Most vector fields are not conservative.

  2. "∂P/∂y = ∂Q/∂x guarantees a global potential." It guarantees a local potential, but on non-simply-connected domains, the potential may be multi-valued (like the angle function arctan(y/x) for the field ⟨−y/(x²+y²), x/(x²+y²)⟩).

  3. "The gradient is a scalar." No — the gradient of a scalar function is a vector. The Laplacian (divergence of gradient) is a scalar.

  4. "Vector fields are just arrow diagrams." They represent physical quantities: velocity, force, electric field, heat flow. The arrows are just a visualization.



Key Terms

Worked Examples

Example 1: Sketching and Interpreting

Problem: Sketch and interpret the vector field F(x, y) = ⟨y, −x⟩.

Solution:

Evaluate at key points:
(1,0): ⟨0,−1⟩ — points down
(1,1): ⟨1,−1⟩ — down-right
(0,1): ⟨1,0⟩  — right
(−1,1): ⟨1,1⟩ — up-right
(−1,0): ⟨0,1⟩ — up
(−1,−1): ⟨−1,1⟩ — up-left
(0,−1): ⟨−1,0⟩ — left

This field points clockwise — opposite of ⟨−y,x⟩ which rotates counterclockwise.
F · ⟨x,y⟩ = yx − xy = 0, so F is perpendicular to position vectors.
Magnitude |F| = √(y²+x²) = distance from origin.

Example 2: Testing for Conservatives and Finding Potential

Problem: Is F(x, y) = ⟨e^x sin y, e^x cos y⟩ conservative? If so, find φ.

Solution:

$P = e^x sin y, Q = e^x cos y.

∂P/∂y = e^x cos y
∂Q/∂x = e^x cos y

They match! So F is conservative (on all ℝ², which is simply connected).

Find φ:
φ = ∫ P dx = ∫ e^x sin y dx = e^x sin y + g(y)
∂φ/∂y = e^x cos y + g'(y) = Q = e^x cos y
→ g'(y) = 0 → g(y) = C

φ(x, y) = e^x sin y + C.
$

Example 3: Grand Unified Example

Problem: Show that the three vector fields: F₁ = ⟨x, y⟩, F₂ = ⟨−y, x⟩, F₃ = ⟨y, x⟩ have qualitatively different behavior by analyzing their divergence and cross-partials.

Solution:

F₁ = ⟨x, y⟩  — radial outward:
∂P/∂x + ∂Q/∂y = 1 + 1 = 2 (positive divergence — source)
∂P/∂y = 0, ∂Q/∂x = 0 → conservative (potential: φ₁ = (x²+y²)/2)

F₂ = ⟨−y, x⟩ — rotational (counterclockwise):
∂P/∂x + ∂Q/∂y = 0 + 0 = 0 (zero divergence)
∂P/∂y = −1, ∂Q/∂x = 1 → NOT conservative (nonzero circulation)

F₃ = ⟨y, x⟩ — saddle:
∂P/∂x + ∂Q/∂y = 0 + 0 = 0 (zero divergence)
∂P/∂y = 1, ∂Q/∂x = 1 → ∂P/∂y = ∂Q/∂x → conservative (potential: φ₃ = xy)
Wait — that can't be right. Let me recompute.
F₃ = ⟨y, x⟩. P = y, Q = x.
∂P/∂y = 1, ∂Q/∂x = 1. They ARE equal. So F₃ IS conservative. ✓
Potential: φ₃ = ∫ y dx = xy + g(y), ∂φ₃/∂y = x + g'(y) = x → g'(y) = 0.
φ₃ = xy + C.

Quiz

Q1: A vector field F(x, y) = ⟨P(x, y), Q(x, y)⟩ assigns:

A) A scalar to each point in the plane B) A vector to each point in the plane C) A matrix to each point in the plane D) A curve to each point in the plane

Correct: B)


Q2: A vector field F is conservative if:

A) F = ⟨0, 0⟩ everywhere B) F = ∇f for some scalar function f (F is a gradient field) C) ‖F‖ is constant D) F points in the same direction everywhere

Correct: B)


Q3: In 2D, if F = ⟨P, Q⟩ is conservative and has continuous partial derivatives, then:

A) ∂P/∂x = ∂Q/∂y B) ∂P/∂y = ∂Q/∂x C) P = Q D) P·Q = 0

Correct: B)


Q4: The gradient field of f(x, y) = x² + y² is:

A) ⟨x, y⟩ B) ⟨2x, 2y⟩ C) ⟨2x, 0⟩ D) ⟨x², y²⟩

Correct: B)


Q5: The vector field F = ⟨−y, x⟩ (a rotational field) is:

A) Conservative B) Not conservative (nonzero curl) C) Always zero D) A gradient field

Correct: B)


Q6: A physical example of a conservative vector field is:

A) The magnetic field around a current-carrying wire B) The gravitational field of a point mass C) The velocity field of a swirling fluid D) The electric field around a changing magnetic field

Correct: B)


Practice Problems

(Answers are below. Try each problem before checking.)

Problem 1: Compute the gradient vector field of f(x, y) = x³ − 3xy².

Problem 2: Determine whether F(x, y) = ⟨2x + y, x − 4y⟩ is conservative. If so, find its potential.

Problem 3: Show that F(x, y) = ⟨y cos(xy), x cos(xy)⟩ is conservative and find its potential.

Problem 4: Sketch the vector field F(x, y) = ⟨1, 0⟩ (constant field). Is it conservative?

Problem 5: For the gravitational field F(x, y, z) = −⟨x, y, z⟩/(x² + y² + z²)^{3/2}, verify it is conservative and find its potential.

Problem 6: Determine if F(x, y) = ⟨x² + y, x − y²⟩ is conservative.

Problem 7: For F(x, y, z) = ⟨yz, xz, xy⟩, verify curl F = 0 and find the potential φ.

Answers (click to expand) **Problem 1:** ∇f = ⟨∂f/∂x, ∂f/∂y⟩ = ⟨3x² − 3y², −6xy⟩. This is F(x,y) = ⟨3(x²−y²), −6xy⟩. **Problem 2:** P = 2x+y, Q = x−4y. ∂P/∂y = 1, ∂Q/∂x = 1. Equal → conservative. φ = ∫ (2x+y) dx = x² + xy + g(y). ∂φ/∂y = x + g'(y) = x − 4y → g'(y) = −4y → g(y) = −2y² + C. φ = x² + xy − 2y² + C. **Problem 3:** P = y cos(xy), Q = x cos(xy). ∂P/∂y = cos(xy) − xy sin(xy). ∂Q/∂x = cos(xy) − xy sin(xy). Equal → conservative. φ = ∫ y cos(xy) dx. Let u = xy, du = y dx. φ = ∫ cos u du = sin u + g(y) = sin(xy) + g(y). ∂φ/∂y = x cos(xy) + g'(y) = x cos(xy) → g'(y) = 0 → g(y) = C. φ = sin(xy) + C. **Problem 4:** F(x,y) = ⟨1,0⟩: at every point, a unit vector pointing right. This is "uniform flow." Is it conservative? P=1, Q=0. ∂P/∂y=0, ∂Q/∂x=0. Equal → conservative. Potential: φ = ∫ 1 dx = x + g(y). ∂φ/∂y = g'(y) = 0. φ = x + C. (Intuition: uniform flow is conservative — work depends only on x-displacement.) **Problem 5:** Let r = √(x²+y²+z²). F = −⟨x,y,z⟩/r³. Component P = −x/r³, Q = −y/r³, R = −z/r³. ∂P/∂y = (−r³ + x·3r²·(y/r)) / r⁶ ... = 3xy/r⁵. Actually, easier: note that ∇(1/r) = −⟨x,y,z⟩/r³. So F = ∇(1/r)! Potential: φ = 1/r = 1/√(x²+y²+z²). (Plus constant.) Verification: ∂/∂x (1/r) = −(1/r²)(∂r/∂x) = −(1/r²)(x/r) = −x/r³. ✓ **Problem 6:** P = x²+y, Q = x−y². ∂P/∂y = 1, ∂Q/∂x = 1. Equal → F IS conservative on ℝ². φ = ∫ (x²+y) dx = x³/3 + xy + g(y). ∂φ/∂y = x + g'(y) = x − y² → g'(y) = −y² → g(y) = −y³/3 + C. φ = x³/3 + xy − y³/3 + C. **Problem 7:** F = ⟨yz, xz, xy⟩. curl F = ⟨∂R/∂y − ∂Q/∂z, ∂P/∂z − ∂R/∂x, ∂Q/∂x − ∂P/∂y⟩ = ⟨x − x, y − y, z − z⟩ = ⟨0,0,0⟩. ✓ Conservative. Find φ: φ = ∫ yz dx = xyz + g(y,z). ∂φ/∂y = xz + ∂g/∂y = xz → ∂g/∂y = 0 → g is a function of z only: g(z). ∂φ/∂z = xy + g'(z) = xy → g'(z) = 0 → g(z) = C. φ = xyz + C.

Summary

  1. A vector field assigns a vector to each point in a region of 2D or 3D space; it can represent fluid velocity, force, electric/magnetic fields, or gradient of a scalar function
  2. The gradient vector field ∇f points in the direction of steepest increase of f and is everywhere perpendicular to level sets of f
  3. A conservative (gradient) vector field F = ∇φ has the property that work is path-independent; in 2D, the test ∂P/∂y = ∂Q/∂x is necessary and (on simply-connected domains) sufficient
  4. Potential functions φ are found by integrating component functions; non-conservative fields (where cross-partials differ) cannot be expressed as gradients of scalar functions
  5. The broad classification of vector fields — radial (sources/sinks), rotational (circulation), and saddle types — gives qualitative insight into field behavior

Pitfalls



Next Steps

Move on to 07-05 — Line Integrals to learn how to integrate scalar functions and vector fields along curves, compute work done by force fields, and understand the Fundamental Theorem of Line Integrals.