I just learnt about Lagrange Multipliers & am confused about why they are useful. Why can we not just check for critical points by checking if the gradient vector of the objective function $f$ is $0$? Is it because for higher dimensions the boundary of a set may be infinite unlike the case when we have $[a,b]$ so if there is no critical point within $(a,b)$, the max and min lie at the endpoints.
Also, I may be wrong but the general procedure is to first check for critical points of $g$, the constraint function, on the level set and then look for Lagrange points. If this is correct, could someone explain why we look for critical points of $g$ instead of $f$? It doesn't make sense to look for maximum or minimum points of the constraint function..