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:
- Define a vector field and distinguish between 2D and 3D vector fields with proper notation
- Sketch and interpret vector fields, identifying sources, sinks, circulation, and equilibrium points
- Compute and interpret the gradient vector field ∇f from a scalar function f, and find potential functions φ for conservative vector fields
- Classify vector fields as gradient (conservative) or non-gradient, and understand the physical significance of each
- 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
-
"All vector fields are gradient fields." No — only conservative fields are gradients. Most vector fields are not conservative.
-
"∂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²)⟩).
-
"The gradient is a scalar." No — the gradient of a scalar function is a vector. The Laplacian (divergence of gradient) is a scalar.
-
"Vector fields are just arrow diagrams." They represent physical quantities: velocity, force, electric field, heat flow. The arrows are just a visualization.
Key Terms
- Gravitational field
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)
- If you chose B: A vector field outputs a vector at every point — it's a vector-valued function of position. Correct!
- If you chose A: That's a scalar field (like temperature T(x, y)).
- If you chose C: That would be a matrix field (tensor field).
- If you chose D: That describes a parametrized family of curves, not a vector field.
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)
- If you chose B: A conservative field is the gradient of a scalar potential function. The function f is called a potential for F. Correct!
- If you chose A: The zero field IS conservative (f = constant), but that's not the definition.
- If you chose C: Constant magnitude doesn't imply conservativity.
- If you chose D: Uniform direction doesn't guarantee F = ∇f.
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)
- If you chose B: Clairaut's theorem: ∂²f/∂y∂x = ∂²f/∂x∂y → ∂P/∂y = ∂Q/∂x. This is the curl test in 2D. Correct!
- If you chose A: This is not the curl condition; it relates to divergence.
- If you chose C: The components are generally different.
- If you chose D: Orthogonality of components is not related to conservativity.
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)
- If you chose B: ∇f = ⟨∂f/∂x, ∂f/∂y⟩ = ⟨2x, 2y⟩. This points radially outward from the origin. Correct!
- If you chose A: Forgot the factor of 2 in the derivatives.
- If you chose C: Forgot to differentiate the y² term.
- If you chose D: Didn't differentiate at all.
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)
- If you chose B: ∂P/∂y = −1, ∂Q/∂x = 1. Since ∂P/∂y ≠ ∂Q/∂x, the field is not conservative. It has circulation. Correct!
- If you chose A: A nonzero curl means F cannot be expressed as ∇f.
- If you chose C: F = ⟨−y, x⟩ is clearly nonzero away from the origin.
- If you chose D: It fails the curl test, so it's not a gradient field.
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)
- If you chose B: The gravitational field F = −(GMm/r²) r̂ is conservative — it's the gradient of the gravitational potential. Work done is path-independent. Correct!
- If you chose A: Static magnetic fields have nonzero curl and are not conservative.
- If you chose C: Swirling fluids typically have vorticity (curl ≠ 0).
- If you chose D: Induced electric fields from changing magnetic flux are non-conservative (Faraday's law).
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
- 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
- The gradient vector field ∇f points in the direction of steepest increase of f and is everywhere perpendicular to level sets of f
- 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
- Potential functions φ are found by integrating component functions; non-conservative fields (where cross-partials differ) cannot be expressed as gradients of scalar functions
- The broad classification of vector fields — radial (sources/sinks), rotational (circulation), and saddle types — gives qualitative insight into field behavior
Pitfalls
- Assuming all vector fields are conservative. Most vector fields are NOT gradients of scalar functions. The cross-partial test (∂P/∂y = ∂Q/∂x in 2D, curl F = 0 in 3D) is the first check. If it fails, the field is provably non-conservative and no potential function exists. Don't waste time trying to find one.
- Thinking ∂P/∂y = ∂Q/∂x is sufficient on any domain. This condition guarantees a local potential, but on non-simply-connected domains (e.g., the punctured plane ℝ² \ {(0,0)}), a field can pass the cross-partial test yet still not be globally conservative. The classic example: F = ⟨−y/(x²+y²), x/(x²+y²)⟩ has ∂P/∂y = ∂Q/∂x but line integrals around the origin are nonzero.
- Finding the potential function incorrectly. The standard method is: integrate P with respect to x to get φ = ∫ P dx + g(y), then differentiate with respect to y and set equal to Q to solve for g'(y). A common error is integrating the wrong component or forgetting the "constant of integration" g(y) that depends on the other variable.
- Confusing the gradient with the divergence. The gradient ∇f is a VECTOR field (direction of steepest increase). The divergence ∇·F is a SCALAR (measuring outward flux per unit volume). Saying "the gradient is a scalar" or "take the gradient of a vector field" (without specifying divergence or curl) reflects a fundamental confusion.
- Overlooking the 3D curl test. In 3D, the necessary and sufficient condition for a conservative field on a simply-connected domain is curl F = 0 (all three components zero). Checking only one or two of the curl components can miss non-conservative fields. For F = ⟨y, z, x⟩, curl F = ⟨−1, −1, −1⟩ — all three components are nonzero, confirming it's not conservative.
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.