Vector Fields
Vector fields in multiple dimensions
A vector field takes each point in a region of space and assigns it a vector. You can think of it as a rule that says: "at this location, the vector points this direction with this magnitude." Physical examples include wind velocity across a weather map, the gravitational pull around a planet, or the electric field surrounding a charge.
A two-dimensional vector field is written as:
A three-dimensional vector field adds a third component:
Here , , and are ordinary scalar functions that give the vector's component in each coordinate direction. To visualize a vector field, you draw arrows at sample points: each arrow's direction and length represent the vector at that point.
A few things to keep in mind:
- We typically require the component functions to be continuous (and often differentiable) so the field behaves predictably without sudden jumps.
- The arrows in a plot can vary wildly in length. Many plotting tools scale them down so the picture stays readable, so don't assume equal-looking arrows mean equal magnitudes.
- These fields show up constantly in physics and engineering: electromagnetic fields, fluid flow velocity, gravitational fields, and more.

Line Integrals

Line integrals along curves
A line integral measures the accumulated effect of a field along a curve. Instead of integrating over an interval on the number line, you're integrating along a path through space.
There are two flavors to distinguish:
- Scalar line integral: integrates a scalar function with respect to arc length. This gives something like total mass along a wire with varying density.
- Vector line integral: integrates a vector field along a curve. This measures how much the field "pushes along" the path, which is exactly what work is.
To compute either type, follow these steps:
- Parameterize the curve. Write for .
- Compute . This gives the tangent vector to the curve.
- Substitute into the integrand. For a vector line integral, form . For a scalar line integral, form .
- Evaluate the single-variable integral .
Two important properties:
- The value of a line integral doesn't depend on which parameterization you choose for the same oriented curve. You could use or and get the same answer.
- Orientation matters. Reversing the direction of traversal flips the sign of a vector line integral. (Scalar line integrals are unaffected by orientation since is always positive.)
Fundamental theorem of line integrals
This theorem is the line-integral analog of the Fundamental Theorem of Calculus. If for some scalar function (called a potential function), then:
The integral depends only on the values of at the endpoints, not on the path taken between them. This is what path independence means, and it's the defining feature of a conservative vector field.
To find a potential function for a conservative field :
- Integrate with respect to to get , including an unknown function in place of the constant.
- Differentiate your result with respect to and set it equal to . Solve for , which may still contain an unknown function of .
- Differentiate with respect to and set equal to to pin down any remaining unknowns.
How do you know whether a field is conservative in the first place? Use the curl test:
- In 2D: is conservative if on a simply connected domain.
- In 3D: is conservative if on a simply connected domain.
The simply connected condition matters. On a domain with holes, the curl test can pass even for non-conservative fields. The classic example is , which has zero curl but is not conservative on .
Work in force fields
Work is the physical quantity that line integrals were practically made for. When a force acts on an object moving along a curve , the work done is:
This dot product picks out the component of force along the direction of motion at each point, then sums it up over the entire path.
- Positive work means the force generally pushes in the direction of motion (energy is added to the object).
- Negative work means the force generally opposes the motion (energy is removed from the object).
For conservative force fields (like gravity, ignoring air resistance), work depends only on endpoints. This is directly tied to conservation of energy: the work done equals the change in potential energy, regardless of the path.
For non-conservative force fields (like friction or air resistance), the work does depend on the path taken. A longer, more winding path through a friction force will dissipate more energy than a short, direct one. In these cases, you can't use the Fundamental Theorem and must compute the line integral directly via parameterization.