ArticleslgStudy

mathematics

Gradient

Gradient is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gradient rather than just read about it. In short: In vector calculus, the gradient ∇f of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) whose value at a point p gives the direction and the rate of fastest increase. The nabla symbol ∇, pronounced "del", denotes the vector differential operator.

Gradient — main illustration
Gradient — illustration

Key takeaways

  • Gradient belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gradient to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gradient from memory before moving on to harder problems.

Reference excerpt

In vector calculus, the gradient ∇f of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) whose value at a point p gives the direction and the rate of fastest increase. The nabla symbol ∇, pronounced "del", denotes the vector differential operator. If the gradient of a function is non-zero at a point p, the direction of the gradient is the direction in which the function increases most quickly from p, and the magnitude of the gradient is the rate of increase in that direction, the greatest absolute directional derivative. This property of the gradient as the fastest increase leads to gradient descent, an optimization technique to minimize a function. This technique is widely used in machine learning. In coordinate-free terms, the gradient ∇f may be defined by: df=∇f⋅d𝐫 where df is the total infinitesimal change in f for an infinitesimal displacement d𝐫, and is seen to be maximal when d𝐫 is in the direction of the gradient ∇f. In a Cartesian coordinate system, the gradient is a vector of partial derivatives. For f:ℝn→ℝ, its gradient ∇f:ℝn→ℝn is defined at the point p=(x1,…,xn) as the vector ∇f(p)=[∂f∂x1(p)⋮∂f∂xn(p)]. (See § Cartesian coordinates for the conditions under which the above formula applies). The gradient is dual to the total derivative df; see § Relationship with total derivative. It also admits multiple generalizations to more general functions on manifolds; see § Generalizations.

Motivation

Consider a room where the temperature is given by a scalar field, T, so at each point (x, y, z) the temperature is T(x, y, z), independent of time. At each point in the room, the gradient of T at that point will show the direction in which the temperature rises most quickly, moving away from (x, y, z). The magnitude of the gradient will determine how fast the temperature rises in that direction. Consider a surface whose height above sea level at point (x, y) is H(x, y). The gradient of H at a point is a plane vector pointing in the direction of the steepest slope or grade at that point. The steepness of the slope at that point is given by the magnitude of the gradient vector. The gradient can also be used to measure how a scalar field changes in other directions, rather than just the direction of greatest change, by taking a dot product. Suppose that the steepest slope on a hill is 40%. A road going directly uphill has slope 40%, but a road going around the hill at an angle will have a shallower slope. For example, if the road is at a 60° angle from the uphill direction (when both directions are projected onto the horizontal plane), then the slope along the road will be the dot product between the gradient vector and a unit vector along the road, as the dot product measures how much the unit vector along the road aligns with the steepest slope, which is 40% times the cosine of 60°, or 20%. More generally, if the hill height function H is differentiable, then the gradient of H dotted with a unit vector gives the slope of the hill in the direction of the vector, the directional derivative of H along the unit vector.

Notation The gradient of a function f at point a is usually written as ∇f(a). It may also be denoted by any of the following:

∇→f(a) : to emphasize the vector nature of the result. grad⁡f ∂if and f,i : Written with Einstein notation, where repeated indices (i) are summed over.

Definition

The gradient (or gradient vector field) of a scalar function f(x1, x2, x3, …, xn) is denoted ∇f or ∇→f where ∇ (nabla) denotes the vector differential operator, del. The notation grad f is also commonly used to represent the gradient. The gradient of f is defined as the unique vector field whose dot product with any unit vector 𝐯̂ at each point x is the directional derivative of f along v. That is, (∇f(x))⋅𝐯̂=D𝐯f(x) where the right-hand side is the directional derivative and there are many ways to represent it. Formally, the derivative is dual to the gradient; see relationship with derivative. When a function also depends on a parameter such as time, the gradient often refers simply to the vector of its spatial derivatives only (see Spatial gradient). The magnitude and direction of the gradient vector are independent of the particular coordinate representation.

Cartesian coordinates In a Cartesian coordinate system with a Euclidean metric, for f:ℝn→ℝ, its gradient ∇f:ℝn→ℝn, if it exists, is defined at the point p=(x1,…,xn) as ∇f(p)=[∂f∂x1(p)⋮∂f∂xn(p)].

