# Derive Lagrange multipliers

1. Jul 15, 2007

### CalcDude

hi, i just learned about lagrange multipliers and i am very confused about how to derive and use them. another thing, how would you use them to find points on a surface that are closest to a given point outside the surface

2. Jul 15, 2007

### Kummer

Let $$z=f(x,y)$$ be your (well-behaved) surface. And without lose of generality let us find the closet point to the origin. Now the distance is $$s(x,y) = x^2+y^2+z^2$$ (I removed the square root, because it is minimized the distance squared rather than distance itself).

So the problem is:
1)Minimized $$s(x,y,z)$$
2)Subject to $$z=f(x,y) \implies z - f(x,y) = 0$$

So,
$$\left< \frac{\partial s}{\partial x} , \frac{\partial s}{\partial y}, \frac{\partial s}{\partial z} \right> = k\left< - \frac{\partial f}{\partial x} , - \frac{\partial f}{\partial y}, 1 \right>$$
And, $$z-f(x,y)=0$$

That is the general approach to this problem.

3. Jul 16, 2007

### HallsofIvy

One way to think about Lagrange Multipliers is this: In order to find a maximum point of a function of several variable, pick some "starting point" at random, find the gradient vector of the function, and move in the direction it points (for minimum move in the opposite direction). Keep doing that until you get gradient equal to 0 and have no direction to follow.

If you are required to stay on a given surface, and so can't "follow" the gradient vector, take its projection onto the surface and move in that direction. You can keep doing that until there is no projection: the gradient vector is perpendicular to the surface and so is parallel to the normal vector of the surface- one must be a scalar multiple of the other.

The two vectors Kummer uses are exactly the gradient of the distance (squared) function and the normal vector of the surface (if z= f(x,y), then F(x,y,z)= z- f(x,y) = 0 gives a "level surface" of F(x,y,z) and its gradient is normal to the level surface.)

4. Jul 17, 2007

### mathwonk

max min occurs where the derivative is zero. if you restruct to a surface tht means the derivative is zero on thr tangent plane to that surface, i.e. the gradient is parallel to the normal vector to thag surface. so lagrange multipliers amount to finding where the graient of your function is parallel to, hen ce a multiple of, the normal to the given surface.

so to find a point nearest a given surface g=0, you look for a point where the distance function has grDIENT PARALLEL TO THE GRADIENT OF G.