{
  "id": "convex-hull",
  "title": "Convex Hull",
  "lang": "en",
  "source_lang": "en",
  "summary": "The convex hull of a set is the smallest convex set containing it, equivalently the set of all finite convex combinations of its points.",
  "category": "mathematics",
  "subcategory": "geometry",
  "type": "concept",
  "aliases": [
    "Convex envelope of a set"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/convex-hull/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/convex-hull/",
      "json": "https://aiwiki.page/zh/convex-hull.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The convex hull of a set of points is the smallest convex set containing them. In Euclidean space, convexity means that the entire line segment between any two points of a set also belongs to the set. For a finite collection of points in the plane, the convex hull can be visualized as the region enclosed by a taut rubber band stretched around the outermost points. The hull includes the enclosed region, not merely its boundary. (cs.princeton.edu)"
    },
    {
      "heading": "Definition and mathematical representation",
      "text": "Let \\(S\\) be a subset of a real vector space. Its convex hull, written \\(\\operatorname{conv}(S)\\), is\n\n\\[\\operatorname{conv}(S) = \\left\\{ \\sum_{i=1}^{m}\\lambda_i x_i \\;\\middle|\\; m\\geq 1,\\; x_i\\in S,\\; \\lambda_i\\geq 0,\\; \\sum_{i=1}^{m}\\lambda_i=1 \\right\\}.\\]\n\nEach expression in this definition is a convex combination: a weighted average whose weights are nonnegative and sum to one. Only finite combinations are required, even when \\(S\\) is infinite. Equivalently,\n\n\\[\\operatorname{conv}(S) = \\bigcap_{\\substack{C\\supseteq S\\\\ C\\text{ convex}}}C.\\]\n\nThus “smallest” refers to containment: every convex set containing \\(S\\) also contains \\(\\operatorname{conv}(S)\\). (stanford.edu)\n\nFor a finite set \\(S=\\{p_1,\\ldots,p_n\\}\\subseteq\\mathbb R^d\\), place the points in the columns of a matrix \\(P\\). Membership in the hull can then be expressed as\n\n\\[x=P\\lambda,\\qquad \\lambda_i\\geq 0,\\qquad \\mathbf 1^{T}\\lambda=1.\\]\n\nConsequently, testing whether a specified point belongs to a finite convex hull is a feasibility problem in linear programming. This follows directly from the convex-combination representation. (stanford.edu)"
    },
    {
      "heading": "Geometry and finite point sets",
      "text": "A nonempty finite convex hull is a convex polytope, or equivalently a bounded polyhedron. Its dimension need not equal that of the ambient space: collinear points in three dimensions still produce a segment, while coplanar points produce a planar hull. (stanford.edu)\n\nTypical examples include:\n\n- A single point, whose hull is that point.\n- Two distinct points, whose hull is their connecting segment.\n- Three noncollinear planar points, whose hull is the filled triangle they determine.\n- A finite noncollinear planar set, whose hull is a filled convex polygon.\n\nFor a finite planar set, an algorithm commonly represents the hull by listing its vertices in clockwise or counterclockwise order, rather than explicitly representing every point in the enclosed region. (ti.inf.ethz.ch)\n\nAn extreme point of a convex set is a point that cannot lie strictly between two distinct points of that set. The extreme points of a finite convex hull are its vertices. A boundary point lying in the middle of an edge is therefore not a vertex; software interfaces must distinguish between reporting extreme points and reporting every input point on the boundary. CGAL’s planar hull routines, for example, return the extreme points in counterclockwise order. (doc.cgal.org)"
    },
    {
      "heading": "Carathéodory’s theorem and closure",
      "text": "Carathéodory’s theorem states that every point in the convex hull of a subset of \\(\\mathbb R^d\\) can be expressed as a convex combination of at most \\(d+1\\) points of that subset. Thus three points suffice for any individual point in a planar hull, and four suffice in three-dimensional space. This does not mean that the entire hull has at most \\(d+1\\) vertices: different points may require different subsets. The proof reduces a longer representation by exploiting dependence among the vectors \\((x_i,1)\\), adjusting the coefficients until one becomes zero. (web.mit.edu)\n\nConvex hulls also require care concerning closure. The hull of a compact subset of \\(\\mathbb R^d\\) is compact, but the hull of a closed set need not be closed. The closed convex hull is \\(\\overline{\\operatorname{conv}(S)}\\), which may contain additional limit points. These distinctions disappear for finite sets, whose hulls are compact. (web.mit.edu)\n\nFor a compact set, the convex hull is also the intersection of all closed half-spaces containing the set. Each half-space is bounded by a hyperplane and retains one side of it. This supplies a description through inequalities, complementary to the description through convex combinations. (ti.inf.ethz.ch)"
    },
    {
      "heading": "Algorithms and historical development",
      "text": "Computing finite convex hulls is a central problem in computational geometry. For planar input, let \\(n\\) denote the number of input points and \\(h\\) the number of hull vertices. Algorithms differ in how they organize the points and whether their running time depends on the output size. (cs.jhu.edu)\n\nGraham scan, introduced by Ronald Graham in 1972, first sorts points by their direction from an extreme point, then scans them while maintaining a candidate boundary. Points creating an inward turn are removed. Sorting takes \\(O(n\\log n)\\) time and the subsequent scan takes linear time. The method was an early optimal planar hull algorithm. (cs.princeton.edu)\n\nAndrew’s monotone-chain algorithm sorts points lexicographically by coordinates, then builds lower and upper chains. Like Graham scan, it has \\(O(n\\log n)\\) running time, but avoids sorting by polar angle. (algs4.cs.princeton.edu)\n\nJarvis march, or gift wrapping, repeatedly selects the next supporting edge, examining the input points at each step. Its running time is \\(O(nh)\\), making it attractive when the hull has few vertices. Chan’s algorithm, published in 1996, combines hulls of smaller groups with wrapping to achieve \\(O(n\\log h)\\) time in two and three dimensions. This is an output-sensitive bound: the amount of work reflects the size of the answer as well as the input. (cs.jhu.edu)\n\nIn higher dimensions, the output includes facets and their adjacency relations, not just an ordered polygon. Qhull implements Quickhull-based construction for multidimensional hulls and related geometric structures. (qhull.org)"
    },
    {
      "heading": "Orientation tests and numerical robustness",
      "text": "Planar hull algorithms commonly use an orientation test for three points \\(a,b,c\\):\n\n\\[D=(b_x-a_x)(c_y-a_y) -(b_y-a_y)(c_x-a_x).\\]\n\nThis determinant is positive for a counterclockwise turn, negative for a clockwise turn, and zero for collinearity. It enables comparisons of directions without explicitly computing angles or trigonometric functions. (cs.princeton.edu)\n\nWith floating-point arithmetic, nearly collinear or coplanar points can produce unreliable signs because of rounding error. An incorrect geometric decision can corrupt the hull’s connectivity, producing inverted facets or inconsistent adjacency. Robust implementations may use exact predicates, merge nearly coplanar facets, or perturb the input slightly; these approaches have different implications for the output. Perturbation, in particular, computes a hull of modified coordinates rather than the exact original data. (qhull.org)\n\nRepeated points and lower-dimensional input are additional implementation cases. An interface that expects a full-dimensional polyhedron cannot treat a segment or planar hull as an ordinary three-dimensional solid without special handling. CGAL’s planar routines explicitly accommodate empty, singleton, and segment hulls. (doc.cgal.org)"
    },
    {
      "heading": "Applications and limitations",
      "text": "In mathematical optimization, hulls provide descriptions of feasible mixtures of finitely many alternatives. They also connect geometry with linear separability: two nonempty finite point classes can be strictly separated by a hyperplane exactly when their convex hulls are disjoint. The distance between the hulls appears in the geometric interpretation of maximum-margin classification and support vector machines. (stanford.edu)\n\nConvex hulls are closely related to Delaunay triangulation. Lifting points from \\(\\mathbb R^d\\) onto the paraboloid\n\n\\[(x_1,\\ldots,x_d) \\longmapsto (x_1,\\ldots,x_d,x_1^2+\\cdots+x_d^2)\\]\n\nallows the Delaunay structure to be recovered from the lower convex hull in one additional dimension. Half-space intersection is likewise related to hull construction through polar duality. (qhull.org)\n\nA hull deliberately discards nonconvex detail: it fills indentations and gaps and does not preserve the arrangement of interior points. It is therefore an enclosing representation, not a reconstruction of an arbitrary shape. Large dimensionality creates a separate representational difficulty. For example, the \\(d\\)-dimensional cube needs only \\(2d\\) defining inequalities but has \\(2^d\\) vertices, so its inequality and vertex descriptions can differ exponentially in size. (cs.princeton.edu)"
    }
  ],
  "links": [
    "convex-set",
    "euclidean-space",
    "vector-space",
    "convex-combination",
    "matrix",
    "linear-programming",
    "polyhedron",
    "closure-topology",
    "closed-set",
    "half-space",
    "hyperplane",
    "computational-geometry",
    "time-complexity",
    "determinant",
    "floating-point-arithmetic",
    "mathematical-optimization",
    "linear-separability",
    "support-vector-machine",
    "delaunay-triangulation"
  ],
  "sources": [
    {
      "title": "Convex Hulls",
      "url": "https://www.cs.princeton.edu/courses/archive/spr10/cos226/demo/ah/ConvexHull.html"
    },
    {
      "title": "Convex Optimization",
      "url": "https://www.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf"
    },
    {
      "title": "Computational Geometry, CG 2012",
      "url": "https://ti.inf.ethz.ch/ew/lehre/CG13/lecture/cg-2012.pdf"
    },
    {
      "title": "Convex Analysis and Optimization Lecture Slides",
      "url": "https://web.mit.edu/dimitrib/OldFiles/www/Convex_Slides_2014.pdf"
    },
    {
      "title": "CGAL — 2D Convex Hulls and Extreme Points: User Manual",
      "url": "https://doc.cgal.org/latest/Convex_hull_2/index.html"
    },
    {
      "title": "ApproxDecompShapes.pdf",
      "url": "https://www.cs.princeton.edu/~chazelle/pubs/ApproxDecompShapes.pdf"
    },
    {
      "title": "Convex Hull",
      "url": "https://algs4.cs.princeton.edu/99hull/"
    },
    {
      "title": "Optimal Output-Sensitive Convex Hull Algorithms in Two and Three Dimensions",
      "url": "https://www.cs.jhu.edu/~misha/Spring20/Chan96.pdf"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}