# Using the method of Lagrange Multipliers, find the point on the with the equation -2x+y-3z=1 which is closest to the point (1,2,2). Hint: minimise (x-1)^2+(y-2)^2+(z-2)^2 where (x,y,z) satisfy -2x+y-3z=1 Have to use Lagrange multipliers. Just as your hint says, you want to minimize

`(x-1)^2 + (y-2)^2 + (z-2)^2`

this is the square of the distance between (x,y,z) and (1,2,2)

but if you minimize the distance between those points, you will also minimize the square of the distance (which is not as ugly an equation, especially when you have to take derivatives)

but you want the point (x,y,z) to lie on the plane, which means you want it to satisfy -2x+y-3z=1. This is your constraint.

So, setting up the lagrange multiplier equation, let:

`F(x,y,z, lambda) = (x-1)^2 + (y-2)^2 + (z-2)^2 + lambda (-2x+y-3z-1)`

That is, you set your constraint equal to 0 (subtract 1 from both sides). Then you create a new function, F = (function you want to minimize) + `lambda` (constraint set equal to 0)

Now take the partial derivatives:

`F_x = 2(x-1) -2 lambda`

`F_y = 2(y-1) + lambda`

`F_z = 2(z-2) -3 lambda`

`F_(lambda) = -2x+y-3z-1` (you get the constraint function back out)

Set all of these to 0:

`0 = 2(x-1) -2 lambda`

`0 = 2(y-1) + lambda`

`0 = 2(z-2) -3 lambda`

`0 = -2x+y-3z-1`

Thus:

`2 lambda = 2(x-1) `

` lambda = x-1`

So:

`0 = 2(y-1) + x-1 = x+ 2y -3`

`0 = 2(z-2) -3(x-1)= -3x + 2z -1`

`0 = -2x+y-3z-1`

So:

x + 2y = 3
-3x + 2z = 1
-2x+y-3z = 1

The fastest way to do this is just plug the matrix
`[[1,2,0,3],[-3,0,2,1],[-2,1,-3,1]]`
into a calculator and ask it to row reduce it. Or, to do it by hand:

Multiply the top row by 2 and add it to the bottom row,
multiply the top row by 3 and add it to the middle row:
x + 2y = 3
6y + 2z = 10
5y - 3z = 7

3*middle row + 2*bottom row:
28y = 44, y=11/7

5(11/7) - 3z =7
z = 2/7

x + 2(11/7) = 3
x = -1/7

Thus, the point that we want is:

`(x,y,z) = (-(1/7),11/7,2/7)`

Approved by eNotes Editorial Team 