[Math] The shortest distance problem by using Gram-Schmidt Process

inner-productslinear algebra

I wish to find the shortest distance from the point $v=\langle1,1,2\rangle$ to the plane $x_1+x_2-x_3+1=0$, and it is obvious that the point $v$ is not on the plane.
I first find the basis of the plane, whose vectors are $\langle-1,0,0\rangle,\langle-1,1,0\rangle,\langle1,0,1\rangle$. Next I use the Gram-Schmidt Process to find the orthonormal basis, which is $v_1=\langle-1,0,0\rangle,v_2=\langle0,1,0\rangle,v_3=\langle0,0,1\rangle$. Then, the shortest distance vector is $$v'=v-\sum_{k=1}^3 \langle v,v_k\rangle.$$

However, I kept getting the result to be 0. I really do not know where went wrong. Any help, please.

Best Answer

The plane is $H = \{ x | \langle d, x \rangle = \alpha \}$, where $d=(1,1,-1)^T$, and $\alpha = -1$. Let $v = (1,1,2)^T$.

The nearest point on $H$ to $v$ can be found by solving $\langle d, v+\lambda d \rangle = \alpha$, which gives $\lambda = \frac{\alpha-\langle d, v \rangle}{\|d\|^2}$.

The shortest distance is given by $\|v-(v+\lambda d) \| = |\lambda| \|d \| = | \frac{\alpha-\langle d, v \rangle}{\|d\|} | = \frac{1}{\sqrt{3}}$.

Addendum: To see why this is basically the Gram Schmidt process (or part thereof):

Let $b_2,b_3$ be any two vectors such that $d,b_2,b_3$ span $\mathbb{R}^3$. Apply the Gram Schmidt process to get $n_1,n_2,n_3$. We have $n_1 = \frac{d}{\|d\|} $, of course, and since $n_2 \bot d$ and $n_3 \bot d$, we see that $n_2,n_3$ lie on the plane $\langle d , x \rangle = 0$. Furthermore, we see that the point $\frac{\alpha}{\|d\|} n_1$ lies on the plane $H$ above. Hence every point $p$ on the plane is give by $p=\frac{\alpha}{\|d\|} n_1 + \beta_2 n_2 + \beta_3 n_3$, where $\beta_i$ are arbitrary.

Now project $v$ onto $n_1,n_2,n_3$ to get $v = \gamma_1 n_1 + \gamma_2 n_2 + \gamma_3 n_3$. Then the distance (or rather distance squared) from $v$ to a point on the plane is given by $\|v-p\|^2 = |\gamma_1-\frac{\alpha}{\|d\|}|^2+ |\gamma_2-\beta_2|^2 + |\gamma_3-\beta_2|^2$, from which we see that the minimum distance (choosing $\beta_2, \beta_3$ appropriately) is $|\gamma_1-\frac{\alpha}{\|d\|}|$. Since $\gamma_1 = \langle v, n_1 \rangle = \langle v, \frac{d}{\|d\|} \rangle$, we obtain the value $| \frac{\alpha-\langle d, v \rangle}{\|d\|} |$ as above.

Since we do not need to compute the nearest point, we only need compute $\gamma_1$, hence we only need the first step of the Gram Schmidt process applied to $d$ followed by the projection of $v$ onto this first element.

Related Question