Convex Polygon

Geometry

A convex polygon has all interior angles less than 180 degrees, with every diagonal lying entirely inside the figure.

Definition

A convex polygon has no "dents" or inward-pointing corners. All corners point outward. If you stretched a rubber band around the shape, it would touch every side.

Example

A square, triangle, regular hexagon, and stop sign are all convex polygons. An arrow or star shape has dents and is NOT convex. A convex polygon always looks like it "bulges out."

Key Insight

The rubber band test is perfect: if a rubber band stretched around the outside touches every single vertex, the polygon is convex. If the rubber band "skips over" any vertex (because it is pushed inward), the polygon is concave.

Definition

A convex polygon has all interior angles less than $180^\circ$, and every line segment connecting two interior points lies entirely inside the polygon. Equivalently, all diagonals lie inside the polygon. All regular polygons are convex. The exterior angle sum is exactly $360^\circ$.

Example

A regular pentagon is convex: all interior angles $= 108^\circ < 180$. An arrowhead (with one reflex interior angle $> 180^\circ$) is concave. For any convex polygon, the shoelace formula gives positive area when vertices are listed counterclockwise.

Key Insight

Convex polygons have many nice properties lost for concave ones: all diagonals are inside, triangulation is easy, the centroid (average of vertices) is inside, and algorithms (like convex hull) are simpler. Convexity is the key assumption in many optimization theorems.

Definition

A polygon $P$ is convex iff for all points $A, B$ in $P$, the segment $AB$ is entirely in $P$. Equivalently, $P$ is the intersection of half-planes. The convex hull of a set of points is the smallest convex polygon containing all the points. In $\mathbb{R}^2$, the vertices of a convex polygon are exactly the extreme points of the convex hull.

Example

Given points $(0,0), (1,0), (0,1), (0.5, 0.5)$: convex hull is the triangle with vertices $(0,0), (1,0), (0,1)$ because $(0.5, 0.5)$ lies inside. Convex hull algorithms (Graham scan, Jarvis march) find this in $O(n \log n)$ time.

Key Insight

Convexity is foundational in optimization: a function minimized over a convex polygon attains its minimum at a vertex. This is the fundamental theorem of linear programming (simplex method). Convex polygons generalize to convex polytopes in higher dimensions, which are the feasible regions of linear programs.