Course contentsShow
← Mathematics
Lesson 1874 of 3,12140. Multivariable OptimizationFree lesson

The Geometry of Constrained Optimization

Visualizing how optimal points occur where level curves of the objective function are tangent to the constraint curve.

The Geometry of Constrained Optimization

What you'll learn: You'll understand how the optimal solution to a constrained optimization problem appears visually as the point where a level curve of your objective function just touches—but doesn't cross—the constraint curve.

The Visual Picture

When you're maximizing or minimizing a function f(x,y) subject to a constraint g(x,y) = k, there's a beautiful geometric story unfolding.

Imagine you're hiking on a hilly landscape (your objective function), but you're restricted to walk only along a specific trail (your constraint curve). Where will the highest and lowest points on this trail be?

Why Tangency Matters

Here's the key insight: the optimal points occur where level curves of f are tangent to the constraint curve g(x,y) = k.

Think of level curves as contour lines on a topographic map—each represents points of equal height. As you "slide" these contours up and down (changing their value), you're looking for the highest-valued contour that still touches your constraint path. At the optimum, the contour just grazes the constraint curve—it's tangent to it.

If a level curve crosses the constraint curve instead of just touching it, that means you could move along the constraint in either direction to reach a higher (or lower) level curve. Only at tangency have you truly maxed out or minimized what's possible along the constraint.

The Gradient Connection

Geometrically, tangency between curves means their normal vectors point in the same (or exactly opposite) directions. Since gradients are perpendicular to level curves and level surfaces, this tangency condition translates to:

∇f parallel to ∇g at optimal points—the foundation of Lagrange multipliers.

Key Takeaway: Constrained optima occur where level curves of the objective function are tangent to the constraint curve; crossing means you haven't optimized yet, tangency means you've found an extremum.