Proof that a function is convex if and only if its epigraph is convex.

Consider a function $f:\mathbb{R}^{n} \to \mathbb{R}$ and epi $f$ = {$(x,t) \in \mathbb{R}^{n+1}: x \in \mathbb{R}^{n}$, $t \geq f(x)$}

Can someone help prove this statement:

A function is convex if and only if its epigraph is a convex set.

Thank you.


Solution 1:

Put $\Gamma = \text{epi}(f)$. Suppose first that $f$ is convex, and let $(x_1, t_1), \dots, (x_n, t_n)\in \Gamma$. For any $\lambda_1, \dots, \lambda_n\in [0, 1]$ with $\sum \lambda_i = 1$, the point $(x, t) = \lambda_i \sum (x_i, t_i) = (\sum \lambda_i x_i, \sum \lambda_i t_i)$ has $$t = \sum \lambda_i t_i \geq \sum \lambda_i f(x_i) \geq f\left(\sum \lambda_i x_i\right) = f(x).$$ Hence $(x, t)\in \Gamma$, and $\Gamma$ is convex. The converse is entirely similar.