Three-dimensional case A common special case is when n=3 and p=(x,y,z), the gradient is given by ∇f(p)=∂f∂x𝐢+∂f∂y𝐣+∂f∂z𝐤. Note the notation change from the n-dimensional definition, where x1,x2,x3 are renamed to x,y,z. The vectors i, j, k are the standard unit vectors in the directions of the x, y and z coordinates, respectively. For example, the gradient of the function f(x,y,z)=2x+3y2−sin⁡(z) is ∇f(x,y,z)=2𝐢+6y𝐣−cos⁡(z)𝐤. or ∇f(x,y,z)=[26y−cos⁡z].

Conditions for validity The definition ∇f(p)=[∂f∂x1(p)⋮∂f∂xn(p)] only holds if f is differentiable at p. There can be functions for which partial derivatives exist in every direction but fail to be differentiable. For example, the function f(x,y)={x2yx2+y2if (x,y)≠(0,0)0if (x,y)=(0.0), is not differentiable at the origin, as it does not have a well-defined tangent plane despite having well-defined partial derivatives in every direction at the origin. Furthermore, this definition as the vector of partial derivatives is valid only when the basis of the coordinate system is orthonormal. For any other basis, the metric tensor at that point needs to be taken into account.

Cylindrical and spherical coordinates

In cylindrical coordinates, the gradient is given by: ∇f(ρ,φ,z)=∂f∂ρ𝐞ρ+1ρ∂f∂φ𝐞φ+∂f∂z𝐞z, where ρ is the axial distance, φ is the azimuthal or azimuth angle, z is the axial coordinate, and eρ, eφ and ez are unit vectors pointing along the coordinate directions. In spherical coordinates with a Euclidean metric, the gradient is given by: ∇f(r,θ,φ)=∂f∂r𝐞r+1r∂f∂θ𝐞θ+1rsin⁡θ∂f∂φ𝐞φ, where r is the radial distance, φ is the azimuthal angle and θ is the polar angle, and er, eθ and eφ are again local unit vectors pointing in the coordinate directions (that is, the normalized covariant basis). For the gradient in other orthogonal coordinate systems, see Orthogonal coordinates (Differential operators in three dimensions).

… excerpt ends here. Continue reading the full article.

Illustrations

Gradient: The gradient, represented by the blue arrows, denotes the direction of greatest change of a scalar function. The values of the function are represented in greyscale and increase in value from white (low) to dark (high).
The gradient, represented by the blue arrows, denotes the direction of greatest change of a scalar function. The values of the function are represented in greyscale and increase in value from white (low) to dark (high).
Gradient: Gradient of the 2D function .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}f(x, y) = xe−(x2 + y2) is plotted as arrows over the pseudocolor plot of the function.
Gradient of the 2D function .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}f(x, y) = xe−(x2 + y2) is plotted as arrows over the pseudocolor plot of the function.
Gradient: The gradient of the function f(x,y) = −(cos2x + cos2y)2 depicted as a projected vector field on the bottom plane.
The gradient of the function f(x,y) = −(cos2x + cos2y)2 depicted as a projected vector field on the bottom plane.

Worked examples

Example 1 — a first encounter with Gradient

Start with the simplest possible case. Write down what Gradient claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gradient before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gradient ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gradient

In research
Gradient appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gradient in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gradient is common in secondary-school and first-year university syllabi. It links to neighbouring topics Differential calculus, Differential operators, Generalizations of the derivative, so understanding it makes those chapters shorter.
In everyday life
Look for Gradient outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gradient” →

How to study Gradient in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gradient means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gradient out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gradient in simple terms?

In vector calculus, the gradient ∇f of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) whose value at a point p gives the direction and the rate of fastest increase. The nabla symbol ∇, pronounced "del", denotes the vector differential…

Why does Gradient matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gradient?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gradient.

Tags

  • Differential calculus
  • Differential operators
  • Generalizations of the derivative
  • Linear operators in calculus
  • Rates
  • Vector calculus

Keep exploring