The SVM Margin Width: Why Does the Distance Equal 2/‖β‖?
You train a hard-margin linear SVM on a linearly separable dataset in . The decision boundary is , with the two class constraints:
Question: Support vectors of the positive class satisfy , and support vectors of the negative class satisfy .
(a) Show that the geometric margin (Euclidean distance between the two parallel hyperplanes and ) equals .
(b) Hence, explain intuitively why maximizing the margin is equivalent to minimizing , and why this turns into the clean convex problem:
(c) Surprise twist: If you rescale and (keeping the same decision boundary), what happens to the margin? And what happens to the constraint values ? What does this tell you about the role of the normalization ?
Answer: SVM Margin Width: Why 2/‖β‖?
Key Idea / Intuition
The SVM margin is just a Euclidean distance between two parallel hyperplanes. The key insight is that the functional margin (the value of ) is not scale-invariant — you can always rescale to make the constraints say anything you want. The SVM "pins" this freedom by canonically requiring that support vectors lie exactly on the level sets, which makes the geometric distance calculable as . Maximizing this distance is then equivalent to minimizing , giving a clean quadratic program.
Formal Proof / Solution
Part (a): The Margin Width
The two margin hyperplanes are:
Take any point on and project it onto . The unit normal to both hyperplanes is .
The signed distance from a point to the hyperplane is:
So the distance from to is:
This can also be seen concretely: if is a support vector on , then moving in the direction by distance gives a point on :
Part (b): Maximizing Margin ↔ Minimizing
Maximizing the margin over (subject to correct classification with functional margin ) is equivalent to:
The factor is a convenient constant for calculus (it kills the when differentiating), and the square is used because it's strictly convex and smooth, making the optimization problem a standard quadratic program with linear constraints:
This is convex, has a unique global minimum, and can be solved efficiently via Lagrange duality.
Part (c): The Surprise — Rescaling
If we replace , :
- The decision boundary is unchanged (just multiply through by 2).
- The geometric margin becomes — it halves!
- The constraint values become — the constraints are now more than satisfied.
The punchline: The constraint is a canonical normalization that removes the scale ambiguity. Without it, you could inflate arbitrarily while maintaining the same geometry. The constraint anchors the scale so that the functional margin of support vectors equals exactly , making a meaningful proxy for the inverse margin. This is sometimes called choosing the canonical separating hyperplane.
In other words: the SVM doesn't just find a separating hyperplane — it finds the unique representative in each equivalence class of rescaled hyperplanes, chosen so that the closest point has functional value exactly .
Source: The Elements of Statistical Learning, Hastie, Tibshirani & Friedman, 2nd ed., Section 12.2