If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Conservative vector fields

Especially important for physics, conservative vector fields are ones in which integrating along two paths connecting the same two points are equal.


What we're building to

At the end of this article, you will see how this paradoxical Escher drawing cuts to the heart of conservative vector fields.
A vector field F(x,y) is called a conservative vector field if it satisfies any one of the following three properties (all of which are defined within the article):
  • Line integrals of F are path independent.
  • Line integrals of F over closed loops are always 0.
  • F is the gradient of some scalar-valued function, i.e. F=g for some function g.
There is also another property equivalent to all these: F is irrotational, meaning its curl is zero everywhere (with a slight caveat). However, I'll discuss that in a separate article which defines curl in terms of line integrals.
The key takeaway here is not just the definition of a conservative vector field, but the surprising fact that the seemingly different conditions listed above are equivalent to each other. Madness!

Path independence

Imagine you have any ol' off-the-shelf vector field F(x,y), and you consider the line integrals of F of two separate paths, C1 and C2, each starting at a point A and ending at a point B
For almost all vector fields F, and almost all choices for the two paths C1 and C2, these integrals will be different.
C1FdsC2FdsAlmost always true
And this makes sense! Each integral is adding up completely different values at completely different points in space. What's surprising is that there exist some vector fields where distinct paths connecting the same two points will always be equal, no matter the choice of paths (of which there are super-infinitely many).
In the last article, covering the gradient theorem we saw that in the special case of vector fields which are the gradient of some scalar-valued function, f, this magical property is true. The line integrals along distinct paths connecting the same two points A and B will always evaluate to the same thing:
C1fds=f(B)f(A)Result of thegradient theorem=C2fds
Definition: This property is called path independence. Specifically, a line integral through a vector field F(x,y) is said to be path independent if the value of the integral only depends on the point where the path starts and the point where it ends, not the specific choice of path in between.
Actually, when you properly understand the gradient theorem, this statement isn't totally magical. This is because line integrals against the gradient of f measure the change in the value of f. Visualizing this with the graph of f, this says that any two paths bringing you from one point to another change your altitude by the same amount.
Khan Academy video wrapper
The takeaway from this result is that gradient fields are very special vector fields. Because this property of path independence is so rare, in a sense, "most" vector fields cannot be gradient fields.

Path independence implies gradient field

Okay, so gradient fields are special due to this path independence property. But can you come up with a vector field F(x,y) in which all line integrals are path independent, but which is not the gradient of some scalar-valued function?
I guess I've spoiled the answer with the section title and the introduction: All vector fields in which line integrals are path independent must be the gradient of some function. By why?
Really, why would this be true? Consider an arbitrary vector field F(x,y) in which line integrals are path independent, meaning
for all paths C1 and C2 which connect the same two points A and B. What is it about this property that ensures the existence of some function g such that g=F?
Challenge question: Can you think of a way to construct such a function g in terms of F using the fact that F is path-independent?
This is a tricky question, but it might help to look back at the gradient theorem for inspiration.

Closed loops

Definition: A path is called closed if it starts and ends at the same point. Such paths are also commonly called closed loops.
For example, the path C pictured below starts and ends at A.
If we take a vector field F where all line integrals are path independent, the line integral of F on any closed loop will be 0. Why?
The converse of this fact is also true: If the line integrals of F on all closed loops evaluate to 0, then all line integrals must be path independent. Why?

Funky notation for closed-loop integrals.

You will sometimes see a line integral over a closed loop C written as
Don't worry, this is not a new operation that needs to be learned. It is just a line integral, computed in just the same way as we have done before, but it is meant to emphasize to the reader that C is a closed loop.

Potential energy

In the article introducing​ line integrals through a vector field, I mentioned briefly how in physics, the work done by a force on an object in motion is computed by taking a line integral of the force's vector field along the path of motion.
A force is called conservative if the work it does on an object moving from any point A to another point B is always the same, no matter what path is taken. In other words, if this integral is always path-independent. Fundamental forces like gravity and the electric force are conservative, and the quintessential example of a non-conservative force is friction.
This has an interesting consequence based on our discussion above: If a force is conservative, it must be the gradient of some function.
Moreover, according to the gradient theorem, the work done on an object by this force as it moves from point A to point B can be computed just by evaluating this function U at each point:
As the physics students among you have likely guessed, this function U is potential energy. For example, if you take the gradient of gravitational potential or electric potential, you will get the gravitational force or electric force respectively. This is why computing the work done by a conservative force can be simplified to comparing potential energies.
It also means you could never have a "potential friction energy" since friction force is non-conservative.


Moving from physics to art, this classic drawing "Ascending and Descending" by M.C. Escher shows what the world would look like if gravity were a non-conservative force.
Closed loop perspective:
  • Imagine walking clockwise on this staircase. With each step gravity would be doing negative work on you. So integrating the work along your full circular loop, the total work gravity does on you would be quite negative. However, that's an integral in a closed loop, so the fact that it's nonzero must mean the force acting on you cannot be conservative.
Path independence perspective
  • Imagine walking from the tower on the right corner to the left corner. If you get there along the clockwise path, gravity does negative work on you. If you get there along the counterclockwise path, gravity does positive work on you. Since both paths start and end at the same point, path independence fails, so the gravity force field cannot be conservative.
Gradient perspective:
  • In the real world, gravitational potential corresponds with altitude​, because the work done by gravity is proportional to a change in height. What makes the Escher drawing striking is that the idea of altitude doesn't make sense. Many steps "up" with no steps down can lead you back to the same point. This corresponds with the fact that there is no potential function U such that U give the gravity field.

Want to join the conversation?