A convex set is a set in which every line segment connecting any two points in the set lies entirely within the set. Convex sets are foundational in optimization, geometry, and mathematical analysis.
A subset of Euclidean space such that a line drawn between any two points in the subset remains completely within the subset. For instance, the following two shapes are convex sets: !One illustration of a rectangle. Another illustration of an oval. In contrast, the following two shapes are not convex sets: !One illustration of a pie-chart with a missing slice. Another illustration of a wildly irregular polygon.