LH
Apr 21, 2026
How to solve constrained optimization problems using Lagrange multipliers?
I'm studying multivariable calculus and I need to understand the method of Lagrange multipliers for constrained optimization.
I understand that to find the extrema of subject to , we solve:
But why does this work? What is the geometric intuition behind setting the gradients proportional? And how do I apply it to a concrete problem like maximizing subject to ?
Also, how do I determine whether the critical point is a maximum or minimum?
1 answers105 views
Loading comments...
1 Answer
DA
Dr. Aisha MohammedApr 22, 2026 Accepted**Geometric Intuition:**
At a constrained extremum, the level curve of $f$ must be tangent to the constraint curve $g(x,y) = 0$. The gradient $\
abla f$ is perpendicular to level curves of $f$, and $\
abla g$ is perpendicular to the constraint. At tangency, these normals are parallel: $\
abla f = \lambda \
abla g$.
The scalar $\lambda$ (the Lagrange multiplier) tells you how sensitive the optimal value is to changes in the constraint.
**Applied to $f(x,y) = xy$ with $x^2 + y^2 = 1$:**
**Step 1:** Compute gradients:
$$\
abla f = (y, x), \quad \
abla g = (2x, 2y)$$
**Step 2:** Set $\
abla f = \lambda \
abla g$:
\begin{align*}
y &= 2\lambda x \\
x &= 2\lambda y
\end{align*}
**Step 3:** Multiply the first by $x$ and the second by $y$:
$$xy = 2\lambda x^2, \quad xy = 2\lambda y^2$$
Thus $2\lambda x^2 = 2\lambda y^2$, so either $\lambda = 0$ or $x^2 = y^2$.
If $\lambda = 0$, then $y = 0$ and $x = 0$, which fails $x^2 + y^2 = 1$.
So $x^2 = y^2$ which means $y = \pm x$.
**Step 4:** Substitute into $x^2 + y^2 = 1$:
- If $y = x$: $2x^2 = 1 \Rightarrow x = \pm 1/\sqrt{2}, y = \pm 1/\sqrt{2}$
- If $y = -x$: $2x^2 = 1 \Rightarrow x = \pm 1/\sqrt{2}, y = \mp 1/\sqrt{2}$
**Step 5:** Evaluate $f$:
- $f(1/\sqrt{2}, 1/\sqrt{2}) = 1/2$ (maximum)
- $f(-1/\sqrt{2}, -1/\sqrt{2}) = 1/2$ (maximum)
- $f(1/\sqrt{2}, -1/\sqrt{2}) = -1/2$ (minimum)
- $f(-1/\sqrt{2}, 1/\sqrt{2}) = -1/2$ (minimum)
To classify max vs min without evaluating $f$, you can use the **bordered Hessian** or simply compare function values.
The method extends to multiple constraints: $\
abla f = \sum \lambda_i \
abla g_i$.
Loading comments...