Hyperplane separation theorem

{{short description|On the existence of hyperplanes separating disjoint convex sets}}

{{Infobox mathematical statement

| name = Hyperplane separation theorem

| image = File:Separating axis theorem2008.png

| caption = Illustration of the hyperplane separation theorem.

| type = Theorem

| field = {{plainlist|

}}

| statement =

| symbolic statement =

| conjectured by = Hermann Minkowski

| conjecture date =

| first stated by =

| first stated in =

| first proof by =

| first proof date =

| open problem = No

| known cases =

| implied by =

| equivalent to =

| generalizations = Hahn–Banach separation theorem

| consequences =

}}

In geometry, the hyperplane separation theorem is a theorem about disjoint convex sets in n-dimensional Euclidean space. There are several rather similar versions. In one version of the theorem, if both these sets are closed and at least one of them is compact, then there is a hyperplane in between them and even two parallel hyperplanes in between them separated by a gap. In another version, if both disjoint convex sets are open, then there is a hyperplane in between them, but not necessarily any gap. An axis which is orthogonal to a separating hyperplane is a separating axis, because the orthogonal projections of the convex bodies onto the axis are disjoint.

The hyperplane separation theorem is due to Hermann Minkowski. The Hahn–Banach separation theorem generalizes the result to topological vector spaces.

A related result is the supporting hyperplane theorem.

