A convex set is a set of vectors that contains all line segments between vectors in the set. Consider the following shape:
As shown, a line segment between two points and in this shape lies entirely within the shape. In fact, this is true for any pair of points in the set. Therefore, the set of points in this shape is convex. For comparison, the following shape is not convex:
The fact that part of the line segment between and (both inside the shape) lies outside the shape proves that this set is not convex.
Formally, a set is convex if