# How to visualise a 3 dimensional separating hyperplane of infinite volume

When thinking of a classification problem with one dimensional features, where the aim is to create a classifier h(x), we can imagine the separating hyperplane to be a line that separates 2 classes. This splits the plane into 2 regions of infinite volume.

Similarly, with 2 features (say height and weight of a person), it's easy to think of a plane that divides space into 2 parts with infinite volume.

How can we define a 3 dimensional shape that divides space into 2 equal (volume?) parts?

• In 1-dim case, you use points not lines. In 2D, you use lines, and in 3D you use planes to separate between classes. In order to search for 3D hyperplane, you data need to be in 4D. So, I didn't get your question. – gunes Dec 23 '18 at 7:17
• You're right, I should rephrase the question for clarity. – rahs Dec 23 '18 at 7:26
• With 1 feature (1 dim. space) how can a plane arrive in that space? – ttnphns Dec 23 '18 at 8:18

If your data lies $$n$$-dimensional space, hyperplanes will be $$n-1$$ dimensional. That is why in 1D it is point, in 2D it is line, in 3D it is plane etc., as pointed out in the comments. So, you should think accordingly and rephrase your question again.
A general equation for hyperplanes is $$w^Tx+b=0$$. For 1-D, we'll have $$wx+b=0 \rightarrow x=-b/w$$, a point. In 2D, this becomes $$w_1x_1+w_2x_2=b$$, which is a line equation. If you are seeking for a 3D hyperplane, which is a 3D shape with non-zero/infinite volume, it can easily be defined with four coordinates as follows: $$w_1x_1+w_2x_2+w_3x_3+w_4x_4=b$$, since the data lies in 4D.
I think, trying to visualize it directly in 3D doesn't make sense, because $$n$$ dimensional hyperplanes are visualized in $$n+1$$ dimensions. For example, you don't visualize lines in 1D, and planes in 2D. Line borders are meaningful inside a 2D plane, and plane borders are meaningful inside a 3D space. However, you can visualize some cuts through the 4D space, e.g. letting $$x_4=c$$, visualizing $$w_1x_1+w_2x_2+w_3x_3=b-w_4c$$ and by changing $$x_4$$, you could trace how this hyper-plane move through the 4D space. If you, for example, think the fourth dimension as time, you could trace your hyperplane's movements through time inside a video.