◀ Back to Note

Tony's Intertwingled Memex • Reference Manual

The Gradient Vector

Formulas & Definitions
Core Definition

Let fff be a scalar function of several variables whose first-order partial derivatives exist. The gradient vector of fff, denoted by ∇f\nabla f∇f (read "del fff" or "grad fff"), is the vector-valued function formed by packaging all first-order partial derivatives of fff into a vector:

  1. Two Variables (f:R2→Rf: \mathbb{R}^2 \to \mathbb{R}f:R2→R):

    ∇f(x,y)=⟨∂f∂x,∂f∂y⟩=∂f∂xi^+∂f∂yj^\nabla f(x, y) = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right\rangle = \frac{\partial f}{\partial x}\hat{i} + \frac{\partial f}{\partial y}\hat{j}∇f(x,y)=⟨∂x∂f​,∂y∂f​⟩=∂x∂f​i^+∂y∂f​j^​

  2. Three Variables (f:R3→Rf: \mathbb{R}^3 \to \mathbb{R}f:R3→R):

    ∇f(x,y,z)=⟨∂f∂x,∂f∂y,∂f∂z⟩=∂f∂xi^+∂f∂yj^+∂f∂zk^\nabla f(x, y, z) = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right\rangle = \frac{\partial f}{\partial x}\hat{i} + \frac{\partial f}{\partial y}\hat{j} + \frac{\partial f}{\partial z}\hat{k}∇f(x,y,z)=⟨∂x∂f​,∂y∂f​,∂z∂f​⟩=∂x∂f​i^+∂y∂f​j^​+∂z∂f​k^

Geometrically, for any point PPP in the domain of fff, ∇f(P)\nabla f(P)∇f(P) points in the direction of steepest ascent (maximum instantaneous increase of fff), its Euclidean length ∥∇f(P)∥\|\nabla f(P)\|∥∇f(P)∥ equals the maximum rate of increase, and ∇f(P)\nabla f(P)∇f(P) is orthogonal (normal) to the level set of fff passing through PPP.


Concept Explanation

The Vector Differential Operator Del (∇\nabla∇)

The symbol ∇\nabla∇ is the vector differential operator "del", defined in Cartesian coordinates as:

∇=i^∂∂x+j^∂∂y+k^∂∂z=⟨∂∂x,∂∂y,∂∂z⟩\nabla = \hat{i}\frac{\partial}{\partial x} + \hat{j}\frac{\partial}{\partial y} + \hat{k}\frac{\partial}{\partial z} = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z} \right\rangle∇=i^∂x∂​+j^​∂y∂​+k^∂z∂​=⟨∂x∂​,∂y∂​,∂z∂​⟩
When del acts upon a scalar function f(x,y,z)f(x, y, z)f(x,y,z), it transforms the scalar field into a vector field ∇f\nabla f∇f. At each spatial coordinate (x,y,z)(x, y, z)(x,y,z), ∇f\nabla f∇f assigns a specific vector with both magnitude and spatial orientation.

       Level Curve f(x, y) = c_2
             .---.
            /     \       ^  grad f (Direction of steepest ascent)
           /   P   \     /|
          |    *----|---' |  (Orthogonal to tangent vector T)
           \   |   /      |
            \  v  /       +-- Tangent vector T along level curve
             '---'
       Level Curve f(x, y) = c_1   (where c_2 > c_1)

