The Unapologetic Mathematician

Mathematics for the interested outsider

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


or (with a bit more effort) as


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!)


April 15, 2008 - Posted by | Analysis, Calculus


  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 Nicholas Wilson | May 14, 2011 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: