[Math] Hyperplane equation intuition / geometric interpretation

geometric-interpretationgeometrylinear algebra

Hello I'm trying to get a geometric appreciation for this n-dimensional hyperplane equation :

$\frac{1}{\left\lVert \hat w \right\rVert} \times\ (\hat w \dot\ \hat x) – d = 0$

where:

  • x is a point on the hyperplane ($x_1,x_2,…,x_n$), if the equation is satisfied.
  • d is the distance of the hyperplane from the origin (more specifically the distance of the point that is on the intersection of the normal line to hyperplane).
  • w is the normal vector from the hyperplane

Now my question is where does this equation come from, how can I think of what is going on here geometrically?

The closest I have come to thinking where this comes from geometrically is that we are projecting $x$ onto $w$ and then we need to satisfy that the length of this projection is equal to $d$, but that would yield a different equation to this the above ie :

$Proj_\hat w \hat x = \frac{\hat w \dot\ \hat x}{\left\lVert \hat w \right\rVert^2} \times \hat w$

$Proj_\hat w \hat x = \frac{\left\lVert \hat w \right\rVert \dot\ \left\lVert \hat x \right\rVert \dot\ \cos \theta}{\left\lVert \hat w \right\rVert^2} \times \hat w$

$Proj_\hat w \hat x = \frac{\left\lVert \hat x \right\rVert \dot\ \cos \theta}{\left\lVert \hat w \right\rVert} \times \hat w$

I don't know where to go from this point, that is why I am not certain if that is actually what is going on geometrically with the first equation I provided.

If anybody could help me with this I would very appreciative as this problem has been taking me ages to figure out.

Best Answer

You have the right idea, but you started to go down a more difficult path than necessary. You are correct in interpreting the hyperplane equation as the set of all points (well, position vectors of those points) that have the same projection onto $\hat w$. So, start with this projection, as you did: $$\operatorname{Proj}_{\hat w}{\hat x}={\hat w\cdot\hat x\over\|\hat w\|^2}\hat w$$ and rearrange this slightly into $$\left({\hat w\cdot\hat x\over\|\hat w\|}\right){\hat w\over\|\hat w\|}.$$ The right-hand factor is simply a unit vector in the direction of $\hat w$ that I’ll call $\hat u$. Since $\|\hat w\|$ is a scalar, we can absorb it into the dot product in the numerator and write this expression more simply as $$(\hat u\cdot\hat x)\,\hat u.$$ The parenthesized quantity is a scalar whose absolute value is the length of the projection. Its sign tells you whether the projection is in the same direction as $\hat u$, and hence $\hat w$, (positive) or in the opposite direction (negative), so you could think of it as a signed length.

Observe that this parenthesized factor is exactly the first term in your hyperspace equation, so what that equation says is that for every point on the hyperplane, the signed length of the projection of its position vector onto $\hat w$ is equal to the fixed value $d$, i.e., its projection onto $\hat w$ is $d\hat u$. You can also see this by multiplying both sides of the equation by $\hat u$ and then rearranging and simplifying a bit: $$\begin{align}\left({\hat w\cdot\hat x\over\|\hat w\|}\right)\hat u-d\hat u&=0 \\ (\hat u\cdot\hat x)\,\hat u-d\hat u&=0 \\ (\hat u\cdot\hat x)\,\hat u=d\hat u.\end{align}$$ As for the geometric interpretation of the vector $\hat w$, observe first that $d\hat u$ itself satisfies the equation: $$(\hat u\cdot d\hat u)=d(\hat u\cdot\hat u)=d.$$ So, if $\hat x$ is any vector that satisfies the hyperplane equation, then the displacement vector from $d\hat u$ to $\hat x$ lies within the hyperplane, which means that $\hat x-d\hat u$ is parallel to the hyperplane. But $\hat x-d\hat u=\hat x-\operatorname{Proj}_{\hat w}{\hat x}$ is the orthogonal rejection of $\hat x$ from $\hat w$, which is perpendicular to $\hat w$, so $\hat w$ is itself perpendicular to the hyperplane (is normal to it). Finally, since $d\hat u$ is on the hyperplane and is perpendicular to it, we see that in your equation $d$ represents the (signed) distance of the hyperplane from the origin.

As a final observation, let’s move $d$ to the right-hand side and multiply through by $\|\hat w\|$: $$\hat w\cdot\hat x=\text{const}.$$ With this in hand, you can instantly write down an equation for the hyperplane if you have a normal vector $\hat w$ and any known point $x_0$ on the hyperplane. It’s simply $$\hat w\cdot\hat x=\hat w\cdot{\hat x}_0$$ or equivalently, $$\hat w\cdot(\hat x-{\hat x}_0)=0.$$ With the equation in this form, it should be obvious that $\hat w$ is perpendicular to the hyperplane. Incidentally, this gives you another path to deriving the equation. If you know that $\hat w$ is normal to the hyperplane, you could start from this last equation, which just states this normality condition, and work “backwards” by normalizing $\hat w$ and rearranging things.

Related Question