Three Fundamental Geometric Properties

  1. Direction of Steepest Ascent: If you stand at a point P(x0,y0)P(x_0, y_0)P(x0​,y0​) on a topographic terrain z=f(x,y)z = f(x, y)z=f(x,y), walking in the exact compass direction of ∇f(x0,y0)\nabla f(x_0, y_0)∇f(x0​,y0​) produces the steepest possible uphill climb. Conversely, moving in the opposite direction, −∇f(x0,y0)-\nabla f(x_0, y_0)−∇f(x0​,y0​), gives the direction of steepest descent (the path naturally carved by rainwater runoff).

  2. Magnitude as Maximum Rate of Change: The Euclidean norm of the gradient vector:

    ∥∇f∥=(∂f∂x)2+(∂f∂y)2or∥∇f∥=fx2+fy2+fz2\|\nabla f\| = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 + \left(\frac{\partial f}{\partial y}\right)^2} \quad \text{or} \quad \|\nabla f\| = \sqrt{f_x^2 + f_y^2 + f_z^2}∥∇f∥=(∂x∂f​)2+(∂y∂f​)2​or∥∇f∥=fx2​+fy2​+fz2​​
    quantifies the maximum possible slope or instantaneous rate of change per unit distance traveled in the domain.

  3. Orthogonality to Level Sets: Let r⃗(t)=⟨x(t),y(t)⟩\vec{r}(t) = \langle x(t), y(t) \rangler(t)=⟨x(t),y(t)⟩ parameterize a smooth level curve f(x,y)=cf(x, y) = cf(x,y)=c. Differentiating both sides with respect to ttt via the Multivariable Chain Rule:

    ddt[f(x(t),y(t))]=ddt[c]  ⟹  ∂f∂xdxdt+∂f∂ydydt=0\frac{d}{dt}[f(x(t), y(t))] = \frac{d}{dt}[c] \implies \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} = 0dtd​[f(x(t),y(t))]=dtd​[c]⟹∂x∂f​dtdx​+∂y∂f​dtdy​=0
    Recognizing the left side as a vector dot product:
    ∇f⋅r⃗′(t)=0\nabla f \cdot \vec{r}'(t) = 0∇f⋅r′(t)=0
    Because r⃗′(t)\vec{r}'(t)r′(t) is the velocity vector tangent to the level curve, ∇f\nabla f∇f is strictly perpendicular (orthogonal) to the tangent line of every level curve (and tangent plane of every level surface).

Step-by-Step Evaluation Strategy

  1. Differentiate Symbolically First: Compute all first-order partial derivatives fx,fyf_x, f_yfx​,fy​ (and fzf_zfz​) treating all other variables as constants. Never substitute numerical values prior to differentiation.
  2. Assemble the Vector: Combine the scalar partial derivatives into bracket format ⟨fx,fy,fz⟩\langle f_x, f_y, f_z \rangle⟨fx​,fy​,fz​⟩ or unit vector form fxi^+fyj^+fzk^f_x\hat{i} + f_y\hat{j} + f_z\hat{k}fx​i^+fy​j^​+fz​k^.
  3. Evaluate at the Specified Point: Substitute the coordinate values of point P(x0,y0,z0)P(x_0, y_0, z_0)P(x0​,y0​,z0​) into the components to obtain a constant vector in R2\mathbb{R}^2R2 or R3\mathbb{R}^3R3.

Engineering Applications

  • Civil & Environmental Engineering: Hydrologists and site grading engineers model retention basins and municipal watersheds with elevation surfaces h(x,y)h(x, y)h(x,y). Water runoff naturally cascades along the direction of steepest descent, −∇h-\nabla h−∇h, while retaining walls and road alignments follow contour curves orthogonal to ∇h\nabla h∇h.
  • Electrical Engineering: Electrostatic potential fields V(x,y,z)V(x, y, z)V(x,y,z) generate electric fields via the negative gradient: E⃗=−∇V\vec{E} = -\nabla VE=−∇V. Charged particles accelerate along lines of electric force governed by ∇V\nabla V∇V.
  • Mechanical & Materials Engineering: Fourier's Law of Heat Conduction states that conductive heat flux q⃗\vec{q}q​ is proportional to the negative temperature gradient: q⃗=−k∇T\vec{q} = -k\nabla Tq​=−k∇T. Thermal engineers align cooling fins and heat sinks directly parallel to −∇T-\nabla T−∇T to maximize heat dissipation away from microprocessors.

