# The Unapologetic Mathematician

## Convex Functions are Continuous

Yesterday we defined a function $f$ defined on an open interval $I$ to be “convex” if its graph lies below all of its secants. That is, given any $x_1<x_2$ in $I$, for any point $x\in\left[x_1,x_2\right]$ we have

$\displaystyle f(x)\leq f(x_1)+\frac{f(x_2)-f(x_1)}{x_2-x_1}(x-x_1)$

which we can rewrite as

$\displaystyle\frac{f(x)-f(x_1)}{x-x_1}\leq\frac{f(x_2)-f(x_1)}{x_2-x_1}$

or (with a bit more effort) as

$\displaystyle\frac{f(x_2)-f(x_1)}{x_2-x_1}\leq\frac{f(x_2)-f(x)}{x_2-x}$

That is, the slope of the secant above $\left[x_1,x\right]$ is less than that above $\left[x_1,x_2\right]$, which is less than that above $\left[x,x_2\right]$. Here’s a graph to illustrate what I mean:

The slope of the red line segment is less than that of the green, which is less than that of the blue.

In fact, we can push this a bit further. Let $s$ be the function with takes a subinterval $\left[a,b\right]\subseteq I$ and gives back the slope of the secant over that subinterval:

$\displaystyle s(\left[a,b\right])=\frac{f(b)-f(a)}{b-a}$

Now if $\left[x_1,x_2\right]$ and $\left[x_3,x_4\right]$ are two subintervals of $I$ with $x_1\leq x_3$ and $x_2\leq x_4$ then we find

$s(\left[x_1,x_2\right])\leq s(\left[x_1,x_4\right])\leq s(\left[x_3,x_4\right])$

by using the above restatements of the convexity property. Roughly, as we move to the right our secants get steeper.

If $\left[a,b\right]$ is a subinterval of $I$, I claim that we can find a constant $C$ such that $\left|s(\left[x_1,x_2\right])\right|\leq C$ for all $\left[x_1,x_2\right]\subseteq\left[a,b\right]$. Indeed, since $I$ is open we can find points $a'$ and $b'$ in $I$ with $a'<a$ and $b<b'$. Then since secants get steeper we find that

$s(\left[a',a\right])\leq s(\left[x_1,x_2\right])\leq s(\left[b,b'\right])$

giving us the bound we need. This tells us that within $\left[a,b\right]$ we have $|f(x_2)-f(x_1)|\leq C|x_2-x_1|$ (the technical term here is that $f$ is “Lipschitz”, which is what Mr. Livshits kept blowing up about), and it’s straightforward from here to show that $f$ must be uniformly continuous on $\left[a,b\right]$, and thus continuous everywhere in $I$ (but maybe not uniformly so!)

### Like this:

Posted by John Armstrong | Analysis, Calculus

## 2 Comments	»

1. Nice blog you have here!

Indeed, for a convex function defined on an open I it needs to be continuous. The crucial part of the proof seems to be the existence of a’ and b’, which can fail if we consider cl(I), in which case the function can have a discontinuity at the boundary of the domain. Although it would be a fairly funky function, it would still be one.

Comment by rasha | November 19, 2009 | Reply

2. Not even that funky; it’s just a step discontinuity. We should require the convexity criterion to hold over a (non-compact) open set.

Comment by | May 14, 2011 | Reply

« Previous | Next »

## About this weblog

This is mainly an expository blath, with occasional high-level excursions, humorous observations, rants, and musings. The main-line exposition should be accessible to the “Generally Interested Lay Audience”, as long as you trace the links back towards the basics. Check the sidebar for specific topics (under “Categories”).

I’m in the process of tweaking some aspects of the site to make it easier to refer back to older topics, so try to make the best of it for now.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 38, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9385265111923218, "perplexity_flag": "head"}