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

Optimization in Multiple Variables

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

How It's Best Learned

Run the full procedure on one small problem and keep a table of candidates. Take f(x, y) = x² + y² − x on the closed unit disk. The interior critical point (1/2, 0) gives −1/4. On the boundary, substitute x = cos t, y = sin t to get 1 − cos t, with values from 0 to 2. So the minimum is interior and the maximum, 2 at (−1, 0), is on the boundary.

Common Misconceptions

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 → 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 → Optimization in Multiple Variables

Longest path: 99 steps · 462 total prerequisite topics

Prerequisites (5)

Leads To (28)