Point on plane closest to origin

From Wikipedia, the free encyclopedia

Here we will find the point on an arbitrary plane that is closest to the origin using Lagrange multipliers.

First, let us start with an arbitrary plane, ax + by + cz = d. The distance, L, from the origin to a point [x,y,z] on the plane is given by:

 L = \sqrt{x^2 + y^2 + z^2}

Therefore the function that we want to minimize is:  f(x,y,z) = \sqrt{x^2 + y^2 + z^2}

Our one constraint on x, y, and z is that the point [x,y,z] must lie on the given plane. Thus, g = ax + by + cz - d.

Next we define a new function with a Lagrange multiplier, λ.

 f^* = f(x,y,z) - \lambda g = \sqrt{x^2 + y^2 + z^2} - \lambda (ax + by + cz - d)

Take the partial of f * with respect to x, y, and z and set each to zero.


  \frac {\partial f^*}{\partial x} = \frac x {\sqrt{x^2 + y^2 + z^2}} - \lambda a = 0


  \frac {\partial f^*}{\partial y} = \frac y {\sqrt{x^2 + y^2 + z^2}} - \lambda b = 0


  \frac {\partial f^*}{\partial z} = \frac z {\sqrt{x^2 + y^2 + z^2}} - \lambda c = 0


Now each partial includes a λ and a  \sqrt{x^2 + y^2 + z^2} term.


If we solve each equation for  \frac \lambda {\sqrt{x^2 + y^2 + z^2}} and set them equal to one another

we can find the relation:

 \frac ax = \frac by = \frac cz

From this we can derive y and z as functions of x:

 y = \frac {bx} a


 z = \frac {cx} a

Substitute these into y and z for the equation of the plane and solve for x to obtain:


 x = \frac {ad}{{a^2+b^2+c^2}}

From x you can solve for y and z:

 y= \frac {bd}{{a^2+b^2+c^2}}


 z =  \frac {cd}{{a^2+b^2+c^2}}

And hence the point on the plane closest to the origin is:

 [x,y,z] = \Big[\frac {ad}{{a^2+b^2+c^2}} ,  \frac {bd}{{a^2+b^2+c^2}} ,  \frac {cd}{{a^2+b^2+c^2}}\Big]

and the distance is given by:

 L = \sqrt{x^2 + y^2 + z^2} = \frac {|d|}{\sqrt{a^2+b^2+c^2}}