In another blogpost I wrote about convexity from an abstract point of view. Recall, that convex functions ${f:X\rightarrow Y}$ can be defined as soon as we have a real linear structure on ${X}$ and an order on ${Y}$ as this allows to formulate the basic requirement for a convex function, namely that for all ${x,y\in X }$ and ${0\leq\lambda\leq 1}$ it holds that $\displaystyle f(\lambda x + (1-\lambda)y)\leq \lambda f(x) + (1-\lambda)f(y).$

One amazing thing about convexity is, that it implies some regularity for the function. Indeed, you’ll find something on the net if you search for “convexity implies continuity”. But wait. How can that be? We have a mapping ${f}$ from a vector space ${X}$ to some ordered space ${Y}$ (which I will always assume to be ${{\mathbb R}\cup\{\infty\}}$ here, i.e. the extended real line) and we did not specify any topology on ${X}$ (while the extended real line carries its usual order topology). Indeed, one can equip a vector space with a lot of different topologies so how can it be that some property like convexity, which is expressed in purely algebraical terms, implies something like continuity, which is topological property? The answer is, that it is not really true that “convexity implies continuity”. The correct statement is a bit more subtle:

A convex function is Lipschitz continuous at any point where it is locally bounded.

Ok, here we have something more: We need boundedness of ${f}$, but this is still related to ${Y}$ and not related to ${X}$. But there is this little word “locally” and this is the point where some topology on ${X}$ comes into play. Let’s assume that we have even a metric on ${X}$ so that we can talk about balls. Then, the statement reads as:

A convex function ${f}$ is Lipschitz continuous at a point ${x}$ if there exists a ${C>0}$ and ${r>0}$ such that ${|f(y)|\leq C}$ for ${y\in B_r(x)}$.

Put differently: The continuity of a convex function ${f}$ depends on the boundedness of ${f}$ on neighborhoods. Consequently, if we change the topology, we change the set of neighborhoods and hence, a fixed convex function may have different continuity behavior in different topologies. This does indeed happen. Consider the following extreme example: Let ${x_0\in X}$ and $\displaystyle f(x) = \begin{cases} 0 & x=x_0\\ \infty & \text{else.} \end{cases}$

This function is convex but, for the norm-topology, not continuous at any point. Also, it is not locally bounded at any point. However, if we change the topology such that each point is its own neighborhood (that is, we take the discrete metric), than we get local boundedness and also continuity of ${f}$.