Quasiconvexity on R Is continuity of a function $f:\mathbf{R} \rightarrow \mathbf{R}$ a sufficient and necessary condition for quasi-convexity and quasi-concavity?
 A: The function $f: \mathbb{R}^n \rightarrow \mathbb{R}$ is said to be Quasi-convex function if its domain and all its sublevel sets as:
$$S_\alpha = \{\mathbf{x}| \mathbf{x}\in \text{dom}f, f(x) \leq \alpha\}$$
are convex sets for every $\alpha$. A quasiconvex function may not be continuous over the interior of its domain, however, a convex function must be continuous over its effective domain. Hence, continuity of $f$ is not sufficient nor necessary for a function to be Quasi-convex or Quasi-concave.
Moreover, for a continuous function $f$, it is quasi convex if and only if one of the conditions below would be satisfied:


*

*$f$ is non-increasing.

*$f$ is non-decreasing. 

*There is a point $x^\star \in \text{dom} f$ such that $f$ is non-increasing for $x < x^\star$ and $f$ is non-decreasing for $x > x^\star$ ($\implies x^\star$ is a global minimum).  

A: No, this doesn't hold in general. For example, $\sin(x)$ is continuous, but not quasiconvex ( nor quasiconcave ). If you plot $\sin(x)$ and a horizontal line $y=1/2$, the intervals of $x$ so that $\sin(x) < 1/2$ are disconnected. There is also an example on https://en.wikipedia.org/wiki/Quasiconvex_function.
A: No, continuity is neither sufficient nor necessary. First, consider that any continuous strictly concave function is not quasi-convex (resp. any continuous strictly convex function is not quasi-concave). Therefore, continuity is not sufficient for quasi-convexity or quasi-concavity. Furthermore, continuity is not necessary for quasi-convexity or quasi-concavity. Consider $f(x) = \lfloor x\rfloor$. This function is quasi-convex, as for $x, y\in \mathbb{R}$ (without loss of generality let $x < y$), $\lfloor \lambda x+(1-\lambda)y\rfloor\leq \lfloor y\rfloor$. Similarly, $f$ is quasi-concave, as $\lfloor \lambda x+(1-\lambda)y\rfloor\geq \lfloor x\rfloor$. However, $f$ is not continuous. More generally, any discontinuous monotonic function is both quasi-convex and quasi-concave.
