# 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.

## Background

- Fundamental theorem of line integrals, also known as the gradient theorem.

## What we're building to

- A vector field 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 are
**path independent**.

- Line integrals of over
**closed loops**are always . - is the gradient of some scalar-valued function, i.e. for some function .

- Line integrals of are
- There is also another property equivalent to all these: 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 , and you consider the line integrals of of two separate paths, and , each starting at a point and ending at a point

For almost all vector fields , and almost all choices for the two paths and , these integrals will be different.

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, , this magical property is true. The line integrals along distinct paths connecting the same two points and will always evaluate to the same thing:

Definition: This property is calledpath independence. Specifically, a line integral through a vector field 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 measure the change in the value of . Visualizing this with the graph of , this says that any two paths bringing you from one point to another change your altitude by the same amount.

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 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 in which line integrals are path independent, meaning

for all paths and which connect the same two points and . What is it about this property that ensures the existence of some function such that ?

**Challenge question**: Can you think of a way to construct such a function in terms of using the fact that 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 calledclosedif it starts and ends at the same point. Such paths are also commonly called closed loops.

For example, the path pictured below starts and ends at .

If we take a vector field where all line integrals are path independent, the line integral of on any closed loop will be . Why?

The converse of this fact is also true: If the line integrals of on all closed loops evaluate to , 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 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 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 to another point 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 to point can be computed just by evaluating this function at each point:

As the physics students among you have likely guessed, this function 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.

## Escher

Moving from physics to art, this classic drawing "Ascending and Descending" by M.S. 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 such that give the gravity field.