Compact set in R that is not convex?

5.1k Views Asked by At

Just need an example. For example, the I know the set [0,1] is compact because it is obviously closed and bounded. But I have no idea how to test for convexity

3

There are 3 best solutions below

7
On BEST ANSWER

For example $K=[0,1]\cup[2,3]$. It is not convex, because the interval $[1,2]\not\subset K$, although its end are in $K$.

0
On

A set is in $\mathbb{R}^n$ is convex if and only if the line segment between any two points in the set is contained within the set. In $\mathbb{R}$, that just means the set is connected, or in other words an interval. Any compact set that is not connected is not convex.

0
On

Convex sets are connected. The only connected subsets of the line are intervals. The only compact connected subsets of the line are closed bounded intervals (including single points). Plenty of subsets of the line are compact but not convex (just take two points).