A hyperplane is a subspace whose dimension is one less than that of its ambient space. If a space is 3-dimensional then its hyperplanes are the 2-dimensional planes, while if the space is 2-dimensional, its hyperplanes are the 1-dimensional lines. This notion can be used in any general space in which the concept of the dimension of a subspace is defined (Wikipedia).
Let \(\vec{w}\) be a normal vector to the hyperplane, \(d\) the vertical distance from the origin to the hyperplane, and \(\vec{x}\) be a vector pointing to some arbitrary location on the hyperplane. This situation is illustrated in the figure below for a 2-dimensional space, where the hyperplane is just a line:
For all vectors \(\vec{x}\) pointing to the hyperplane, we get the following expression for the scalar product of \(\vec{x}\) and \(\vec{w}\):
\[ \vec{x} \cdot \vec{w} = \| \vec{x} \| \cdot \| \vec{w} \| \cdot \cos \theta = \Vert \vec{x} \Vert \cdot \| \vec{w} \|\cdot \frac{d}{ \| \vec{x} \|} = \| \vec{w} \| \cdot d \]
If the normal vector \(\vec{w}\) is a unit vector, i.e. \(\|\vec{w}\|=1\), the scalar product yields the vertical distance \(d\) from the origin to the hyperplane.
If we set \(b = - \| \vec{w} \| \cdot d\), we can define the hyperplane by the formula
\[ \vec{x} \cdot \vec{w} + b = 0 \]
Here, \(\vec{w}\) is a normal vector to the hyperplane with length \(\| \vec{w} \|\), and \(b\) is the negative distance of the hyperplane to the origin multiplied by the length of the normal vector.
This equation can be established for all vectors \(\vec{x}\) that point to the hyperplane, i.e. the hyperplane is defined through \(\vec{w}\) and \(b\) as a set of points \(\vec{x}\) such that \(\vec{x} \cdot \vec{w} + b = 0\).
Note that this formula is scale-invariant, i.e. the coefficients \(\vec{w}\) and \(b\) can be multiplied with a scalar without changing the location in space of the hyperplane.
For a 2-dimensional space, we show here that the hyperplane formula is equivalent to the well-known formula \(y = m \cdot x + n\) :
Starting with \(\vec{x} \cdot \vec{w} + b = 0\), we can resolve the scalar product to obtain \(x_1 \cdot w_1 + x_2 \cdot w_2 + b = 0\).
Renaming \(y = x_2\) and \(x = x_1\) yields \(x \cdot w_1 + y \cdot w_2 + b = 0\), so that dividing by \(w_2\), renaming the coefficients \(m = -\frac{w_1}{w_2}\) , and \(n = - \frac{b}{w_2}\) leads to the desired result.
Mail: Uwe Menzel
Website: matstat.org