In the context of support-vector machines, the optimally separating hyperplane or maximum-margin hyperplane is a hyperplane which separates two convex hulls of points and is equidistant from the two.{{cite book |first1=Trevor |last1=Hastie |author-link=Trevor Hastie |first2=Robert |last2=Tibshirani |author-link2=Robert Tibshirani |first3=Jerome |last3=Friedman |author-link3=Jerome H. Friedman |title=The Elements of Statistical Learning : Data Mining, Inference, and Prediction |location=New York |publisher=Springer |edition=Second |year=2008 |pages=129–135 |url=https://web.stanford.edu/~hastie/Papers/ESLII.pdf#page=148 }}{{cite book |first1=Ian H. |last1=Witten |first2=Eibe |last2=Frank |first3=Mark A. |last3=Hall |first4=Christopher J. |last4=Pal |title=Data Mining: Practical Machine Learning Tools and Techniques |publisher=Morgan Kaufmann |year=2016 |edition=Fourth |pages=253–254 |isbn=9780128043578 |url=https://books.google.com/books?id=1SylCgAAQBAJ&pg=PA253 }}{{cite book |first1=Marc Peter |last1=Deisenroth |first2=A. Aldo |last2=Faisal |first3=Cheng Soon |last3=Ong |title=Mathematics for Machine Learning |publisher=Cambridge University Press |year=2020 |isbn=978-1-108-45514-5 |pages=337–338 }}

{{clear}}

Statements and proof

{{math_theorem|name=Hyperplane separation theorem{{harvnb|Boyd|Vandenberghe|2004|loc=Exercise 2.22.}}|Let A and B be two disjoint nonempty convex subsets of \R^n. Then there exist a nonzero vector v and a real number c such that

:\langle x, v \rangle \ge c \, \text{ and } \langle y, v \rangle \le c

for all x in A and y in B; i.e., the hyperplane \langle \cdot, v \rangle = c, v the normal vector, separates A and B.

If both sets are closed, and at least one of them is compact, then the separation can be strict, that is, \langle x, v \rangle > c_1 \, \text{ and } \langle y, v \rangle < c_2 for some c_1 > c_2

}}

In all cases, assume A, B to be disjoint, nonempty, and convex subsets of \R^n. The summary of the results are as follows:

class="wikitable"

|+summary table

! A

! B

! \langle x, v\rangle

! \langle y, v\rangle

|

| \geq c

| \leq c

closed compact

| closed

| > c_1

| < c_2 with c_2 < c_1

closed

| closed compact

| > c_1

| < c_2 with c_2 < c_1

open

|

| > c

| \leq c

open

| open

| > c

| < c

The number of dimensions must be finite. In infinite-dimensional spaces there are examples of two closed, convex, disjoint sets which cannot be separated by a closed hyperplane (a hyperplane where a continuous linear functional equals some constant) even in the weak sense where the inequalities are not strict.Haïm Brezis, Functional Analysis, Sobolev Spaces and Partial Differential Equations, 2011, Remark 4, p. 7.

Here, the compactness in the hypothesis cannot be relaxed; see an example in the section Counterexamples and uniqueness. This version of the separation theorem does generalize to infinite-dimension; the generalization is more commonly known as the Hahn–Banach separation theorem.

The proof is based on the following lemma:

{{math_theorem|name=Lemma|Let A and B be two disjoint closed subsets of \R^n, and assume A is compact. Then there exist points a_0 \in A and b_0 \in B minimizing the distance \|a - b\| over a \in A and b \in B.}}

{{Math proof|title=Proof of lemma|proof=

Let a\in A and b \in B be any pair of points, and let r_1 = \|b - a\|. Since A is compact, it is contained in some ball centered on a; let the radius of this ball be r_2. Let S = B \cap \overline{B_{r_1 + r_2}(a)} be the intersection of B with a closed ball of radius r_1 + r_2 around a. Then S is compact and nonempty because it contains b. Since the distance function is continuous, there exist points a_0 and b_0 whose distance \|a_0 - b_0\| is the minimum over all pairs of points in A \times S. It remains to show that a_0 and b_0 in fact have the minimum distance over all pairs of points in A \times B. Suppose for contradiction that there exist points a' and b' such that \|a' - b'\| < \|a_0 - b_0\|. Then in particular, \|a' - b'\| < r_1, and by the triangle inequality, \|a - b'\| \le \|a' - b'\| + \|a - a'\| < r_1 + r_2. Therefore b' is contained in S, which contradicts the fact that a_0 and b_0 had minimum distance over A \times S. \square

}}

File:Separating Hyperplanes Theorem.png

{{Math proof|title=Proof of theorem|proof= We first prove the second case. (See the diagram.)

WLOG, A is compact. By the lemma, there exist points a_0 \in A and b_0 \in B of minimum distance to each other.

Since A and B are disjoint, we have a_0 \neq b_0. Now, construct two hyperplanes L_A, L_B perpendicular to line segment [a_0, b_0], with L_A across a_0 and L_B across b_0. We claim that neither A nor B enters the space between L_A, L_B, and thus the perpendicular hyperplanes to (a_0, b_0) satisfy the requirement of the theorem.

Algebraically, the hyperplanes L_A, L_B are defined by the vector v:= b_0 - a_0, and two constants c_A := \langle v, a_0\rangle < c_B := \langle v, b_0\rangle, such that L_A = \{x: \langle v, x\rangle = c_A\}, L_B = \{x: \langle v, x\rangle = c_B\}. Our claim is that \forall a\in A, \langle v, a\rangle \leq c_A and \forall b\in B, \langle v, b\rangle \geq c_B.

Suppose there is some a\in A such that \langle v, a\rangle > c_A, then let a' be the foot of perpendicular from b_0 to the line segment [a_0, a]. Since A is convex, a' is inside A, and by planar geometry, a' is closer to b_0 than a_0, contradiction. Similar argument applies to B.

Now for the first case.

Approach both A, B from the inside by A_1 \subseteq A_2 \subseteq \cdots \subseteq A and B_1 \subseteq B_2 \subseteq \cdots \subseteq B, such that each A_k, B_k is closed and compact, and the unions are the relative interiors \mathrm{relint}(A), \mathrm{relint}(B). (See relative interior page for details.)

Now by the second case, for each pair A_k, B_k there exists some unit vector v_k and real number c_k, such that \langle v_k, A_k\rangle < c_k < \langle v_k, B_k\rangle.

Since the unit sphere is compact, we can take a convergent subsequence, so that v_k \to v. Let c_A := \sup_{a\in A} \langle v, a\rangle, c_B := \inf_{b\in B} \langle v, b\rangle. We claim that c_A \leq c_B, thus separating A, B.

Assume not, then there exists some a\in A, b\in B such that \langle v, a\rangle > \langle v, b\rangle, then since v_k \to v, for large enough k, we have \langle v_k, a\rangle > \langle v_k, b\rangle, contradiction.

}}

Since a separating hyperplane cannot intersect the interiors of open convex sets, we have a corollary:

{{math_theorem

| name = Separation theorem I|Let A and B be two disjoint nonempty convex sets. If A is open, then there exist a nonzero vector v and real number c such that

:\langle x, v \rangle > c \, \text{ and } \langle y, v \rangle \le c

for all x in A and y in B. If both sets are open, then there exist a nonzero vector v and real number c such that

:\langle x, v \rangle>c \, \text{ and } \langle y, v \rangle

for all x in A and y in B.

}}

Case with possible intersections

If the sets A, B have possible intersections, but their relative interiors are disjoint, then the proof of the first case still applies with no change, thus yielding:

{{math_theorem

| name = Separation theorem II|Let A and B be two nonempty convex subsets of \R^n with disjoint relative interiors. Then there exist a nonzero vector v and a real number c such that

:\langle x, v \rangle \ge c \, \text{ and } \langle y, v \rangle \le c

}}

in particular, we have the supporting hyperplane theorem.

{{Math theorem

| math_statement = if A is a convex set in \mathbb{R}^n, and a_0 is a point on the boundary of A, then there exists a supporting hyperplane of A containing a_0.

| name = Supporting hyperplane theorem

}}

{{Math proof|title=Proof|proof=

If the affine span of A is not all of \mathbb{R}^n, then extend the affine span to a supporting hyperplane. Else, \mathrm{relint}(A) = \mathrm{int}(A) is disjoint from \mathrm{relint}(\{a_0\}) = \{a_0\}, so apply the above theorem.

}}

Converse of theorem

Note that the existence of a hyperplane that only "separates" two convex sets in the weak sense of both inequalities being non-strict obviously does not imply that the two sets are disjoint. Both sets could have points located on the hyperplane.

Counterexamples and uniqueness

File:Separating axis theorem2.svg

If one of A or B is not convex, then there are many possible counterexamples. For example, A and B could be concentric circles. A more subtle counterexample is one in which A and B are both closed but neither one is compact. For example, if A is a closed half plane and B is bounded by one arm of a hyperbola, then there is no strictly separating hyperplane:

:A = \{(x,y) : x \le 0\}

:B = \{(x,y) : x > 0, y \geq 1/x \}.\

(Although, by an instance of the second theorem, there is a hyperplane that separates their interiors.) Another type of counterexample has A compact and B open. For example, A can be a closed square and B can be an open square that touches A.

In the first version of the theorem, evidently the separating hyperplane is never unique. In the second version, it may or may not be unique. Technically a separating axis is never unique because it can be translated; in the second version of the theorem, a separating axis can be unique up to translation.

The horn angle provides a good counterexample to many hyperplane separations. For example, in \R^2, the unit disk is disjoint from the open interval ((1, 0), (1,1)), but the only line separating them contains the entirety of ((1, 0), (1,1)). This shows that if A is closed and B is relatively open, then there does not necessarily exist a separation that is strict for B. However, if A is closed polytope then such a separation exists.

More variants

Farkas' lemma and related results can be understood as hyperplane separation theorems when the convex bodies are defined by finitely many linear inequalities.

More results may be found.{{Cite book |last=Stoer |first=Josef |url=https://link.springer.com/book/10.1007/978-3-642-46216-0 |title=Convexity and Optimization in Finite Dimensions I |last2=Witzgall |first2=Christoph |publisher=Springer Berlin, Heidelberg |year=1970 |isbn=978-3-642-46216-0 |at=(2.12.9) |language=en |doi=10.1007/978-3-642-46216-0}}

Use in collision detection

In collision detection, the hyperplane separation theorem is usually used in the following form:

{{math_theorem

| name = Separating axis theorem|Two closed convex objects are disjoint if there exists a line ("separating axis") onto which the two objects' projections are disjoint.

}}

Regardless of dimensionality, the separating axis is always a line.

For example, in 3D, the space is separated by planes, but the separating axis is perpendicular to the separating plane.

The separating axis theorem can be applied for fast collision detection between polygon meshes. Each face's normal or other feature direction is used as a separating axis. Note that this yields possible separating axes, not separating lines/planes.

In 3D, using face normals alone will fail to separate some edge-on-edge non-colliding cases. Additional axes, consisting of the cross-products of pairs of edges, one taken from each object, are required.{{Cite web|url=https://docs.godotengine.org/en/stable/tutorials/math/vectors_advanced.html#collision-detection-in-3d|title = Advanced vector math}}

For increased efficiency, parallel axes may be calculated as a single axis.

See also

Notes

{{reflist}}

References

  • {{cite book|title=Convex Optimization | first1=Stephen P. |last1=Boyd |first2=Lieven|last2=Vandenberghe|year=2004|publisher=Cambridge University Press|isbn=978-0-521-83378-3 | url=https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf }}
  • {{cite book

| last = Golshtein

| first = E. G.

|author2=Tretyakov, N.V.

| title = Modified Lagrangians and monotone maps in optimization

| publisher = New York: Wiley

| date = 1996

| isbn = 0-471-54821-9

| page = 6

}}

  • {{cite book

| last = Shimizu

| first = Kiyotaka |author2=Ishizuka, Yo |author3=Bard, Jonathan F.

| title = Nondifferentiable and two-level mathematical programming

| publisher = Boston: Kluwer Academic Publishers

| date = 1997

| isbn = 0-7923-9821-1

| page = 19

}}

  • {{cite book

| last = Soltan

| first = V.

| title = Support and separation properties of convex sets in finite dimension

| publisher = Extracta Math. Vol. 36, no. 2, 241-278

| year = 2021

}}