A convex set `S` is a set of points `P`_{1}, ... , P_{n} 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.
\________________/