Vector Fields
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn what a vector field is, how to visualize one, and how to tell different types apart. Vector fields are the language that the rest of vector calculus speaks, so getting comfortable with them now pays off for everything that follows.
The Concept
Section titled “The Concept”What Is a Vector Field?
Section titled “What Is a Vector Field?”A scalar function like assigns a number to every point. A vector field assigns a vector to every point instead. At each location in space, the field tells you a direction and a magnitude.
In 2D, a vector field looks like
where P and Q are scalar functions that give the x-component and y-component of the vector at each point.
In 3D, it extends to
The angle brackets denote a vector. Each component is a function of position, so the vector can change from point to point.
How to Visualize a Vector Field
Section titled “How to Visualize a Vector Field”Pick a bunch of sample points. At each one, draw an arrow whose direction matches the vector and whose length matches the magnitude. The result is a picture full of arrows that shows the “flow” of the field.
A few things to watch for:
- Where arrows are long, the field is strong
- Where arrows are short, the field is weak
- Where arrows all point the same way, the field is uniform
- Where arrows swirl, the field has rotation
- Where arrows spread outward, the field has divergence
Common Types
Section titled “Common Types”There are three patterns you’ll see over and over:
- A radial field points outward from (or inward toward) a central point. Gravity and electric fields are radial.
- A rotational field swirls around an axis. Think of water circling a drain.
- A constant field has the same vector everywhere. Uniform gravity near Earth’s surface is approximately constant.
Gradient Fields
Section titled “Gradient Fields”If you have a scalar function f and take its gradient, you get a vector field:
This is called a gradient field (or conservative field). The vectors always point in the direction of steepest increase of f, and their magnitude equals the rate of that increase. Gradient fields have a special property: line integrals through them depend only on the endpoints, not the path. More on that in later lessons.
Worked Examples
Section titled “Worked Examples”Example 1: A rotational vector field
Consider the 2D field
The blue arrows show the field at sample points. The orange arrow highlights the vector at the point (1, 0).
Let’s evaluate F at a few points to see the pattern:
- At (1, 0): which points straight up
- At (0, 1): which points left
- At (-1, 0): which points down
- At (0, -1): which points right
The vectors trace out counterclockwise circles. At every point, the vector is perpendicular to the position vector and has the same magnitude as the distance from the origin. Points farther from the origin get longer arrows.
The magnitude at any point is which is just the distance from the origin.
Example 2: A gradient (radial) vector field
Let and compute its gradient:
Every arrow points directly away from the origin. The arrows get longer as you move outward because the gradient magnitude grows with distance. At the origin itself, the gradient is the zero vector (the function has a minimum there).
Let’s check a few values:
- At (1, 0): with magnitude 2
- At (2, 0): with magnitude 4
- At (1, 1): with magnitude
The magnitude at any point is which is twice the distance from the origin. Farther out means steeper ascent on the paraboloid
Example 3: A constant 3D vector field
The field represents uniform gravitational acceleration near Earth’s surface. Every point in space gets the exact same vector: 9.8 m/s squared, pointing straight down.
This is the simplest possible vector field. It doesn’t depend on position at all. No matter where you are, the arrow is the same length and points the same direction.
Is this a gradient field? Yes. It’s the gradient of since
Real-World Application
Section titled “Real-World Application”Vector fields are everywhere once you start looking:
- Physics models velocity fields in fluids (each point in the water has a flow direction and speed), electric fields around charges, and magnetic fields around currents
- Game engines use vector fields for wind that affects particles, cloth, and grass. A wind field assigns a force vector to each point in the game world, and objects sample it to figure out how to move
- Weather models represent wind as a vector field over the surface of the Earth. The arrows on a weather map are literally a vector field visualization
- Computer graphics uses flow fields for procedural animation, hair simulation, and stylized rendering effects
Retrying will remove your ✅ checkmark until you pass again.