Example Problems

Example 1: Two-Variable Gradient Computation & Evaluation

Consider the surface f(x,y)=4x3y2−3x2+7yf(x, y) = 4x^3y^2 - 3x^2 + 7yf(x,y)=4x3y2−3x2+7y.

  1. Find the general gradient vector ∇f(x,y)\nabla f(x, y)∇f(x,y).
  2. Evaluate ∇f\nabla f∇f at the point P(1,−2)P(1, -2)P(1,−2).
  3. State the direction of steepest ascent and the maximum rate of change at PPP.
Solution
  1. Compute the first-order partial derivatives:

    fx(x,y)=∂∂x(4x3y2−3x2+7y)=12x2y2−6xf_x(x, y) = \frac{\partial}{\partial x}(4x^3y^2 - 3x^2 + 7y) = 12x^2y^2 - 6xfx​(x,y)=∂x∂​(4x3y2−3x2+7y)=12x2y2−6x
    fy(x,y)=∂∂y(4x3y2−3x2+7y)=8x3y+7f_y(x, y) = \frac{\partial}{\partial y}(4x^3y^2 - 3x^2 + 7y) = 8x^3y + 7fy​(x,y)=∂y∂​(4x3y2−3x2+7y)=8x3y+7
    The general gradient vector is:
    ∇f(x,y)=⟨12x2y2−6x, 8x3y+7⟩=(12x2y2−6x)i^+(8x3y+7)j^\nabla f(x, y) = \langle 12x^2y^2 - 6x, \, 8x^3y + 7 \rangle = (12x^2y^2 - 6x)\hat{i} + (8x^3y + 7)\hat{j}∇f(x,y)=⟨12x2y2−6x,8x3y+7⟩=(12x2y2−6x)i^+(8x3y+7)j^​

  2. Evaluate at P(1,−2)P(1, -2)P(1,−2):

    fx(1,−2)=12(1)2(−2)2−6(1)=12(4)−6=48−6=42f_x(1, -2) = 12(1)^2(-2)^2 - 6(1) = 12(4) - 6 = 48 - 6 = 42fx​(1,−2)=12(1)2(−2)2−6(1)=12(4)−6=48−6=42
    fy(1,−2)=8(1)3(−2)+7=−16+7=−9f_y(1, -2) = 8(1)^3(-2) + 7 = -16 + 7 = -9fy​(1,−2)=8(1)3(−2)+7=−16+7=−9
    ∇f(1,−2)=⟨42,−9⟩=42i^−9j^\nabla f(1, -2) = \langle 42, -9 \rangle = 42\hat{i} - 9\hat{j}∇f(1,−2)=⟨42,−9⟩=42i^−9j^​

  3. Direction of steepest ascent and maximum rate of change:

    • Direction of steepest ascent: u⃗=∇f∥∇f∥=⟨42,−9⟩422+(−9)2=⟨42,−9⟩1764+81=⟨42,−9⟩1845=⟨14205,−3205⟩\vec{u} = \frac{\nabla f}{\|\nabla f\|} = \frac{\langle 42, -9 \rangle}{\sqrt{42^2 + (-9)^2}} = \frac{\langle 42, -9 \rangle}{\sqrt{1764 + 81}} = \frac{\langle 42, -9 \rangle}{\sqrt{1845}} = \left\langle \frac{14}{\sqrt{205}}, -\frac{3}{\sqrt{205}} \right\rangleu=∥∇f∥∇f​=422+(−9)2​⟨42,−9⟩​=1764+81​⟨42,−9⟩​=1845​⟨42,−9⟩​=⟨205​14​,−205​3​⟩
    • Maximum rate of change: ∥∇f(1,−2)∥=1845=3205≈42.95\|\nabla f(1, -2)\| = \sqrt{1845} = 3\sqrt{205} \approx 42.95∥∇f(1,−2)∥=1845​=3205​≈42.95

