What is a convex set? An object is convex if for every pair of points within the object, every point on the straight line segment that joins them is also within the object. Mathematically, we can define a convex set as follows.
- C is a convex set if: αx+(1-α)y ∈ C, ∀ α ∈ [0,1], ∀ x,y ∈ C.
In other words, this means that if we connect any two elements in the set C with a straight line, all the points on the strait line must also be contained within the set.
Let us use an example of U.S. states. We can consider a state a ‘convex state’ if we can drive in a strait line between any two places in the state and never leave the state. Let us look at this map of Colorado. Let us look at the two lines connecting Denver with Grand Junction and the other connecting Fort Collins with Colorado Springs. We see that when we drive in a straight line between any two cities in Colorado, we will never leave the state.
On the other hand look at the following maps of Texas. You can see that if we drive in a straight line from El Paso to Amarillo, we will pass through New Mexico. Similarly, if we drive from New Orleans to Monroe, Louisiana, we will pass through Mississippi. Thus, neither Texas nor Louisiana can be considered convex states.