My exercise is as follows:

Using Lagrange multipliers find the distance from the point $(1,2,−1)$ to the plane given by the equation $x−y + z = 3. $

My thought process:

  • Langrange Multipliers let you find the maximum and/or minimum of a function given a function as a constraint on your input. For example, if I'm told to find the maximum value of some plane given the constraint $x^2+y^2 = 1$, the only $x$ values I can take are ones on the unit circle.
  • It does this by assuming that any intersecting contour lines of the function and constraining function must have the condition $\nabla f = \lambda \nabla g$. Intersecting contour lines are necessary for the constraining function and function to be equal to eachother.
  • In this case, we are trying to find the distance from the point $(1,2,-1)$ to the plane of equation $x-y+z=3$.
  • Now, given my intuition, $x-y+z=3$ ought to be $g(x,y,z)$ since in these types of problems some function equal to a constant will be this $g(x,y,z)$ (although I'm not exactly sure why).
  • This leads me to ponder what form $f(x,y,z)$ will have such that $F(x,y,z) = f(x,y,z) - \lambda g(x,y,z)$.
  • The minimum distance from a point to a plane should be a straight line, and that line should be perpendicular to the plane. That means it should be the normal vector, or gradient, of that plane. However, I don't know how that helps me. I need a function $f(x,y,z)$ to use.

Here's my lecturer's answer:

  • We want to minimize $$d = \sqrt {(x-1)^2+(y-2)^2 + (z+1)^2}$$
  • Equivalent to minimizing $(x-1)^2+(y-2)^2 + (z+1)^2$ with the same constraint.

Thus, it is rendered to

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

Upon solving $\lambda$ apparently didn't need to be considered when minimizing, as it dropped out in row operations and back-substitutions from the simultaneous equations you get from considering the partial derivatives. This leaves me with the following questions:

  • Why are we working with the distance from the origin to the point rather than the point to the plane?

  • Is what is meant by "minimize" is find the smallest output value for the plane given the constraint its inputs must also satisfy $(x-1)^2+(y-2)^2 + (z+1)^2$?

  • How did he reach the conclusion $\sqrt{(x-1)^2+(y-2)^2 + (z+1)^2}$ is equivalent to minimizing $(x-1)^2+(y-2)^2 + (z+1)^2$ subject to the same constraint?

  • Why is my thinking in normal vectors a bad idea?

  • The values that solve the linear equations are the points needed for minimum distance. Why is that?

  • $\begingroup$ $d$ is the distance from a point $(x,y,z)$ to $(1,2,-1)$. The constraint $x-y+z = 3$ keeps $(x,y,z)$ on the plane. Why do you think you are working with the distance to the origin? Note that the distance is always positive, and the function $x \mapsto x^2$ is strictly monotonic increasing, hence minimising the distance and the square of the distance will accomplish the same goal. $\endgroup$ – copper.hat Nov 7 '17 at 2:18

Vectors is a fine way to solve this. Find make $(1,2,-1)$ the tail. Make (1,-1,1) the direction, and find $t$ such that $(1,2,-1) + t\frac {(1,-1,1)}{\|(1,-1,1)\|} = 0$

There is also a distance formula: What does the old fashioned distance formula say.

$d = \frac {|ax + by + cz - d|}{\sqrt {a^2 + b^2 + c^2}} = \frac {5}{\sqrt {3}}$

Lagrange multiplier are entirely unnecessary in this problem. But they are useful in more complicated optimization problems.

If you want to use Lagrange multipliers:

$d = \sqrt {(x-1)^2 + (y-2)^2 + (z+1)^2}$ is minimized when $d^2 = (x-1)^2 + (y-2)^2 + (z+1)^2$

We can say this because when $a,b > 0$, and $a>b$ then $a^2 > b^2$

minimizing $d^2$ will minimize $d$

$\frac {\partial F}{\partial x} = 2(x-1) - \lambda = 0\\ \frac {\partial F}{\partial y} = 2(y-2) + \lambda = 0\\ \frac {\partial F}{\partial z} = 2(z+1) - \lambda = 0$

$x = \frac {\lambda + 2}{2}\\ y = \frac {-\lambda + 4}{2}\\ z = \frac {\lambda - 2}{2}$

plug into the constraint (mutiplying by 2 to kill the deominator):

$2x - 2y + 2z = 3\\ \lambda + 2 + \lambda - 4 + \lambda - 2 = 6\\ \lambda = \frac {10}{3}$

$(x,y,z) = (\frac {8}{3}, \frac {1}{3}, \frac {13}{6})$

$d = \sqrt {\frac {5}{3}^2 + \frac {-5}{3}^2 + \frac {5}{3}^2} = \frac {5\sqrt 3}{3}$

  • $\begingroup$ Thanks! couple questions: a) I'm confused with "$d = \sqrt {(x-1)^2 + (y-2)^2 + (z+1)^2}$ is minimized when $d^2 = (x-1)^2 + (y-2)^2 + (z+1)^2$ We can say this because when $a,b > 0$, and $a>b$ then $a^2 > b^2$ minimizing $d^2$ will minimize $d$". Firstly, since I'm new to this concept, what does it exactly mean to minimize $d$? Is it to find the smallest value of $d$ using the constraint as the input space? Secondly, why exactly does your bit about $a,b > 0$ exactly justify it? It's going over my head. b) Why does solving for those specific $x$,$y$,$z$ represent the minimum distance? $\endgroup$ – sangstar Nov 7 '17 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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