[Math] optimize distance from point to plane with Lagrange method

lagrange multiplier

I am trying to optimize distance from point to plane using Lagrange multiplier.

Usually for such problems you are given specific point like (1,2,3) in 3D, and then an exact plane which is just the subject of Lagrange. But what I have here doesn't specify values for point and plane.

It says problem happens in a D-dimensional space. It denotes the point as X, the plane as (wT)x+b=0, where wT is the transpose of w (which is just a n-by-1 matrix I suppose), and requires me to use Lagrange to optimize the distance. The final result should be expressed with w, b and X. Without specific values I am really lost in how to approach such kind of problem. Any suggestions?

Best Answer

Let's review this in $\mathbb R^3$:

Consider any two points $(x,y,z)$ and $(a,b,c)$ in $\mathbb R^3$. The distance between them is

$D=\sqrt { (x-a)^{2}+(y-b)^{2}+(z-c)^{2}}$.

Now suppose $(a,b,c)$ is fixed and that $(x,y,z)$ lie in the plane $Ax+By+Cz=E$.

Your problem is to find the point(s) on the plane such that $D$ is minimum. One way to do it is by observing that at least one of the coefficients $A,B$ or $C$ is non-zero, so that you can solve for the corresponding variable, substitute into $D$ and use the second derivative test for functions of two variables.

If you are going to use Lagrange, then you use the fact that the equation of the plane provides the constraint equation; that is,

$g(x,y,z)=Ax+By+Cz-E$ so that, according to the method, you construct

$D(x,y,z,\lambda)=\sqrt { (x-a)^{2}+(y-b)^{2}+(z-c)^{2}}-\lambda g(x,y,z)$ which is just

$D(x,y,z,\lambda)=\sqrt { (x-a)^{2}+(y-b)^{2}+(z-c)^{2}}-\lambda (Ax+By+Cz-E)$.

and then you solve the system

$D_{x}(x,y,z,\lambda)=0;D_{y}(x,y,z,\lambda)=0;D_{z}(x,y,z,\lambda)=0;D_{\lambda}(x,y,z,\lambda)=0$

which gives you the possible extreme values for $D$.

For the corresponding problem in $\mathbb R^n$, simply note that here

$D(x_{1},\cdots ,x_{n})=\sqrt {\sum_{i=1}^{n}(x_{i}-a_{i})^{2}}$ and

$g(x_{1},\cdots ,x_{n})=\sum_{i=1}^{n}A_{i}x_{i}-E$

so you construct $D(x_{1},\cdots ,x_{n},\lambda )$ as before but now you have $n+1$ equations in $n+1$ unknowns to solve.