A real valued function $f$ defined in $(a,b)$ is said to be convex if

$$f(\lambda x+(1-\lambda)y)\le \lambda f(x)+(1-\lambda)f(y)$$

whenever $a < x < b,\; a < y < b,\; 0< \lambda <1$.

Prove that every convex function is continuous.Usually it uses the fact:

If $a < s < t < u < b$ then $$\frac{f(t)-f(s)}{t-s}\le \frac{f(u)-f(s)}{u-s}\le\frac{f(u)-f(t)}{u-t}.$$I wonder whether any other version of this proof exists or not?

**Answer**

The pictorial version. (But it is the same as your inequality version, actually.)

Suppose you want to prove continuity at $a$. Choose points $b,c$ on either side. (This fails at an endpoint, in fact the result itself fails at an endpoint.)

By convexity, the $c$ point is above the $a,b$ line, as shown:

Again, the $b$ point is above the $a,c$ line, as shown:

The graph lies inside the red region,

so obviously we have continuity at $a$.

**Attribution***Source : Link , Question Author : cowik , Answer Author : GEdgar*