I was studying Lagrange multipliers. However, I have some confusion. Let's say I have a function $f(x,y)$ to be minimized and I have some constraints $g(x,y) = 0$.
If I minimize the function $ L(x,y,\lambda) = f(x,y) + \lambda g(x,y) \>, $ then how does it include the constraint $g(x,y) = 0$. The book says that if I minimize $L$ with respect to $\lambda$ then it will be equivalent to minimize the function $f(x,y)$ with the constraint $g(x,y)$.
I need some clarifications.
Further it is said that
gradient(f)+ lambda * gradient(g) = 0 ............(1)
leads to
L(x,y,lambda) = f(x,y) + lambda * g(x,y)...........(2)
I didn't get this portion how come equation 1 led to equation 2?
Also I am a bit confused when it comes to inequality constraints like
g(x,y) >= 0
It is being said that f(x,y) will be maximum if its gradient is oriented away from the region g(x,y) > 0 and therefore
gradient(f(x,y)) = - lambda * gradient(g(x,y))
I just didn't get this.