I have (probably) a fundamental problem understanding something related critical points and Lagrange multipliers.
As we know, if a function assumes an extreme value in an interior point of some open set, then the gradient of the function is 0.
Now, when dealing with constraint optimization using Lagrange multipliers, we also find an extreme value of the function restricted to some curve.
So why in the case of constraint optimization can't we also search for points where the gradient is 0? What am I missing here?
Thank you.
So if the gradient were zero on the constraint surface, that would be fine (and it would satisfy the Lagrange condition). But typically this doesn't happen; for instance, if you're extremizing $f(x,y)=x+y$, its gradient is never $0$, but this function still has extrema on the unit circle.
The key fact here is that if $S$ is the surface $\{ \mathbf{x} : g(\mathbf{x})=0 \}$, the tangent (hyper)plane of $S$ at each point is perpendicular to the gradient of $g$ at that point. This means that the Lagrange condition can be understood as "the gradient of $f$ is perpendicular to the tangent (hyper)plane of $S$". So the Lagrange condition tells you that if you move in a direction tangent to $S$, $f$ will not change to first order. If it did, then you could go a sufficiently short distance in one direction to increase $f$, and a sufficiently short distance in the opposite direction to decrease $f$. Finally, it turns out that what we've said about the tangent directions transfers to the surface itself.
Thus the Lagrange condition is necessary (under the "regularity" hypotheses of the Lagrange multiplier theorem, which include the constraint qualification--see comments). Just like in the unconstrained case, it is not sufficient.