# Fundamental theorem of line integrals

Also known as the Gradient Theorem, this generalizes the fundamental theorem of calculus to line integrals through a vector field.

## Background

Only needed if you want to understand the proof:

## What we're building to

- The fundamental theorem of line integrals, also called the gradient theorem, states that
- The intuition behind this formula is that each side represents the change in the value of a multivariable function as you walk along a path parameterized by .
- This formula implies that gradient fields are
**path independent**, meaning the line integrals along any two paths connecting the same start and end points will be equal.

## Statement of the theorem

Recall that the fundamental theorem of calculus in the single-variable world states that

In some sense, this says that integration is the opposite of differentiation.

The fundamental theorem of line integrals, also known as the gradient theorem, is one of several ways to extend this theorem into higher dimensions. In a sense, it says that line integration through a vector field is the opposite of the gradient. The statement of the theorem is that

Where

- is some scalar-valued multivariable function.
- is the gradient of .
- is a vector-valued function which parameterizes some path through the input space of .
- and are the end points of the path.

You might also see this theorem written without reference to the parameterization as follows:

Where represents the path through space, with as its starting point and as its ending point, and is thought of as a tiny step along .

In short, the theorem states that the line integral of the gradient of a function gives the total change in the value of from the start of the curve to its end.

## The intuition

The meaning behind this formula is actually fairly straightforward, once we take some time to digest the meaning of each term. There are two main players on the stage right now:

- A path wandering through space (let's say two-dimensional space, for now, to make drawing easier).
- A function which takes in points of that path as its input, and outputs a number.

Think about how the value of the function changes as we walk along the path. The following video shows one way to visualize this, where the graph of some function is shown in blue, a path in the -plane is shown in red, and the projection of that path onto the graph is also shown in red.

Think about the height of this graph above each point on the path. How could you mathematically keep track of the change in this height as we walk along the path.

Instead of projecting the path onto the graph of , we could also overlay it with the gradient field of (the vector field where each vector represents ):

Let's write down the gradient theorem again:

The next few questions will have you reason through the left-hand side of this expression.

**Concept check 1**: If we think of as a very slight change to the parameter , how can you interpret the vector ?

**Concept check 2**: How can you interpret the dot product

where is some point in space and is some vector?

**Concept check 3**: Given these two facts, how can we interpret the dot product ?

**Concept check 4**: Finally, how can you interpret the integral

However, there is a much simpler way to think about the change in the value of from the start of the path to its end: Just evaluate at both ends, and subtract the difference:

In other words, each side of the equation in the gradient theorem computes the change in across the path, but the left side thinks of it step-by-step, while the right side takes a global perspective.

## A quick proof

Using the multivariable chain rule, we have

Plugging this into the statement of the gradient theorem, we see it becomes the same as the fundamental theorem of calculus

Tada!

This proof leverages the powerful fundamental theorem of calculus, along with the multivariable chain rule, and hence looks deceptively simple. A good exercise in understanding this theorem is to think through how exactly this quick and tidy three-line proof encapsulates the intuition for the gradient theorem spelled out in the last section.

There's nothing wrong with using other powerful theorems to help prove new results. In fact, to avoid doing so would be foolish. However, walking through such proofs is often not enough for a deeper understanding, so it's healthy to unravel new results into their full meaning, seeing how they stand up on their own.

## Example: A sinusoidal path

Define as

Let represent the path parameterized by

between the values and .

Compute the integral

### Solution 1: The old fashioned way

We can spell out the full line integral and compute it. In preparation, we will need to evaluate the gradient of .

What is ?

We will also need the derivative of $\vec{\textbf{r}}(t) = \left[\begin{array}{c} t \\ \sin(t) \end{array} \right]$.

What is ?

Finally, what do you get when you plug these in and chug through the line integral?

### Solution 2: Apply the fundamental theorem of line integrals

Applying the fundamental theorem of line integrals, we can skip over many of the steps from the previous solution, including the computation of the gradient of and the derivative of .

Solve the line integral above using the gradient theorem.

If you look back through the full computation of the line integral in solution 1, the computations we performed actually feel pretty silly. We took the derivative of everything, including the partial derivatives of and the ordinary derivatives of and , then later integrated those derivatives back up to where they started.

Working through this should also help build an intuition for how the fundamental theorem of line integrals derives from the fundamental theorem of calculus.

## Path independence

The gradient theorem has a really important consequence regarding gradient fields. Suppose you have two distinct curves and , each connecting the same two points and . Let's say these are wandering through the gradient field of some scalar-valued function :

According to the gradient theorem, the line integral of along each of these curves will be the same, since that integral is completely determined by the value of at and :

We explore this idea further in the next article on conservative vector fields.

## À retenir

- The fundamental theorem of line integrals, also called the gradient theorem, states that
- The intuition behind this formula is that each side represents the change in the value of a multivariable function as you walk along a path parameterized by .
- This formula implies that gradient fields are
**path independent**, meaning the line integrals along any two paths connecting the same start and end points will be equal.