Prove feasible set is convex iff constraints are concave.

convex optimization

I am able to prove concave constraints imply convex feasible set. But not other way round. Is other way round true?
Given:
Feasible set S={$x:g_i(x)\ge 0 \forall i$} is convex. Show that the functions $g_i(x)$ is concave $\forall i$.

Take x, y in S. Then $g_i(x), g_i(y) \ge0 \forall i$ as they are feasible points. Also, $g_i(\alpha x+ (1-\alpha )y \ge 0 \forall i$ as S is convex. How to show $g_i 's$ are concave functions?

Best Answer

If you have one function $g_1(x) = x^2+1$, then $S = \mathbb{R}$ is convex but $g_1$ is not concave.

A less silly example: consider $g_1(x)=x^2 - 1$ and $g_2(x)=x-1$. Then $S=[1, \infty)$ is convex but $g_1$ is not concave.