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.

The left region is an ellipse, so every segment between its points stays inside. The right region is the union of the rectangles [−1.8,−0.2]×[−1.5,1.5][-1.8,-0.2]\times[-1.5,1.5] and [−0.2,1.8]×[−1.5,0.2][-0.2,1.8]\times[-1.5,0.2]. Both x=(−0.9,1)\boldsymbol{x}=(-0.9,1) and y=(1.3,−0.1)\boldsymbol{y}=(1.3,-0.1) lie in it, but their midpoint z=(0.2,0.45)\boldsymbol{z}=(0.2,0.45) lies in neither rectangle. This one segment proves that the right set is not convex; convexity needs every pair of points.

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: 27 October 2026 11:52