A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

Directional Derivatives and the Gradient

College Depth 97 in the knowledge graph ☐ I know this ☆ Set as goal
1,039topics build on this
419prerequisites beneath it
See this on the map →
Directional DerivativesDot Product (Inner Product in R^n)+4 more→→Gradient Descent and OptimizationOptimization in Multiple Variables
gradient directional-derivative

Core Idea

The directional derivative D_u f = ∇f · u gives the rate of change in direction u (unit vector). The gradient ∇f = ⟨f_x, f_y⟩ points in the direction of steepest ascent and has magnitude equal to the maximum directional derivative.

How It's Best Learned

Compute one directional derivative, then check it numerically. For f = x²y at (1, 2), ∇f = ⟨4, 1⟩. The direction toward (4, 6) is ⟨3, 4⟩, so u = ⟨3/5, 4/5⟩ and D_u f = 16/5 = 3.2. Step 0.05 along u to (1.03, 2.04): f rises from 2 to about 2.164, a rate near 3.3. Compare both with the maximum rate ‖∇f‖ = √17 ≈ 4.12.

Common Misconceptions

Explainer

Partial derivatives tell you how fast f(x, y) changes when you move parallel to the x-axis or y-axis. But what if you walk diagonally, or in some arbitrary direction? The directional derivative answers the general question: how fast is f changing as I move in direction u? The answer turns out to be encoded entirely in the gradient ∇f, which you've already computed, combined with the dot product, which extracts components.

For a unit vector u = ⟨a, b⟩, the directional derivative is D_u f = ∇f · u = f_x · a + f_y · b. This formula says: project the gradient onto your direction of travel and read off the rate of change. Geometrically, the gradient ∇f = ⟨f_x, f_y⟩ is the "slope vector" of the surface — it captures all rate-of-change information in every direction simultaneously, and dotting with u extracts the slice relevant to your particular direction.

The deepest consequence follows from the geometry of dot products: D_u f = ‖∇f‖ cos θ, where θ is the angle between ∇f and u. This is maximized when θ = 0 — when you walk in the direction of ∇f itself. So the gradient points in the direction of steepest ascent, and ‖∇f‖ equals the maximum rate of increase. Walking in the direction of −∇f gives steepest descent. Walking perpendicular to ∇f gives D_u f = 0 — no change — meaning you're moving along a level curve where f is constant. The gradient is always perpendicular to the level curves of f.

To ground this concretely: take f(x, y) = x² + y² (a bowl-shaped paraboloid). At the point (1, 1), ∇f = ⟨2, 2⟩. Walking due east (u = ⟨1, 0⟩) gives D_u f = 2. Walking northeast in the gradient direction (u = ⟨1, 1⟩/√2) gives D_u f = ‖⟨2, 2⟩‖ = 2√2, a steeper climb. This is exactly why gradient descent algorithms — used throughout optimization and machine learning — follow −∇f to find function minima: the gradient tells you the direction of fastest increase, so its negative points most efficiently downhill.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Multiplying Binomials (FOIL) → Factoring Trinomials → Factoring Completely → Introduction to Rational Expressions → Simplifying Radical Expressions → Segments and Distance → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Similar Right Triangles and the Geometric Mean → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Special Right Triangles: 30-60-90 → Trigonometric Ratios Review → Vectors in Two Dimensions → Vectors in R^n → Scalar Multiplication of Vectors → Dot Product (Inner Product in R^n) → Cross Product in R^3 → Cross Product and Vector Area → Dot and Cross Products: Geometry and Computation → Equations of Lines and Planes in 3D → Tangent Planes and Linear Approximation → Tangent Planes to Surfaces → Level Sets and Surfaces in 3D → Contour Maps and Level Curves → Directional Derivatives and the Gradient

Longest path: 98 steps · 419 total prerequisite topics

Prerequisites (6)

Leads To (2)