A gradient field is a vector field that arises as the gradient of some scalar function :

The function is called a potential function for . A gradient field is also called a conservative field.

This is one of the most important classes of vector fields in physics and engineering. Gravitational fields, electrostatic fields in regions without time-varying magnetic flux, and many others are gradient fields — and the existence of a potential is what makes them tractable.

Why gradient fields are special

Three equivalent characterizations on a connected open region :

  1. for some scalar .
  2. Line integrals are path-independent — depend only on endpoints.
  3. Every closed-loop circulation is zero.

These are equivalent (see Conservative vector field for the full chain of implications). The point is that one geometric property (closed-loop circulation = 0) is equivalent to one algebraic property (a scalar potential exists).

The Fundamental Theorem of Line Integrals

If and goes from point to point , then

Just evaluate the potential at endpoints and subtract. No parameterization needed. See Fundamental theorem of line integrals.

The cross-partial test

A necessary condition for to be a gradient field: the mixed partials of must agree (by Clairaut’s theorem), which translates into

In 2D only the first condition: .

Compactly: . The curl of a gradient is zero.

On simply connected domains, the converse holds too: curl-free implies gradient. On non-simply-connected domains, curl-free doesn’t suffice — the 2D rotational field on is the classical counterexample. See Conservative vector field.

Not every vector field is a gradient

(the 2D rotational field, defined globally) has , so it’s not a gradient field on any region containing the origin or its neighborhood. The circulation around the unit circle is , not zero — non-conservative.

More dramatically, satisfies everywhere on its domain , but is still not a gradient field on that domain, because the domain is not simply connected. This is the canonical “topological obstruction” example, and is the 2D vector-calculus prototype of what becomes the Residue theorem in complex analysis.

Finding a potential

Algorithm in 2D, given with :

  1. Integrate with respect to , holding constant: .
  2. Differentiate this with respect to and set equal to . This gives an ODE for .
  3. Integrate to find , with an arbitrary constant we can take to be .

In 3D, three steps instead of two — same idea with one more integration. See Conservative vector field for worked examples.