Geometric Interpretation of Multiple Constraints
You'll learn: How to visualize the gradient alignment when optimizing a function subject to two or more constraints.
The Core Idea
When you optimize a function f(x, y, z) subject to two constraints g(x, y, z) = 0 and h(x, y, z) = 0, you're searching for extrema along the intersection of two surfaces. At an optimal point, something remarkable happens geometrically: the gradient of your objective function ∇f must be a linear combination of the constraint gradients ∇g and ∇h.
In other words, at a critical point:
∇f = λ∇g + μ∇h
This means all three gradient vectors lie in the same plane—they're coplanar.
Why This Makes Sense
Think of it this way: the two constraints force you onto a curve (or lower-dimensional surface) where both g = 0 and h = 0 simultaneously. The gradients ∇g and ∇h each point perpendicular to their respective constraint surfaces. Together, they define a plane of "forbidden directions"—you can't move in any direction that has a component along either gradient without violating a constraint.
The only directions you can move are tangent to the intersection curve. At an optimum, ∇f must also have no component tangent to this curve—otherwise you could improve f by moving along it. Therefore, ∇f must lie entirely in the plane spanned by ∇g and ∇h.
Visual Summary
Imagine standing on a mountain ridge (intersection of two surfaces). The optimal point is where the "slope" of your objective function aligns perfectly with the combination of the two constraint directions—you can't improve by walking along the ridge.
Key Takeaway: At a critical point with multiple constraints, the objective gradient lies in the plane spanned by the constraint gradients—geometrically expressing that you can't improve while staying on the feasible intersection.