Why is the Weight Vector orthgonal to the Separating Hyperplane?
February 22, 2024 / 4 min read
Last Updated: February 24, 2024What is a Hyperplane?
In a
We are all familar with a hyperplane in 2D, which is just a line. In mathematical lingo, we call it a flat one-dimensional subspace. In 3D, a hyperplane is a flat two-dimensional subspace, which is just a plane.
Mathematically, a hyperplane is defined by the equation:
where
Let's visualize a hyperplane in 3D space with random
Now interestingly, the weight vector of the hyperplane is orthogonal to the hyperplane. I have seen numerous discussions on why this is the case, but I don't think they are quite doing a rigorous job/as intuitive as they could be.
It's Affine, not Linear
So why is the weight vector orthogonal to the hyperplane? Note we can generally write the equation of a hyperplane as:
Where
The interesting part here is
To see what a rigorous definition of hyperplane is needed here, let's first follow Stack Exchange's answers.
Suppose we have two points defined on the hyperplane,
Subtracting these two equations gives us
Noticed anything strange?
Let's reconsider the problem with rigorous setups. We have vectors
Final Proof
Now by the dot product definition of vectors, with a new vector
But notice that in defining our hyperplane
Have a wonderful day.
– Frank
Visualizing separability in high-dimensional space