[Math] How to understand the equation for a hyperplane

geometrylinear algebra

I'm currently studying convex optimization using the Boyd's Convex Optimization. I'm studying about hyperplanes and their equations and had trouble understanding how exactly the hyperplane equation is to be interpreted. I read this answer and this answer and they are great answers no doubt, but I am still having trouble understanding the equation.

The definition of a hyperplane given by Boyd is the set

$$\{x\ |\ a^Tx = b\}\ (a \in \Bbb{R}^n,\ b \in \Bbb{R})$$

The explanation given is that this equation is "the set of points with a constant inner product to a given vector $a$ and the constant $b \in \Bbb{R}$ determines the offset of the hyerplane from the origin."

I am trying to understand the equation by using real values and visualizing it but am having trouble doing so. I'm not even sure if this is mathematically acceptable. For example, let's say that:

$$
a = \begin{bmatrix}2\\2\end{bmatrix},\
x = \begin{bmatrix}x_1\\x_2\end{bmatrix} \in \Bbb{R}^2
$$

and

$$b = 3$$

then $2x_1 + 2x_2 = 3$ draws a line which I assumed is a hyperplane.

Is this interpretation correct? If it is, this doesn't make sense because the "offset from the origin" in this case is clearly not $3$, yet $b = 3$.

Best Answer

Your interpretation is correct. The actual distance to the origin will be given by $$\frac{|b|}{||a||},$$ so in your example the distance to the origin is $\frac{3}{2\sqrt{2}}$.

When $b$ is positive the offset is in the direction of $a$, and when $b$ is negative the offset is in the direction of $-a$.