# Are these sets not convex?

Definition of convex set says: 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. From: Wikipedia-Convex Set.

But I have also heard that if a curve has a upward curvature then its convex otherwise its convex. Have a look at the following figure. The black line is the curve and the red shaded portion is the set. Also, in the second set, it has upward and downward curves.

Only one thing I can think of is: though both sets have downward pointing curves, their curvatures are still positive, am I correct? And can anybody please elaborate on this?

-
 $$"\mathsf{set}"\in\text{Question's formulation}\nrightarrow[\mathsf{set\textrm{-}theory}].$$ – Asaf Karagila Mar 5 at 2:40 Set theory gives me the creeps. – Lepidopterist Mar 5 at 2:41

Those sets are convex. What you may be thinking of is a convex function, defined as a function whose epigraph is a convex set: http://en.wikipedia.org/wiki/Convex_function.

A concave function is a function whose hypograph is a convex set.

-
 So, if a line segment lies in the domain for any two points but the graph of the function lies above those two points then its not convex. Am I right? – Parag Mar 5 at 2:19 Also, why the difference between the definitions of convex sets and convex functions? – Parag Mar 5 at 2:21 It makes sense, but I have never heard of the word hypograph... – copper.hat Mar 5 at 3:03 A function is convex iff epigraph is convex. A closed convex set can be associated with a convex function (its support functional). – copper.hat Mar 5 at 3:07