# Prove that a set defined by concave functions on $R^n$ is convex

I've been trying to prove this statement the whole weekend...

Let $g_1,\dots,g_m$ be concave functions on $\mathbb{R}^n$. Prove that the set $S=\{x:g_i(x)\geq{0},\ i=1,\dots,m\}$ is convex.

-

Take $x,y\in S$ and $a\in [0,1]$ and $i\in\{1,\dots,m\}$. Then by concavity of $g_i$, $$g_i(ax+(1-a)y)\geq ag_i(x)+(1-a)g_i(y).$$ This quantity is non-negative, because so are $a$, $1-a$, $g_i(x)$ and $g_i(y)$. We conclude that $ax+(1-a)y\in S$, hence $S$ is convex.