Example 2: Three-Variable Transcendental Gradient

Let f(x,y,z)=z2ln⁡(x)+xe2yf(x, y, z) = z^2\ln(x) + x e^{2y}f(x,y,z)=z2ln(x)+xe2y.

  1. Compute the general gradient ∇f(x,y,z)\nabla f(x, y, z)∇f(x,y,z).
  2. Evaluate ∇f\nabla f∇f at the coordinate point Q(1,0,3)Q(1, 0, 3)Q(1,0,3).
Solution
  1. Compute the three partial derivatives:

    fx=∂∂x[z2ln⁡(x)+xe2y]=z2x+e2yf_x = \frac{\partial}{\partial x}[z^2\ln(x) + x e^{2y}] = \frac{z^2}{x} + e^{2y}fx​=∂x∂​[z2ln(x)+xe2y]=xz2​+e2y
    fy=∂∂y[z2ln⁡(x)+xe2y]=2xe2yf_y = \frac{\partial}{\partial y}[z^2\ln(x) + x e^{2y}] = 2x e^{2y}fy​=∂y∂​[z2ln(x)+xe2y]=2xe2y
    fz=∂∂z[z2ln⁡(x)+xe2y]=2zln⁡(x)f_z = \frac{\partial}{\partial z}[z^2\ln(x) + x e^{2y}] = 2z\ln(x)fz​=∂z∂​[z2ln(x)+xe2y]=2zln(x)
    The general gradient vector is:
    ∇f(x,y,z)=⟨z2x+e2y, 2xe2y, 2zln⁡(x)⟩\nabla f(x, y, z) = \left\langle \frac{z^2}{x} + e^{2y}, \, 2x e^{2y}, \, 2z\ln(x) \right\rangle∇f(x,y,z)=⟨xz2​+e2y,2xe2y,2zln(x)⟩

  2. Evaluate at Q(1,0,3)Q(1, 0, 3)Q(1,0,3):

    fx(1,0,3)=321+e2(0)=9+1=10f_x(1, 0, 3) = \frac{3^2}{1} + e^{2(0)} = 9 + 1 = 10fx​(1,0,3)=132​+e2(0)=9+1=10
    fy(1,0,3)=2(1)e2(0)=2(1)(1)=2f_y(1, 0, 3) = 2(1)e^{2(0)} = 2(1)(1) = 2fy​(1,0,3)=2(1)e2(0)=2(1)(1)=2
    fz(1,0,3)=2(3)ln⁡(1)=6(0)=0f_z(1, 0, 3) = 2(3)\ln(1) = 6(0) = 0fz​(1,0,3)=2(3)ln(1)=6(0)=0
    ∇f(1,0,3)=⟨10,2,0⟩=10i^+2j^+0k^\nabla f(1, 0, 3) = \langle 10, 2, 0 \rangle = 10\hat{i} + 2\hat{j} + 0\hat{k}∇f(1,0,3)=⟨10,2,0⟩=10i^+2j^​+0k^


Connections & References

  • Prerequisites:
    • Partial Derivatives — Foundation for component calculations fx,fy,fzf_x, f_y, f_zfx​,fy​,fz​.
    • Vectors — Vector notation, dot products, and unit vector algebra.
    • Multivariable Functions — Domains, scalar fields, and coordinate spaces.
  • Direct Successors & Core Skills:
    • Directional Derivatives — Evaluating rates along arbitrary direction vectors: Du⃗f=∇f⋅u⃗D_{\vec{u}} f = \nabla f \cdot \vec{u}Du​f=∇f⋅u.
    • Tangent Planes to Level Surfaces — Utilizing n⃗=∇F\vec{n} = \nabla Fn=∇F to construct tangent plane equations.
    • Level Curves and Contour Maps — Visualizing gradient vectors orthogonal to elevation contours.
  • Course Sessions:
    • Session 12 - Gradient and Directional Derivatives