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$


  • 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.

  • 1
    $\begingroup$ Please use MathJax instead of inline images for your equations. You can find a tutorial and quick reference here. $\endgroup$
    – amd
    Mar 7 '17 at 19:45
  • $\begingroup$ Also, it’s not usually a good idea to use $\cdot$ for two different kinds of multiplication in the same equation. It’s very easy to slip up and make a mistake because of that. $\endgroup$
    – amd
    Mar 7 '17 at 19:50

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.

  • $\begingroup$ Thanks, that really helps me understand this. But one thing though. how did you go from $\hat w \dot\ \hat x$ = const to $\hat w \dot\ \hat x = \hat w \dot\ \hat x_0$ sorry, I feel like it should be pretty obvious. $\endgroup$ Mar 8 '17 at 8:17
  • 1
    $\begingroup$ @user3458913 $\hat w\cdot\hat x$ has the same value for every point on the hyperplane. Two things that are equal to the same thing are equal to each other. $\endgroup$
    – amd
    Mar 8 '17 at 17:47
  • $\begingroup$ Right, I can clearly see now. $\endgroup$ Mar 8 '17 at 21:44

I like to write such an equation as $$ \frac{1}{\lVert n \rVert} n\cdot x = d \quad (*) $$ The vector $$ u = \frac{1}{\lVert n \rVert} n $$ is a unit vector normal to the hyperplane. Note that $-u$ is another unit normal vector of the hyperplane.

$(*)$ says that the part of $x$ in $u$ direction has length $d$.

If the hyperplane is a distance $d$ (or $-d$, depending on the choice of the normal vector) away from the origin, it means its closest point to the origin $x_0$ fulfills $$ x_0 = d \, e_r $$ where $e_r$ is a unit normal vector starting at the origin. Then $$ \lVert x_0 \rVert = \lvert d \rvert \lVert e_r \rVert = \lvert d \rvert $$ as it should. If we insert this into equation $(*)$, we get $$ \frac{1}{\lVert n \rVert} n\cdot (d \, e_r) = \left( \frac{1}{\lVert n \rVert} d \right) (n\cdot e_r) = \left( \frac{1}{\lVert n \rVert} d \right) \lVert n \rVert = d $$ so the equation makes sense.

A hyperplane has a dimension one less than the vector space and $$ n \cdot x = \lVert n \rVert d $$ is a general linear equation in the unknown $x$, so the resulting affine subspace has dimension one less than the vector space.

The points within the hyperplane have the form : $$ x = x_0 + \sum_{i=1}^{n-1} x_i b_i = x_0 + x_\parallel $$ where the $b_i$ are a $n-1$-dimensional basis. Then $$ \frac{1}{\lVert n \rVert} n\cdot \left(x_0 + \sum_{i=1}^{n-1} x_i b_i \right) =\frac{1}{\lVert n \rVert} n\cdot x_0 + \frac{1}{\lVert n \rVert} \sum_{i=1}^{n-1} x_i (n \cdot b_i) = \frac{1}{\lVert n \rVert} n\cdot x_0 = d $$

enter image description here

  • $\begingroup$ Ah okay, thanks for that answer - but I still stuggle to see how this works geometrically, and further, how does this work for $x$ rather than just $x_0$ $\endgroup$ Mar 7 '17 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.