A convex set S is a set of points P1, ... , Pn such that for any two points x and y within S, all the points along the line segment between x and y are completely contained within S.
/ \ These boundaries enclose a convex set. This is because for
/ x---y \ any points x and y within the set, the line between them is
\ / completely included in the set.
\ _______ /
| | | | These boundaries define a non-convex set. Although
| x--|--------|--y | the points x and y are inside the set, the line between
\ |________| / them is not completely contained within the set.