🌱 Tony's Memex Tony's Intertwingled Memex
Digital Garden | OER Curriculum
Home / Digital Garden / The Gradient Vector

The Gradient Vector

Core Definition

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

  1. Two Variables (f:R2→Rf: \mathbb{R}^2 \to \mathbb{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}

  2. Three Variables (f:R3→Rf: \mathbb{R}^3 \to \mathbb{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}

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


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
When del acts upon a scalar function f(x,y,z)f(x, y, z), it transforms the scalar field into a vector field ∇f\nabla f. At each spatial coordinate (x,y,z)(x, y, z), ∇f\nabla 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) on a topographic terrain z=f(x,y)z = f(x, y), walking in the exact compass direction of ∇f(x0,y0)\nabla f(x_0, y_0) produces the steepest possible uphill climb. Conversely, moving in the opposite direction, −∇f(x0,y0)-\nabla f(x_0, y_0), 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}
    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) \rangle parameterize a smooth level curve f(x,y)=cf(x, y) = c. Differentiating both sides with respect to tt 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} = 0
    Recognizing the left side as a vector dot product:
    ∇f⋅r⃗′(t)=0\nabla f \cdot \vec{r}'(t) = 0
    Because r⃗′(t)\vec{r}'(t) is the velocity vector tangent to the level curve, ∇f\nabla 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_y (and fzf_z) 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 or unit vector form fxi^+fyj^+fzk^f_x\hat{i} + f_y\hat{j} + f_z\hat{k}.
  3. Evaluate at the Specified Point: Substitute the coordinate values of point P(x0,y0,z0)P(x_0, y_0, z_0) into the components to obtain a constant vector in R2\mathbb{R}^2 or R3\mathbb{R}^3.

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). Water runoff naturally cascades along the direction of steepest descent, −∇h-\nabla h, while retaining walls and road alignments follow contour curves orthogonal to ∇h\nabla h.
  • Electrical Engineering: Electrostatic potential fields V(x,y,z)V(x, y, z) generate electric fields via the negative gradient: E⃗=−∇V\vec{E} = -\nabla V. Charged particles accelerate along lines of electric force governed by ∇V\nabla V.
  • Mechanical & Materials Engineering: Fourier's Law of Heat Conduction states that conductive heat flux q⃗\vec{q} is proportional to the negative temperature gradient: q⃗=−k∇T\vec{q} = -k\nabla T. Thermal engineers align cooling fins and heat sinks directly parallel to −∇T-\nabla 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 + 7y.

  1. Find the general gradient vector ∇f(x,y)\nabla f(x, y).
  2. Evaluate ∇f\nabla f at the point P(1,−2)P(1, -2).
  3. State the direction of steepest ascent and the maximum rate of change at PP.
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 - 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 + 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}

  2. Evaluate at 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 = 42
    fy(1,−2)=8(1)3(−2)+7=−16+7=−9f_y(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}

  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\rangle
    • Maximum rate of change: ∥∇f(1,−2)∥=1845=3205≈42.95\|\nabla f(1, -2)\| = \sqrt{1845} = 3\sqrt{205} \approx 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}.

  1. Compute the general gradient ∇f(x,y,z)\nabla f(x, y, z).
  2. Evaluate ∇f\nabla f at the coordinate point 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}
    fy=∂∂y[z2ln⁡(x)+xe2y]=2xe2yf_y = \frac{\partial}{\partial y}[z^2\ln(x) + x e^{2y}] = 2x e^{2y}
    fz=∂∂z[z2ln⁡(x)+xe2y]=2zln⁡(x)f_z = \frac{\partial}{\partial z}[z^2\ln(x) + x e^{2y}] = 2z\ln(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

  2. Evaluate at 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 = 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) = 2
    fz(1,0,3)=2(3)ln⁡(1)=6(0)=0f_z(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}


Connections & References