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

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
    abf(r(t))r(t)dt=f(r(b))f(r(a))
  • The intuition behind this formula is that each side represents the change in the value of a multivariable function f as you walk along a path parameterized by r(t).
  • 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
abg(t)dt=g(b)g(a)
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
abf(r(t))r(t)dt=f(r(b))f(r(a))
Where
  • f is some scalar-valued multivariable function.
  • f is the gradient of f.
  • r(t) is a vector-valued function which parameterizes some path through the input space of f.
  • r(a) and r(b) are the end points of the path.
  • r(t) is the derivative of r(t), taken component-wise as usual.
You might also see this theorem written without reference to the parameterization r(t) as follows:
Cfds=f(B)f(A)
Where C represents the path through space, with A as its starting point and B as its ending point, and ds is thought of as a tiny step along C.
In short, the theorem states that the line integral of the gradient of a function f gives the total change in the value of f 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 f which takes in points of that path as its input, and outputs a number.
Think about how the value of the function f changes as we walk along the path. The following video shows one way to visualize this, where the graph of some function f is shown in blue, a path in the xy-plane is shown in red, and the projection of that path onto the graph is also shown in red.
Khan Academy video wrapper
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 f, we could also overlay it with the gradient field of f (the vector field where each vector represents f):
Let's write down the gradient theorem again:
abf(r(t))r(t)dt=f(r(b))f(r(a))
The next few questions will have you reason through the left-hand side of this expression.
Concept check 1: If we think of dt as a very slight change to the parameter t, how can you interpret the vector r(t)dt?
Choose all answers that apply:

Concept check 2: How can you interpret the dot product
f(P)v
where P is some point in space and v is some vector?
Choose all answers that apply:

Concept check 3: Given these two facts, how can we interpret the dot product f(r(t))r(t)?
Choose all answers that apply:

Concept check 4: Finally, how can you interpret​ the integral
abf(r(t))r(t)dt
Choose all answers that apply:

However, there is a much simpler way to think about the change in the value of f from the start of the path to its end: Just evaluate f at both ends, and subtract the difference:
f(r(b))f(r(a))
In other words, each side of the equation in the gradient theorem computes the change in f across the path, but the left side thinks of it step-by-step, while the right side takes a global perspective.
abf(r(t))r(t)dt=f(r(b))f(r(a))

A quick proof

Using the multivariable chain rule, we have
ddtf(r(t))=f(r(t))r(t)
Plugging this into the statement of the gradient theorem, we see it becomes the same as the fundamental theorem of calculus
=abf(r(t))r(t)dt=abddtf(r(t))dt=f(r(b))f(r(a))
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 f as
f(x,y)=x2+y2
Let C represent the path parameterized by
r(t)=[tsin(t)]
between the values t=0 and t=2π.
Compute the integral
Cfds

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 f(x,y)=x2+y2.
What is f?
Choose 1 answer:

We will also need the derivative of r(t)=[tsin(t)].
What is r(t)?
Choose 1 answer:

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

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 f and the derivative of r(t).
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 x2+y2 and the ordinary derivatives of t and sin(t), 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 C1 and C2, each connecting the same two points A and B. Let's say these are wandering through the gradient field of some scalar-valued function f:
According to the gradient theorem, the line integral of f along each of these curves will be the same, since that integral is completely determined by the value of f at A and B:
C1fdr=f(B)f(A)=C2fdr
We explore this idea further in the next article on conservative vector fields.

Summary

  • The fundamental theorem of line integrals, also called the gradient theorem, states that
    abf(r(t))r(t)dt=f(r(b))f(r(a))
  • The intuition behind this formula is that each side represents the change in the value of a multivariable function f as you walk along a path parameterized by r(t).
  • 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.

Want to join the conversation?