Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →

Gradient

The gradient is the vector of partial derivatives of a scalar function, and it points in the direction of steepest increase. In Linear Algebra and Differential Equations, it shows how a function changes with each variable and helps with optimization and exact equations.

Last updated July 2026

What is the gradient?

The gradient is the vector made from a function’s partial derivatives. For a function f(x, y), that means ∇f = (∂f/∂x, ∂f/∂y). In three variables, you add the third partial derivative, and in more variables, the same pattern continues.

What makes the gradient different from a regular derivative is that it talks about change in several directions at once. Each partial derivative measures how the function changes if you move along one coordinate axis while holding the others fixed. The gradient packages those rates into one vector, so you can see both how steep the function is and which way goes uphill fastest.

That direction fact matters a lot. If you picture a surface like a hill, the gradient at a point points toward the steepest ascent on that surface. Its length tells you how sharp that ascent is. If the gradient is zero at a point, the surface is flat there in first-order terms, which is why critical points show up in optimization problems.

In Linear Algebra and Differential Equations, the gradient also shows up when a differential equation is written as an exact differential. A typical exact equation has the form M(x,y)dx + N(x,y)dy = 0, and if there is a potential function F such that ∇F = (M, N), then the equation is exact. So instead of treating M and N as random pieces, you check whether they fit together as the gradient of one function.

That is the main skill with gradient: you do not just compute it, you interpret it. In a problem set, you may be asked to find ∇f, evaluate it at a point, or use it to decide whether a field comes from a potential function. The vector is the bridge between a formula and the geometric or differential behavior of the system.

Why the gradient matters in Linear Algebra and Differential Equations

Gradient shows up any time the course connects geometry, change, and differential equations. In optimization, it tells you where a function rises fastest, which makes it a natural tool for finding peaks, valleys, and flat points on a graph or surface. That gives you a quick way to read the local behavior of multivariable functions instead of checking every direction one by one.

It also connects directly to exact equations and potential functions. If a vector field or differential form is the gradient of some scalar function, then the equation has a built-in structure you can exploit. Instead of solving from scratch, you check compatibility conditions and then reconstruct the potential function.

This concept is one of the places where the course feels connected across topics. Partial derivatives give the ingredients, level curves and directional behavior give the geometry, and the gradient ties them together into one object you can compute and interpret. If you understand gradient well, exact equations feel less like a memorization topic and more like a pattern recognition task.

Keep studying Linear Algebra and Differential Equations Unit 8

Official unit cheatsheet

open one-pager

How the gradient connects across the course

Partial Derivative

A gradient is built from partial derivatives. Each component tells you how the function changes in one variable while the others stay fixed, so partial derivatives are the raw data and the gradient is the full vector summary. If you can compute partial derivatives, you already have the main tool needed to write down a gradient.

Level Curves

Level curves show where a function stays constant, and the gradient points perpendicular to those curves. That relationship gives you a geometric check on your calculations. If your gradient seems to point along a level curve, something is wrong, because the direction of fastest increase must cut across constant-value lines.

Directional Derivative

The directional derivative measures change in one chosen direction, while the gradient tells you the best possible direction to choose. Once you know the gradient, you can find the directional derivative in any direction using a dot product idea. This is where the gradient becomes more than a definition, it becomes a shortcut for rate-of-change questions.

Potential Function

A potential function is a scalar function whose gradient gives a vector field or differential form. In exact equations, you often look for a potential function so you can rewrite the problem in a simpler integrated form. If one exists, the gradient is the link that explains why the equation is exact.

Is the gradient on the Linear Algebra and Differential Equations exam?

A problem set or quiz question may ask you to compute the gradient of a multivariable function, then interpret the result at a specific point. You might need to say which direction gives the fastest increase, find where the gradient is zero, or check whether a differential equation is exact by matching its terms to a potential function.

In an exact-equations problem, the move is usually to compare the coefficients of dx and dy with partial derivatives of a single function. If they fit, you reconstruct that function and use it to solve the equation. If they do not fit, you may look for an integrating factor first.

The common mistake is treating the gradient like a single number instead of a vector. Another one is forgetting that each component comes from a partial derivative, not an ordinary derivative with respect to one variable only.

The gradient vs Directional Derivative

The directional derivative gives the rate of change in one specific direction you choose, while the gradient is the vector that contains all the local change information. The gradient is what you use to find the steepest direction, and the directional derivative is what you get after you project that gradient onto a direction.

Key things to remember about the gradient

  • The gradient is the vector of partial derivatives of a scalar function.

  • It points in the direction of steepest increase, and its length shows how steep that increase is.

  • For a function of two variables, the gradient is written as ∇f = (∂f/∂x, ∂f/∂y).

  • In differential equations, a gradient can identify whether a form is exact and whether a potential function exists.

  • If the gradient is zero at a point, that point is worth checking as a possible maximum, minimum, or saddle point.

Frequently asked questions about the gradient

What is gradient in Linear Algebra and Differential Equations?

The gradient is the vector made from a function’s partial derivatives. It points in the direction of steepest increase for a scalar function, and in this course it shows up in multivariable calculus ideas and in exact differential equations through potential functions.

How do you find the gradient of f(x, y)?

Take the partial derivative with respect to x for the first component and the partial derivative with respect to y for the second component. So if f(x, y) is your function, then ∇f = (∂f/∂x, ∂f/∂y). The same pattern extends to more variables.

Is the gradient the same as a directional derivative?

No. The gradient is a vector, and the directional derivative is a rate of change in one chosen direction. You can use the gradient to calculate directional derivatives, but they are not the same object. A common mistake is mixing up the direction of the gradient with the direction you are asked about.

How does gradient relate to exact equations?

An exact equation can be written as the gradient of a potential function. If M(x,y)dx + N(x,y)dy = 0 is exact, then there is a function F with ∇F = (M, N). That connection lets you integrate more cleanly instead of solving the equation piece by piece.

Gradient | Linear Algebra and Differential Equations | Fiveable