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

Optimization in Multiple Variables

College Depth 86 in the knowledge graph ☐ I know this ☆ Set as goal
1,000topics build on this
420prerequisites beneath it
See this on the map →
Critical Points and Local ExtremaSecond Partial Test and the Hessian+3 more→→Auction TheoryBellman Equation and Dynamic Programming+26 more
optimization extrema

Core Idea

To optimize f(x, y) on a region: find critical points, classify them, evaluate f at critical points and on the boundary, then compare. Global extrema on closed bounded sets are guaranteed to exist.

Explainer

From single-variable calculus, you know the procedure for finding extrema on a closed interval: set the derivative to zero, find interior critical points, evaluate at the endpoints, and compare all values. Multivariable optimization follows exactly the same logic — it just has more geometry. The "interior" is now the open region inside D, the "endpoints" become the boundary curve (or surface) of D, and "derivative = 0" becomes ∇f = 0.

The gradient ∇f = (∂f/∂x, ∂f/∂y) must vanish at any interior local extremum. This gives a system of two equations in two unknowns — typically nonlinear and potentially with multiple solutions. From second-partials-test-hessian you can classify each critical point by computing the Hessian matrix H and its determinant D = f_xx f_yy − (f_xy)². If D > 0 and f_xx > 0, the point is a local min; if D > 0 and f_xx < 0, a local max; if D < 0, a saddle point. Saddle points are the distinctly multivariable phenomenon — f increases in some directions and decreases in others, so the point is neither a local max nor a local min. They have no single-variable analogue (inflection points with f' = 0 are different).

The critical insight for global optimization is the Extreme Value Theorem: a continuous function on a closed bounded region D always attains a global maximum and minimum, and these must occur either at interior critical points or on the boundary of D. The boundary of a 2D region is typically made up of curves — line segments, circular arcs, or other parameterizable pieces. Optimizing f on each boundary piece reduces to a single-variable problem: parameterize the curve (e.g., x = cos t, y = sin t for the unit circle), substitute into f, and use single-variable calculus to find the extrema of the resulting function of t.

After collecting all candidates — values of f at interior critical points plus values at boundary extrema — you simply compare them. The largest is the global max; the smallest is the global min. There is no shortcut: a negative-definite Hessian at an interior point tells you only that it is a local max, not the global max. The boundary can easily produce higher values. This exhaustive comparison is the entire algorithm, and it always works on closed bounded domains.

This framework is the foundation for Lagrange multipliers, which handle equality-constrained optimization more elegantly. Instead of parameterizing the constraint curve and substituting, Lagrange multipliers directly find the points where ∇f is proportional to ∇g (the constraint gradient). The geometric meaning is the same: at a constrained optimum, f cannot increase in any direction tangent to the constraint, which is precisely the condition ∇f = λ∇g. Lagrange multipliers are the multivariable analogue of the endpoint condition in single-variable calculus.

Practice Questions 3 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 → Literal Equations → Slope-Intercept Form → Point-Slope Form → Writing Linear Equations → Parallel and Perpendicular Line Slopes → Graphing Linear Equations → Piecewise Functions → One-Sided Limits → Continuity Definition → Limits and Continuity in Multiple Variables → Functions of Several Variables → Continuity in Multiple Variables → Partial Derivatives: Definition and Computation → Differentiability in Multiple Variables → Differentiability in Multivariable Functions → Total Differential and Linear Approximation → Chain Rule for Multivariable Functions → Implicit Differentiation → Related Rates → Optimization Problems → Critical Points of Multivariable Functions → Critical Points and Classification of Extrema → Second Partial Test for Local Extrema (Hessian) → The Hessian Matrix and Second Derivative Test → Unconstrained Optimization: Finding Extrema → Optimization in Multiple Variables

Longest path: 87 steps · 420 total prerequisite topics

Prerequisites (5)

Leads To (28)