What is the graphical intuition with the hyperplane $H = \{x\mid a^T x = b\}$ for a non-zero $b$?

40 Views Asked by At

Consider the hyperplane $H = \{x \mid a^T x = b\}$


When $b = 0$, the geometric meaning of the hyperplane is immediate:

You plot a vector $a$, and then everything that's perpendicular to it is your hyperplane. The end. This allow us to plot, for instance, the hyperplane in $\mathbb{R}^3$ quite easily.

Furthermore, the notion of the halfspace is trivial when $a^Tx = 0$. Because we can set $a^Tx = |a||x|\cos(\theta) = 0$ and adjust $\theta$ accordingly to yield $\geq 0$ or $\leq 0$.


But when $b$ is non-zero, I seem have a total collapse of graphical intuition.

This is because the set of $x$ which satisfies $a^Tx = b$ are not the ones perpendicular to $a$, and this $b$ shifts the graph in some mysterious way (especially in higher dimensions).

I understand that $a^Tx = b$ can be re-written as $a^T (x - z) = 0$ where $a^Tz = b$.

Then, generating a graph seems to be a tedious exercise:

  1. first, solve for $z$ from $a^Tz = b$. This generates non-unique solutions.
  2. plot $a^Tx = 0$ and obtain the set of $x$ that satisfies this equation. This is the easy step.
  3. finally, shift the set of $x$ in the direction of $-z$. This is not very intuitive what $x-z$ looks like in higher (more than 2) dimensions.

Is the plotting of a hyperplane supposed to be this tedious? It seems that a better way is to directly infer the hyperplane just by using the three variables $a, x, b$. At least, this can be done quite easily in 2D, where $b$ represents vertical shift in the $(x,y)$-plane.

Can anyone chime in whether if there is a better algorithmic method for understanding what $H = \{x\mid a^Tx = b\}$ looks like?

1

There are 1 best solutions below

2
On BEST ANSWER

We can rewrite the defining equation as $$ a^Tx = \frac{b}{\|a\|^2} a^Ta, $$ where $\|a\| = \sqrt{a^Ta}$. Moving everything to the left, as you mentioned in the question, we get $$ a^T(x - \frac{b}{\|a\|^2} a) = 0. $$

From this we see that the locus of the general equation with $b \neq 0$ is just the locus of the homogeneous equation (with $b = 0$) translated by $\frac{b}{\|a\|^2} a$. Since the locus of the homogeneous equation is a hyperplane perpendicular to $a$, the locus of the general equation is a hyperplane shifted by $b/\|a\|^2$ in a direction perpendicular to it (along the vector a). One can visualise this by thinking of a plane punctured by a rod (represented by vector $a$), and as we vary $b$, the plane slides along the rod.

A particularly simple case is the one where $\|a\| = 1$ (this is actually equivalent to the general case since it can be obtained by dividing the original equation by $\|a\|$). In this case we have $$ a^T(x - b a) = 0. $$ Since $a$ is now a unit vector, $b$ denotes the distance of the solution plane to the origin, i. e. the solution is the hyperplane perpendicular to $a$, with a distance $b$ to the origin.