In geometry, the convex hull or convex envelope or convex closure of a shape is the smallest convex set that contains it. The convex hull may be defined either as the intersection of all convex sets containing a given subset of a Euclidean space, or equivalently as the set of all convex combinations of points in the subset. For a bounded subset of the plane, the convex hull may be visualized as the shape enclosed by a rubber band stretched around the subset.
The convex hull of the red set is the blue and red convex set.
Convex hulls of open sets are open, and convex hulls of compact sets are compact. Every compact convex set is the convex hull of its extreme points. The convex hull operator is an example of a closure operator, and every antimatroid can be represented by applying this closure operator to finite sets of points.
The algorithmic problems of finding the convex hull of a finite set of points in the plane or other low-dimensional Euclidean spaces, and its dual problem of intersecting half-spaces, are fundamental problems of computational geometry. They can be solved in time for two or three dimensional point sets, and in time matching the worst-case output complexity given by the upper bound theorem in higher dimensions.
For bounded sets in the Euclidean plane, not all on one line, the boundary of the convex hull is the simple closed curve with minimum perimeter containing . One may imagine stretching a rubber band so that it surrounds the entire set and then releasing it, allowing it to contract; when it becomes taut, it encloses the convex hull of . This formulation does not immediately generalize to higher dimensions: for a finite set of points in three-dimensional space, a neighborhood of a spanning tree of the points encloses them with arbitrarily small surface area, smaller than the surface area of the convex hull. However, in higher dimensions, variants of the obstacle problem of finding a minimum-energy surface above a given shape can have the convex hull as their solution.
For objects in three dimensions, the first definition states that the convex hull is the smallest possible convex bounding volume of the objects.
The definition using intersections of convex sets may be extended to non-Euclidean geometry, and the definition using convex combinations may be extended from Euclidean spaces to arbitrary real vector spaces or affine spaces; convex hulls may also be generalized in a more abstract way, to oriented matroids.
Equivalence of definitionsEdit
3D convex hull of 120 point cloud
It is not obvious that the first definition makes sense: why should there exist a unique minimal convex set containing , for every ? However, the second definition, the intersection of all convex sets containing , is well-defined. It is a subset of every other convex set that contains , because is included among the sets being intersected. Thus, it is exactly the unique minimal convex set containing . Therefore, the first two definitions are equivalent.
Each convex set containing must (by the assumption that it is convex) contain all convex combinations of points in , so the set of all convex combinations is contained in the intersection of all convex sets containing . Conversely, the set of all convex combinations is itself a convex set containing , so it also contains the intersection of all convex sets containing , and therefore the second and third definitions are equivalent.
In fact, according to Carathéodory's theorem, if is a subset of a -dimensional Euclidean space, every convex combination of finitely many points from is also a convex combination of at most points in . The set of convex combinations of a -tuple of points is a simplex; in the plane it is a triangle and in three-dimensional space it is a tetrahedron. Therefore, every convex combination of points of belongs to a simplex whose vertices belong to , and the third and fourth definitions are equivalent.
Upper and lower hullsEdit
In two dimensions, the convex hull is sometimes partitioned into two parts, the upper hull and the lower hull, stretching between the leftmost and rightmost points of the hull. More generally, for convex hulls in any dimension, one can partition the boundary of the hull into upward-facing points (points for which an upward ray is disjoint from the hull), downward-facing points, and extreme points. For three-dimensional hulls, the upward-facing and downward-facing parts of the boundary form topological disks.
The closed convex hull of is the intersection of all closed half-spaces containing .
If the convex hull of is already a closed set itself (as happens, for instance, if is a finite set or more generally a compact set), then it equals the closed convex hull. However, an intersection of closed half-spaces is itself closed, so when a convex hull is not closed it cannot be represented in this way.
If the open convex hull of a set is -dimensional, then every point of the hull belongs to an open convex hull of at most points of . The sets of vertices of a square, regular octahedron, or higher-dimensional cross-polytope provide examples where exactly points are needed.
Topologically, the convex hull of an open set is always itself open, and the convex hull of a compact set is always itself compact. However, there exist closed sets for which the convex hull is not closed. For instance, the closed set
The compactness of convex hulls of compact sets, in finite-dimensional Euclidean spaces, is generalized by the Krein–Smulian theorem, according to which the closed convex hull of a weakly compact subset of a Banach space (a subset that is compact under the weak topology) is weakly compact.
An extreme point of a convex set is a point in the set that does not lie on any open line segment between any other two points of the same set.
For a convex hull, every extreme point must be part of the given set, because otherwise it cannot be formed as a convex combination of given points.
According to the Krein–Milman theorem, every compact convex set in a Euclidean space (or more generally in a locally convex topological vector space) is the convex hull of its extreme points. However, this may not be true for convex sets that are not compact; for instance, the whole Euclidean plane and the open unit ball are both convex, but neither one has any extreme points. Choquet theory extends this theory from finite convex combinations of extreme points to infinite combinations (integrals) in more general spaces.
It is extensive, meaning that the convex hull of every set is a superset of .
It is non-decreasing, meaning that, for every two sets and with , the convex hull of is a subset of the convex hull of .
It is idempotent, meaning that for every , the convex hull of the convex hull of is the same as the convex hull of .
When applied to a finite set of points, this is the closure operator of an antimatroid, the shelling antimatroid of the point set.
Every antimatroid can be represented in this way by convex hulls of points in a Euclidean space of high-enough dimension.
The operations of constructing the convex hull and taking the Minkowski sum commute with each other, in the sense that the Minkowski sum of convex hulls of sets gives the same result as the convex hull of the Minkowski sum of the same sets. This provides a step towards the Shapley–Folkman theorem bounding the distance of a Minkowski sum from its convex hull.
The projective dual operation to constructing the convex hull of a set of points is constructing the intersection of a family of closed halfspaces that all contain the origin (or any other designated point).
Finite point setsEdit
Convex hull of points in the plane
The convex hull of a finite point set forms a convex polygon when , or more generally a convex polytope in . Each extreme point of the hull is called a vertex, and (by the Krein–Milman theorem) every convex polytope is the convex hull of its vertices. It is the unique convex polytope whose vertices belong to and that encloses all of .
For sets of points in general position, the convex hull is a simplicial polytope.
According to the upper bound theorem, the number of faces of the convex hull of points in -dimensional Euclidean space is . In particular, in two and three dimensions the number of faces is at most linear in .
Convex hull ( in blue and yellow) of a simple polygon (in blue)
The convex hull of a simple polygon encloses the given polygon and is partitioned by it into regions, one of which is the polygon itself. The other regions, bounded by a polygonal chain of the polygon and a single convex hull edge, are called pockets. Computing the same decomposition recursively for each pocket forms a hierarchical description of a given polygon called its convex differences tree. Reflecting a pocket across its convex hull edge expands the given simple polygon into a polygon with the same perimeter and larger area, and the Erdős–Nagy theorem states that this expansion process eventually terminates.
The curve generated by Brownian motion in the plane, at any fixed time, has probability 1 of having a convex hull whose boundary forms a continuously differentiable curve. However, for any angle in the range , there will be times during the Brownian motion where the moving particle touches the boundary of the convex hull at a point of angle . The Hausdorff dimension of this set of exceptional times is (with high probability) .
An oloid, the convex hull of two circles in 3d space
For the convex hull of a space curve or finite set of space curves in general position in three-dimensional space, the parts of the boundary away from the curves are developable and ruled surfaces. Examples include the oloid, the convex hull of two circles in perpendicular planes, each passing through the other's center, the sphericon, the convex hull of two semicircles in perpendicular planes with a common center, and D-forms, the convex shapes obtained from Alexandrov's uniqueness theorem for a surface formed by gluing together two planar convex sets of equal perimeter.
The convex hull or lower convex envelope of a function on a real vector space is the function whose epigraph is the lower convex hull of the epigraph of .
It is the unique maximal convex function majorized by . The definition can be extended to the convex hull of a set of functions (obtained from the convex hull of the union of their epigraphs, or equivalently from their pointwise minimum) and, in this form, is dual to the convex conjugate operation.
In computational geometry, a number of algorithms are known for computing the convex hull for a finite set of points and for other geometric objects.
Computing the convex hull means constructing an unambiguous, efficient representation of the required convex shape. Output representations that have been considered for convex hulls of point sets include a list of linear inequalities describing the facets of the hull, an undirected graph of facets and their adjacencies, or the full face lattice of the hull. In two dimensions, it may suffice more simply to list the points that are vertices, in their cyclic order around the hull.
For convex hulls in two or three dimensions, the complexity of the corresponding algorithms is usually estimated in terms of , the number of input points, and , the number of points on the convex hull, which may be significantly smaller than . For higher-dimensional hulls, the number of faces of other dimensions may also come into the analysis. Graham scan can compute the convex hull of points in the plane in time . For points in two and three dimensions, more complicated output-sensitive algorithms are known that compute the convex hull in time . These include Chan's algorithm and the Kirkpatrick–Seidel algorithm. For dimensions , the time for computing the convex hull is , matching the worst-case output complexity of the problem. The convex hull of a simple polygon in the plane can be constructed in linear time.
Dynamic convex hull data structures can be used to keep track of the convex hull of a set of points undergoing insertions and deletions of points, and kinetic convex hull structures can keep track of the convex hull for points moving continuously.
The construction of convex hulls also serves as a tool, a building block for a number of other computational-geometric algorithms such as the rotating calipers method for computing the width and diameter of a point set.
Several other shapes can be defined from a set of points in a similar way to the convex hull, as the minimal superset with some property, the intersection of all shapes containing the points from a given family of shapes, or the union of all combinations of points for a certain type of combination. For instance:
The affine hull is the smallest affine subspace of a Euclidean space containing a given set, or the union of all affine combinations of points in the set.
The linear hull is the smallest linear subspace of a vector space containing a given set, or the union of all linear combinations of points in the set.
The conical hull or positive hull of a subset of a vector space is the set of all positive combinations of points in the subset.
The visual hull of a three-dimensional object, with respect to a set of viewpoints, consists of the points such that every ray from a viewpoint through intersects the object. Equivalently it is the intersection of the (non-convex) cones generated by the outline of the object with respect to each viewpoint. It is used in 3D reconstruction as the largest shape that could have the same outlines from the given viewpoints.
The circular hull or alpha-hull of a subset of the plane is the intersection of all disks with a given radius that contain the subset.
The relative convex hull of a subset of a two-dimensional simple polygon is the intersection of all relatively convex supersets, where a set within the same polygon is relatively convex if it contains the geodesic between any two of its points.
The orthogonal convex hull or rectilinear convex hull is the intersection of all orthogonally convex and connected supersets, where a set is orthogonally convex if it contains all axis-parallel segments between pairs of its points.
The Delaunay triangulation of a point set and its dual, the Voronoi diagram, are mathematically related to convex hulls: the Delaunay triangulation of a point set in can be viewed as the projection of a convex hull in 
The alpha shapes of a finite point set give a nested family of (non-convex) geometric objects describing the shape of a point set at different levels of detail.
Each of alpha shape is the union of some of the features of the Delaunay triangulation, selected by comparing their circumradius to the parameter alpha. The point set itself forms one endpoint of this family of shapes, and its convex hull forms the other endpoint.
The convex layers of a point set are a nested family of convex polygons, the outermost of which is the convex hull, with the inner layers constructed recursively from the points that are not vertices of the convex hull.
The convex skull of a polygon is the largest convex polygon contained inside it. It can be found in polynomial time, but the exponent of the algorithm is high.
Partition of seven points into three subsets with intersecting convex hulls, guaranteed to exist for any seven points in the plane by Tverberg's theorem
Newton polygons of univariate polynomials and Newton polytopes of multivariate polynomials are convex hulls of points derived from the exponents of the terms in the polynomial, and can be used to analyze the asymptotic behavior of the polynomial and the valuations of its roots. Convex hulls and polynomials also come together in the Gauss–Lucas theorem, according to which the roots of the derivative of a polynomial all lie within the convex hull of the roots of the polynomial.
The definitions of a convex set as containing line segments between its points, and of a convex hull as the intersection of all convex supersets, apply to hyperbolic spaces as well as to Euclidean spaces. However, in hyperbolic space, it is also possible to consider the convex hulls of sets of ideal points, points that do not belong to the hyperbolic space itself but lie on the boundary of a model of that space. The boundaries of convex hulls of ideal points of three-dimensional hyperbolic space are analogous to ruled surfaces in Euclidean space, and their metric properties play an important role in the geometrization conjecture in low-dimensional topology. Hyperbolic convex hulls have also been used as part of the calculation of canonicaltriangulations of hyperbolic manifolds, and applied to determine the equivalence of knots.
A bagplot. The outer shaded region is the convex hull, and the inner shaded region is the 50% Tukey depth contour.
In robust statistics, the convex hull provides one of the key components of a bagplot, a method for visualizing the spread of two-dimensional sample points. The contours of Tukey depth form a nested family of convex sets, with the convex hull outermost, and the bagplot also displays another polygon from this nested family, the contour of 50% depth.
In geometric modeling, one of the key properties of a Bézier curve is that it lies within the convex hull of its control points. This so-called "convex hull property" can be used, for instance, in quickly detecting intersections of these curves.
In the geometry of boat and ship design, chain girth is a measurement of the size of a sailing vessel, defined using the convex hull of a cross-section of the hull of the vessel. It differs from the skin girth, the perimeter of the cross-section itself, except for boats and ships that have a convex hull.
The convex hull is commonly known as the minimum convex polygon in ethology, the study of animal behavior, where it is a classic, though perhaps simplistic, approach in estimating an animal's home range based on points where the animal has been observed.Outliers can make the minimum convex polygon excessively large, which has motivated relaxed approaches that contain only a subset of the observations, for instance by choosing one of the convex layers that is close to a target percentage of the samples, or in the local convex hull method by combining convex hulls of neighborhoods of points.
Convex hull of magnesium–carbon compounds. Mg2C3 is expected to be unstable as it lies above the lower hull.
A convex hull in thermodynamics was identified by Josiah Willard Gibbs (1873), although the paper was published before the convex hull was so named.
In a set of energies of several stoichiometries of a material, only those measurements on the lower convex hull will be stable. When removing a point from the hull and then calculating its distance to the hull, its distance to the new hull represents the degree of stability of the phase.
The lower convex hull of points in the plane appears, in the form of a Newton polygon, in a letter from Isaac Newton to Henry Oldenburg in 1676. The term "convex hull" itself appears as early as the work of Garrett Birkhoff (1935), and the corresponding term in German appears earlier, for instance in Hans Rademacher's review of Kőnig (1922). Other terms, such as "convex envelope", were also used in this time frame. By 1938, according to Lloyd Dines, the term "convex hull" had become standard; Dines adds that he finds the term unfortunate, because the colloquial meaning of the word "hull" would suggest that it refers to the surface of a shape, whereas the convex hull includes the interior and not just the surface.
Epstein, D. B. A.; Marden, A. (1987), "Convex hulls in hyperbolic space, a theorem of Sullivan, and measured pleated surfaces", in Epstein, D. B. A. (ed.), Analytical and geometric aspects of hyperbolic space (Coventry/Durham, 1984), London Mathematical Society Lecture Note Series, vol. 111, Cambridge: Cambridge University Press, pp. 113–253, MR 0903852
Escobar, Laura; Kaveh, Kiumars (September 2020), "Convex polytopes, algebraic geometry, and combinatorics" (PDF), Notices of the American Mathematical Society, 67 (8): 1116–1123, doi:10.1090/noti2137, S2CID 221659506
Fultz, Brent (April 2020), Phase Transitions in Materials, Cambridge University Press, p. 55, doi:10.1017/9781108641449
Gel'fand, I. M.; Kapranov, M. M.; Zelevinsky, A. V. (1994), "6. Newton Polytopes and Chow Polytopes", Discriminants, Resultants, and Multidimensional Determinants, Mathematics: Theory & Applications, Birkhäuser, pp. 193–213, doi:10.1007/978-0-8176-4771-1, ISBN 0-8176-3660-9, MR 1264417
Getz, Wayne M.; Wilmers, Christopher C. (2004), "A local nearest-neighbor convex-hull construction of home ranges and utilization distributions" (PDF), Ecography, Wiley, 27 (4): 489–505, doi:10.1111/j.0906-7590.2004.03835.x
Gibbs, Willard J. (1873), "A method of geometrical representation of the thermodynamic properties of substances by means of surfaces", Transactions of the Connecticut Academy of Arts and Sciences, 2: 382–404; reprinted in The Scientific Papers of J. Willard Gibbs, Vol. I: Thermodynamics, Longmans, Green, & Co., 1906, pp. 33–54
Harris, Bernard (1971), "Mathematical models for statistical decision theory" (PDF), Optimizing methods in statistics (Proc. Sympos., Ohio State Univ., Columbus, Ohio, 1971), pp. 369–389, MR 0356305
Hautier, Geoffroy (2014), "Data mining approaches to high-throughput crystal structure and compound prediction", in Atahan-Evrenk, Sule; Aspuru-Guzik, Alan (eds.), Prediction and Calculation of Crystal Structures: Methods and Applications, Topics in Current Chemistry, vol. 345, Springer International Publishing, pp. 139–179, doi:10.1007/128_2013_486, PMID24287952; see p. 143
Katoh, Naoki (1992), "Bicriteria network optimization problems", IEICE Trans. Fundamentals of Electronics, Communications and Computer Sciences, E75-A: 321–329
Kernohan, Brian J.; Gitzen, Robert A.; Millspaugh, Joshua J. (2001), "Analysis of animal space use and movements", in Millspaugh, Joshua; Marzluff, John M. (eds.), Radio Tracking and Animal Populations, Academic Press, ISBN 9780080540221
Kim, Sooran; Kim, Kyoo; Koo, Jahyun; Lee, Hoonkyung; Min, Byung Il; Kim, Duck Young (December 2019), "Pressure-induced phase transitions and superconductivity in magnesium carbides", Scientific Reports, 9 (1): 20253, Bibcode:2019NatSR...920253K, doi:10.1038/s41598-019-56497-6, PMC6934831, PMID31882982
Newton, Isaac (October 24, 1676), "Letter to Henry Oldenburg", The Newton Project, University of Oxford
Nicola, Piercarlo (2000), "General Competitive Equilibrium", Mainstream Mathematical Economics in the 20th Century, Springer, pp. 197–215, doi:10.1007/978-3-662-04238-0_16
Nilsen, Erlend B.; Pedersen, Simen; Linnell, John D. C. (2008), "Can minimum convex polygon home ranges be used to draw biologically meaningful conclusions?", Ecological Research, 23 (3): 635–639, doi:10.1007/s11284-007-0421-9, S2CID 30843551
Okon, T. (2000), "Choquet theory in metric spaces", Zeitschrift für Analysis und ihre Anwendungen, 19 (2): 303–314, doi:10.4171/ZAA/952, MR 1768994
Ottmann, T.; Soisalon-Soininen, E.; Wood, Derick (1984), "On the definition and computation of rectilinear convex hulls", Information Sciences, 33 (3): 157–171, doi:10.1016/0020-0255(84)90025-2
Prasolov, Victor V. (2004), "1.2.1 The Gauss–Lucas theorem", Polynomials, Algorithms and Computation in Mathematics, vol. 11, Springer, pp. 12–13, doi:10.1007/978-3-642-03980-5, ISBN 3-540-40714-6, MR 2082772
Pulleyblank, W. R. (1983), "Polyhedral combinatorics", in Bachem, Achim; Korte, Bernhard; Grötschel, Martin (eds.), Mathematical Programming: The State of the Art (XIth International Symposium on Mathematical Programming, Bonn 1982), Springer, pp. 312–345, doi:10.1007/978-3-642-68874-4_13
Rappoport, Ari (1992), "An efficient adaptive algorithm for constructing the convex differences tree of a simple polygon", Computer Graphics Forum, 11 (4): 235–240, doi:10.1111/1467-8659.1140235, S2CID 20137707
Schneider, Rolf (1993), Convex Bodies: The Brunn–Minkowski Theory, Encyclopedia of Mathematics and its Applications, vol. 44, Cambridge: Cambridge University Press, doi:10.1017/CBO9780511526282, ISBN 0-521-35220-7, MR 1216521
Sedykh, V. D. (1981), "Structure of the convex hull of a space curve", Trudy Seminara Imeni I. G. Petrovskogo (6): 239–256, MR 0630708, translated in Journal of Soviet Mathematics 33 (4): 1140–1153, 1986, doi:10.1007/BF01086114
Toussaint, Godfried (1986), "An optimal algorithm for computing the relative convex hull of a set of points in a polygon", Proceedings of EURASIP, Signal Processing III: Theories and Applications, Part 2, North-Holland, pp. 853–856
Williams, Jason; Rossignac, Jarek (2005), "Tightening: curvature-limiting morphological simplification", in Kobbelt, Leif; Shapiro, Vadim (eds.), Proceedings of the Tenth ACM Symposium on Solid and Physical Modeling 2005, Cambridge, Massachusetts, USA, June 13-15, 2005, ACM, pp. 107–112, doi:10.1145/1060244.1060257, hdl:1853/3736, S2CID 15514388
Worton, Bruce J. (1995), "A convex hull-based estimator of home-range size", Biometrics, 51 (4): 1206–1215, doi:10.2307/2533254, JSTOR 2533254
The Wikibook Algorithm Implementation has a page on the topic of: Convex hull