Skip to content

Convex Set in Rn\mathbb{R}^n

Definition

A set C⊆RnC\subseteq\mathbb{R}^n is convex if for every x,y∈C\boldsymbol{x},\boldsymbol{y}\in C and every λ∈[0,1]\lambda\in[0,1],

λx+(1−λ)y∈C.\lambda \boldsymbol{x}+(1-\lambda)\boldsymbol{y}\in C.

Equivalently, the whole line segment between any two points of CC lies inside CC.


Interpretation

A convex set contains, with any two of its points, the whole straight segment between them. In optimization terms: moving in a straight line from one feasible point to another never leaves the feasible region.

Two shaded regions. Left: a convex set in which the segment between two points x and y stays inside. Right: a set with a dent, where part of the segment between x and y leaves the set.

In the left set the segment from x\boldsymbol{x} to y\boldsymbol{y} stays inside, and z\boldsymbol{z} is one of its points λx+(1−λ)y\lambda\boldsymbol{x}+(1-\lambda)\boldsymbol{y}. The right set has a dent, and part of the drawn segment runs outside it. One such segment proves that a set is not convex; convexity needs every pair of points.

Drag x\boldsymbol{x} and y\boldsymbol{y} inside the set and move λ\lambda: a set is convex when every such segment stays inside. Find a segment that leaves the L-shape.

As λ\lambda runs from 11 to 00, the point λx+(1−λ)y\lambda\boldsymbol{x}+(1-\lambda)\boldsymbol{y} moves along the segment from x\boldsymbol{x} to y\boldsymbol{y} (parametric representation of a line); the two weights are nonnegative and add up to 11. If a⊤x≤b\boldsymbol{a}^{\top}\boldsymbol{x}\le b and a⊤y≤b\boldsymbol{a}^{\top}\boldsymbol{y}\le b, then a⊤(λx+(1−λ)y)≤λb+(1−λ)b=b\boldsymbol{a}^{\top}(\lambda\boldsymbol{x}+(1-\lambda)\boldsymbol{y})\le\lambda b+(1-\lambda)b=b, so a half-space is convex, and so is every intersection of half-spaces, such as the feasible region of a linear program. Unions behave differently: two disjoint discs together are not convex.

In R\mathbb{R} a segment is an interval [x,y][x,y], which is why convexity of a function was defined on an interval. A convex function on Rn\mathbb{R}^n needs a convex domain for the same reason: f(λx+(1−λ)y)f(\lambda\boldsymbol{x}+(1-\lambda)\boldsymbol{y}) must be defined.

Convex sets need not be closed or bounded: an open ball, a half-space and Rn\mathbb{R}^n itself are convex.


Key Results


Examples

  • The set {(x,y) ⁣:x+y≤1}\{(x,y)\colon x+y\le 1\} is convex because it is a half-space.
  • The unit disk {(x,y) ⁣:x2+y2≤1}\{(x,y)\colon x^2+y^2\le 1\} is convex, but the unit circle {(x,y) ⁣:x2+y2=1}\{(x,y)\colon x^2+y^2=1\} is not.

Prerequisites

Sources

Aliases: convex set in rn, convex set Keywords: convex subset, line segment property Symbols: element of, lambda, real numbers, subset

Last updated: 20 October 2026 03:02