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

Directional Derivatives and the Gradient

College Depth 79 in the knowledge graph ☐ I know this ☆ Set as goal
1,023topics build on this
371prerequisites 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.

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 → Addition Within 10 → Number Bonds to 10 → 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 → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Vectors in Two Dimensions → Vector Operations: Addition, Subtraction, and Scalar Multiplication → Dot Product (Inner Product in R^n) → Dot Product and Projections → Directional Derivatives → Directional Derivatives and the Gradient

Longest path: 80 steps · 371 total prerequisite topics

Prerequisites (6)

Leads To (2)