Math behind the minimum distance between point and the hyperplane

664 Views Asked by At

enter image description here In the figure, I tried to indicate a straight line as a hyperplane which is denoted by pi. And the equation of the hyperplane is w^t.x = 0. Here hyperplane is passing through the origin point.

Could anyone help to prove how the minimum distance d between the point and the plane is?

d = w^t.P / ||w||

What I tried is written below:

I got from a tutorial that vector w = w^t. I am not sure how both would be equal to each other. Please help me here, How they are equal?

Now, if w = w^t, then we can write

w^t.P = ||w||.||P||.cos(theta)

=> ||P|| = w^t.P / ||w||.cos(theta)

As ||P|| = d then, => d = w^t.P / ||w|| cos(theta)

cos(theta) remain in the equation. Which I don't know how to eliminate.

3

There are 3 best solutions below

5
On

Let's denote a vector from the origin $0$ to the point $P$ as $p$, i.e. $p = \overrightarrow{0P}$. Let's denote as $P_{\pi}$ the projection (point) of $P$ onto the plane $\Pi$ (and $p_{\pi}$ it's corresponding vector from the origin).

What do we know?

  1. The vector from $P_{\pi}$ to $P$ is parallel to $w^T$ so $p - p_{\pi} = \lambda w^T \iff p_{\pi} = p - \lambda w^T$ for some constant $\lambda$. Note: if $|| w^T || =1$ then $\lambda$ is your distance $d$.
  2. $p_{\pi}$ is orthogonal to $w^T$ ($w^T$ is a vector normal to the plane $\Pi$). This means: $$ \langle p_{\pi}, \lambda w^T \rangle = 0 $$
  3. You can assume the inner product to be the dot product, i.e. $\langle a, b \rangle = a^Tb $

Use (1) and (2) to find $\lambda$. Assuming $|| w^T || = 1$ it is your answer. Otherwise: $$ d = || \lambda w^T || = \lambda || w^T || $$

2
On

we can write

w^t.P = ||w||.||P||.cos(theta)

...

cos(theta) remain in the equation. Which I don't know how to eliminate.

You know that $\Vert P \Vert \text{cos}(\theta) = d$ because the the three points (origin, the point $P$ and the projection of $P$) make a right-angled triangle.

(this is a bit indirect argument, you will have to prove that the shortest vector from $P$ to the plane, is perpendicular to the plane)

$$w^t \cdot P = \Vert w \Vert \underbrace{\Vert P \Vert \text{cos}(\theta)}_{=d} = \Vert w \Vert d $$

Btw, the image below (from this question here, the same as yours but a 2d hyperplane) might show the situation more clearly. It depicts the cases for multiple points $P$ and each time the shortest vector from P to the plane points into the same direction and is perpendicular to the plane.

illustration for a small sample size

0
On

enter image description here I solved the equation and add an image with the solution. I hope people who were answering my question could give a glance, whether I did any mistake or not.

Thank you