In this blog post, I will talk about concepts of continuity and convexity. In particular, I will illustrate one important relationship between these two properties a function may have. All of my definitions and references will be from Rudin’s *Principles of Mathematical Analysis*. First, some definitions follow:

**Definition:** Suppose and are metric spaces, , , and maps into . Then is said to be *continuous* at if for every , there exists some such that

for every point satisfying .

**Remark: **In the above definition, and denote metrics (or *distance function)* for metric spaces and , respectively. If function is continuous at every point , we say that is *continuous on* , or simply say is continuous when the domain of definition is clear from context.

Since we are going to focus on real-valued functions that are defined on intervals, we might as well give definition of continuity for this particular case.

**Definition:** A function is said to be *continuous*, if for every and , there exists such that

for all points satisfying .

**Definition**: A function is said to be *convex*, if for every and

Geometrically this means that for a convex function, the line connecting points and lies *above* the graph of on . Some examples of convex functions would be , , etc.

It is rather a remarkable fact that every real-valued convex function on is continuous on . (I won’t show the proof of this). It turns out that there is a partial converse to this statement, and this blog post will aim to prove the following result

Proposition: If is continuous, and

then is convex.

There is name for a function that satisfies the above property:

**Definition:** A function is called *midpoint convex* if for all

In other words, mid-point convexity is just a special case when one uses in the definition of convexity. It trivially follows that every convex function is midpoint convex. (the converse is actually not true). So, the proposition basically states that every continuous midpoint convex function is convex. Here is a proof of proposition:

*Proof:* Assume, to the contrary, that the function is not convex. Then, there exists some subinterval such that graph of (restricted to ) is *not* under the chord joining and . Now, define

and let . Since we are assuming is not convex, we must have . Observe that is continuous (since is continuous). It is easy to verify that is also midpoint convex. Let . Since and , we must have . It follows that for any satisfying we get

which implies that

which contradicts the fact that is midpoint convex. ∎