In Euclidean space, an object is convex if for every pair of points within the object, every point on the straight line segment that joins them is also within the object. For example, a solid cube is convex, but anything that is hollow or has a dent in it, for example, a crescent shape, is not convex.
The convex subsets of R (the set of real numbers) are simply the intervals of R. Some examples of convex subsets of Euclidean 2-space are regular polygons and bodies of constant width. Some examples of convex subsets of Euclidean 3-space are the Archimedean solids and the Platonic solids. The Kepler-Poinsot polyhedra are examples of non-convex sets.
The intersection of any collection of convex sets is itself convex, so the convex subsets of a (real or complex) vector space form a complete lattice. This also means that any subset A of the vector space is contained within a smallest convex set (called the convex hull of A), namely the intersection of all convex sets containing A.
Closed convex sets can be characterised as the intersections of closed half-spaces (sets of point in space that lie on and to one side of a hyperplane). From what has just been said, it is clear that such intersections are convex, and they will also be closed sets. To prove the converse, i.e., every convex set may be represented as such intersection, one needs the supporting hyperplane theorem in the form that for a given closed convex set C and point P outside it, there is a closed half-space H that contains C and not P. The supporting hyperplane theorem is a special case of the Hahn-Banach theorem of functional analysis.
The notion of convexity in the Euclidean space may be generalized by modifying the definition in some or other aspects. The common name "generalized convexity" is used, because the resulting objects retain certain properties of convex sets.
An example of generalized convexity is orthogonal convexity.
A set S in the Euclidean space is called orthogonally convex or orthoconvex, if any segment parallel to any of the coordinate axes connecting two points of S lies totally within S. It is easy to prove that an intersection of any collection of orthoconvex sets is orthoconvex. Some other properties of convex sets are valid as well.
See "Orthogonal convex hull" for more.
The notion of convexity may be generalised to other objects, if certain properties of convexity are selected as axioms.
Given a set X, a convexity over X is a collection of subsets of X satisfying the following axioms:
The elements of are called convex sets and the pair (X, ) is called a convexity space. For the ordinary convexity, the first two axioms hold, and the third one is trivial.