Prove that a convex function on $\mathbb{R}^n$ is continuous Let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be a convex function on $\mathbb{R}^n$. How to prove that $f$ is continuous?
 A: $\def\R{\mathbb R}\def\conv{\operatorname{conv}}$Note first, that a convex function is locally bounded: Let $x_0 \in \R^n$, and define $U := \conv\{x_0 \pm e_i \mid 1 \le i \le n\}$, then $U$ is a neighbourhood of $x_0$, given $x \in U$, there are $\lambda_{i,\pm}\ge 0$ with $\sum_{i=1}^n \lambda_{i,+} + \lambda_{i,-} = 1$ and $x = \sum_i \lambda_{i,+}(x_0+e_i) + \lambda_{i,-}(x_0 -e_i)$, convexity of $f$ gives 
\begin{align*}
  f(x) &\le \sum_i \lambda_{i,+}f(x_0 + e_i) + \lambda_{i,-}f(x_0 - e_i)\\
       &\le \max\{f(x_0 \pm e_i)\mid 1 \le i \le n\}.
\end{align*}
Hence $f$ is locally bounded above. Now let $x \in U$, then $x_0 - (x-x_0)\in U$ and 
\[ f(x_0) \le \frac 12 f(x) + \frac 12 f(x- 2x_0) \iff 
     f(x) \ge 2f(x_0) - f(x-2x_0)
\]
Hence, if $M$ denotes the upper bound of $f$ on $U$, $2f(x_0) - M$ is a lower bound. 
So, $f$ is locally bounded, now we will show, that it is locally Lipschitz (and hence, continuous): Let $x_0 \in \mathbb R^n$. By the above, there is an $\epsilon > 0$, such that $|f| \le M$ on $U_{\epsilon}(x_0)$. We will show, that $f$ is Lipschitz on $U_{\epsilon/2}(x_0)$. Suppose not, then there were $x_1, x_2 \in U_{\epsilon/2}(x_0)$ with
\[
  \frac{\|f(x_1) - f(x_2)\|}{\|x_2 - x_1\|} > \frac {4M}\epsilon \|x_2 - x_1\|
\]
Let $x_3 := x_2 + \frac \epsilon2\frac{x_2 - x_1}{\|x_2 - x_1\|}$, then $x_3 \in U_\epsilon(x_0)$ and $x_1$, $x_2$, $x_3$ are on one line, and $\|x_2 -x_3\| = \frac \epsilon 2$. Hence
\[
  \frac{f(x_3) - f(x_2)}{\|x_3 - x_2\|} \ge \frac{f(x_2) - f(x_1)}{\|x_2 - x_1\|} > \frac {4M}{\epsilon} \]
So $f(x_3) - f(x_2) > 2M$, contradicting $|f| \le M$.
