I am beginner learning Lagrange multipliers with wiki article.


maximize $f(x,y)$ subject to $g(x,y) = 0$

I understand that to maximize I must follow the gradient $\nabla {_{x, y}}^{}f$. I also understand that gradient of the constraint $\nabla{_{x, y}}^{}g$ must be collinear to $\nabla {_{x, y}}^{}f$ (to check whether $\nabla {_{x, y}}^{}f$ projection to the constraint line equal to 0).

But I totally misunderstood role of the sign in the equality.

$\nabla {_{x, y}}f = -\lambda \nabla {_{x, y}}g$

where $\lambda > 0$ and we maximizing $f(x,y)$

See picture from wiki:

enter image description here

I could imagine $g'(x,y) = 0$ which give same set of points ${x,y}$ (red line) as $g(x,y) = 0$ but have just the opposite gradient (opposite red arrows direction) and in this case my maximum of $f$ will become minimum?!

  • $\begingroup$ It is helpful to think of $\lambda$ as a penalty, since the method is used for minimization or maximization. Basically, no matter what values of $x, y$ you obtain to optimize your functional, the $\lambda$ will be an arbitrarily large penalty against that value so long as $g(x, y) \ne c$. $\endgroup$
    – AdamO
    Commented Aug 28, 2015 at 18:00

1 Answer 1


There is no sign restriction for the Lagrange multiplier of an equality constraint. Lagrange multipliers of inequality constraints do have a sign restriction.

You should really look at the Karush-Kuhn-tucker conditions if you want to understand Lagrange multipliers https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions . Realistically, you will need to study a book or course notes. Here is a high quality book available as a free pdf from the author's website http://stanford.edu/~boyd/cvxbook/ . If you can make it through chapter 5, you'll be in good shape.

  • $\begingroup$ I knew it! I felt that wiki do not tell me everything I should know. So another words minus lambda or not - doesnt metter... $\endgroup$ Commented Aug 28, 2015 at 15:21
  • $\begingroup$ Yes, lose that article like a bad habit. Nevertheless, I didn't see where the article stated anywhere that there was a sign restriction on the Lagrange multiplier for the g(x,y) = c constraint, so perhaps you saw such a sign restriction elsewhere, in conjunction with an inequality constraint, and mistakenly assumed that it applied to the Lagrange multiplier of an equality constraint. $\endgroup$ Commented Aug 28, 2015 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.