Convex set

A set is convex if it contains the line segment between any two of its points
Convex set

Let XX be a (typically over R\mathbb{R}). A set ΩX\Omega\subset X is convex if for all x,yΩx,y\in\Omega and all λ[0,1]\lambda\in[0,1] we have

λx+(1λ)yΩ. \lambda x+(1-\lambda)y\in \Omega.

Context. Equivalently, Ω\Omega is convex iff it contains every joining any two of its points. Convexity is the core geometric notion underlying convex analysis and optimization.

Examples:

  • Any affine subspace of Rn\mathbb{R}^n (e.g., a line or plane) is convex.
  • Any ball {x:xx0r}\{x:\|x-x_0\|\le r\} in a normed space is convex.
  • A halfspace {xRn:a,xb}\{x\in\mathbb{R}^n:\langle a,x\rangle\le b\} is convex.

Non-example.

  • The annulus {xR2:1<x<2}\{x\in\mathbb{R}^2:1<\|x\|<2\} is not convex: a segment between two points may pass through the “hole.”