The definition of a convex set is geometrically intuitive. But the definition of convex function doesn't seem so intuitive: $S \subset \mathbb{R}^n$ is convex if given $x,y\in S$ the line segment joining $x,y$ is in $S$.
Let $f$ be a real valued function from an open interval $I$. Consider the graph of $f$ in plane: set theoretically it is $$\{(x,f(x))\,|\, x\in I\}.$$ For any $a,b\in I$, consider the line joining $(a,f(a))$ and $(b,f(b))$. Then one of the following happens:
The line lies above the graph of $f$.
The line lies below the graph of $f$.
None of these hold.
Q. Suppose you know the definition of convex set and let $f:I\rightarrow \mathbb{R}$ be a function which does not satisfy (3). This means $f$ satisfies (1) or (2). What is intuition way to define function to be convex or concave?
For example, in Wikipedia, it says that a function is convex if graph above $f$ is convex. But if we are trying to give intuitive definition of convex function based on convex set, according to convexity of region above $f$ or below $f$, what is intuitive way to decide one of them?
Since $f$ is satisfying (1) or (2), so the words convex function and concave function are reserved for it; we can assign any word to any case without intuition. But, considering definition of convex set can we get intuition to define convex function? Note that almost everyone knows geometric explanation of the standard definition of convex function.