# how can we define convexity in one dimension?

Definition of a convex set. A set S in R^n is said to be convex if for each x1, x2 ∈ S, the line segment λx1 + (1-λ)x2 for λ ∈ (0,1) belongs to S. This says that all points on a line connecting two points in the set are in the set. My question is how can we define convexity in one dimension ?

In $\mathbb R$, the definition is the same and you can prove that it is equivalent to connexity, or simpler : $$A\subseteq\mathbb R\text{ is convex }\iff A\text{ is an interval}.$$
• @SimpleArt: Convexity says "the line segment between any two points is contained in the set". Since $\Bbb{R}$ is a line, a convex subset of $\Bbb{R}$ is itself a line segment, and therefore is an interval. – Will R Jul 27 '16 at 13:13
The formulas in your question(as edited) work perfectly well in $\mathbb{R}$. The collection of convex sets is the collection of intervals.
• Your formula works for ${\mathbb{R}}^{n}$. Set $n = 1$. – Jay Jul 27 '16 at 12:07