# 9.13. Continuity#

This section focuses on topological properties of convex functions in normed linear spaces. In particular, we discuss closure of convex functions, continuity of convex functions at interior points.

Main references for this section are [6, 17, 67].

Throughout this section, we assume that $$\VV$$ is a finite dimensional real normed linear space equipped with a norm $$\| \cdot \| : \VV \to \RR$$. It is also equipped with a metric $$d(\bx, \by) = \| \bx - \by \|$$. Wherever necessary, it is also equppied with an real inner product $$\langle \cdot, \cdot \rangle : \VV \times \VV \to \RR$$.

We recall that a function $$f : \VV \to \RR$$ is $$L$$-Lipschitz if

$| f(\bx) - f(\by) | \leq L \| \bx - \by \| \Forall \bx, \by \in \VV.$

The concept of semicontinuity, inferior and superior limits and closedness of real valued functions in metric spaces is discussed in detail in Real Valued Functions.

We recall some results.

Let $$f : \VV \to \RR$$ with $$S = \dom f$$ be a function.

Let $$\ba$$ be an accumulation point of $$S$$. The limit superior of $$f$$ at $$\ba$$ is defined by

$\limsup_{\bx \to \ba } f(\bx) = \inf_{\delta > 0} \sup_{\bx \in B_d(\ba,r) \cap S} f(\bx).$

The limit inferior of $$f$$ at $$\ba$$ is defined by

$\liminf_{\bx \to \ba } f(\bx) = \sup_{\delta > 0} \inf_{\bx \in B_d(\ba,r) \cap S} f(\bx).$

$$f$$ is lower-semicontinuous at $$\ba \in S$$ if for every $$\epsilon > 0$$, there exists $$\delta > 0$$ such that

$f(\ba) - \epsilon < f(\bx) \text{ for every } \bx \in B(\ba, \delta) \cap S.$

$$f$$ is upper-semicontinuous at $$\ba \in S$$ if for every $$\epsilon > 0$$, there exists $$\delta > 0$$ such that

$f(\bx) < f(\ba) + \epsilon \text{ for every } \bx \in B(\ba, \delta) \cap S.$

We say that $$f$$ is lower semicontinuous (l.s.c.) if $$f$$ is l.s.c. at every point of $$S$$. Similarly, we say that $$f$$ is upper semicontinuous (u.s.c.) if $$f$$ is u.s.c. at every point of $$S$$.

$$f$$ is continuous at $$\ba \in S$$ if and only if $$f$$ is l.s.c. as well as u.s.c. at $$\ba$$.

Let $$\ba \in S$$ be an accumulation point of $$S$$. Then, $$f$$ is lower semicontinuous at $$\ba$$ if and only if

$\liminf_{\bx \to \ba} f(\bx) \geq f(\ba).$

Similarly, $$f$$ is upper semicontinuous at $$\ba$$ if and only if

$\limsup_{\bx \to \ba}f(\bx) \leq f(\ba).$

Let $$\ba \in S$$. Then, $$f$$ is l.s.c. at $$\ba$$ if and only if for every sequence $$\{\bx_n \}$$ of $$S$$ that converges to $$\ba$$,

$\liminf_{n \to \infty} f(\bx_n) \geq f(\ba).$

Similarly, $$f$$ is upper semicontinuous at $$\ba$$ if and only if every sequence $$\{\bx_k \}$$ of $$S$$ that converges to $$\ba$$,

$\limsup_{n \to \infty}f(\bx_n) \leq f(\ba).$

The following conditions are equivalent.

1. $$f$$ is l.s.c.

2. $$f$$ is closed; i.e., every sublevel set of $$f$$ is closed with respect to the subspace topology $$(S, \| \cdot \|)$$.

3. $$\epi f$$ is closed in $$\VV \oplus \RR$$.

## 9.13.1. Closure#

Definition 9.63 (Closure of a convex function)

Let $$f : \VV \to \RR$$ be a convex function. Then, its closure is defined to be the lower semicontinuous hull of $$f$$.

If $$g$$ is the closure of $$f$$, then

$\epi g = \closure \epi f.$

If $$f: \VV \to \RERL$$ is a proper convex function, then also, its closure is defined to be the lower semicontinuous hull.

If $$f: \VV \to \ERL$$ is an improper convex function which attains a value $$f(\bx) = -\infty$$ at some $$\bx \in \VV$$, then its closure is defined to be the constant function $$g(\bx) = -\infty$$ for all $$\bx \in \VV$$.

The closure of a convex function is denoted by $$\closure f$$.

Theorem 9.172 (Closure of a convex function is convex)

The closure of a convex function is convex.

Proof. Let $$f$$ be a convex function. Then, $$\epi f$$ is convex. Let $$g$$ be its closure.

1. If $$f$$ is improper, then $$g$$ is a constant function, hence convex.

2. Otherwise, $$\epi g = \closure \epi f$$.

3. Since $$f$$ is convex, hence $$\epi f$$ is convex.

4. Due to Theorem 9.123, the closure of a convex set is convex.

5. Hence, $$\epi g$$ is convex.

6. Hence, $$g$$ is convex.

Definition 9.64 (Closed convex function)

A convex function $$f: \VV \to \ERL$$ is called closed if

$\closure f = f.$

For a proper convex function, closedness is same as lower semicontinuity.

The only closed improper convex functions are

1. $$f(\bx) = \infty \Forall \bx \in \VV$$. Here $$\epi f = \EmptySet$$.

2. $$f(\bx) = -\infty \Forall \bx \in \VV$$. Here $$\epi f = \VV \times \RR$$.

Example 9.62 (Closed convex function with open domain)

Let $$f: \RR \to \RERL$$ be given as

$\begin{split} f(x) = \begin{cases} \frac{1}{x}, & x > 0\\ \infty, & x \leq 0. \end{cases} \end{split}$

Then, $$\dom f = (0, \infty)$$.

1. $$\dom f$$ is an open interval in $$\RR$$.

2. $$f$$ is continuous at every $$x > 0$$.

3. Thus, $$f$$ is l.s.c. at every $$x > 0$$.

4. Thus, $$f$$ is l.s.c.

5. Let the sublevel set for $$r \in \RR$$ be given by

$T_r = \{ x \in (0, \infty) \ST f(x) \leq r \}.$
6. We can see that $$T_r = \EmptySet$$ for $$r \leq 0$$.

7. For $$r > 0$$,

$f(x) = \frac{1}{x} \leq r \iff x \geq \frac{1}{r}.$
8. Thus, $$T_r = [\frac{1}{r}, \infty)$$.

9. $$T_r$$ is indeed closed in the topology $$(\dom f, | \cdot |)$$.

10. Since $$f$$ is l.s.c., hence $$\epi f$$ is closed.

11. Thus, $$\closure f = f$$.

12. Thus, $$f$$ is a closed convex function.

Remark 9.11 (Closure of proper convex functions and epigraph)

Let $$f: \VV \to \RERL$$ be a proper convex function. Then,

$\epi \closure f = \closure \epi f.$

This follows from the definition, since $$g = \closure f$$ is defined by the fact that

$\epi g = \closure \epi f.$

## 9.13.2. Continuity#

Recall from Definition 3.38 that a function $$f: \VV \to \RERL$$ is continuous at a point $$\ba \in \dom f$$ if for every $$\epsilon > 0$$, there exists $$\delta > 0$$ (depending on $$\epsilon$$ and $$\ba$$) such that for every $$\bx \in \dom f$$

$\| \bx - \ba \| < \delta \implies | f(\bx) - f(\ba) | < \epsilon$

holds true. In other words,

$| f(\bx) - f(\ba) | < \epsilon \text{ for every } \bx \in B(\ba, \delta) \cap S.$

Convex functions are not necessarily continuous on non-open sets.

Example 9.63 (A convex function which is not continuous)

Let $$f : \RR \to \RR$$ be given by

$\begin{split} f(x) = \begin{cases} 1, & x = 0,\\ x^2 & 0 < x \leq 1. \end{cases} \end{split}$

We can see that $$\dom f = [0, 1]$$. $$f$$ is continuous on $$(0,1)$$ but $$f$$ is not continuous (from the right) at $$x=0$$. It is continuous (from the left) at $$x=1$$.

Convex functions are continuous at points in the interior of their domain.

### 9.13.2.1. Continuity of Univariate Closed Convex Functions#

Theorem 9.173 (Continuity of closed convex univariate functions)

Let $$f: \RR \to \RERL$$ be a proper closed and convex function. Then, $$f$$ is continuous over $$\dom f$$.

Proof. Since $$f$$ is convex, hence its domain is convex. Hence $$\dom f$$ must be an interval $$I$$.

1. If $$\interior I = \EmptySet$$, then $$I$$ must be a singleton.

2. In that case $$f$$ is continuous obviously.

3. Now consider the case where $$\interior I \neq \EmptySet$$.

4. Then, due to Theorem 9.174, $$f$$ is continuous at every $$x \in \interior I$$.

5. If $$I$$ is open (i.e., it has no endpoints), then there is nothing more to prove.

6. We are left with showing the (one sided) continuity of $$f$$ at one of the endpoints of $$I$$ if it has any.

7. Since, the argument will be identical for either of the endpoints, without loss of generality, let us assume that $$I$$ has a left endpoint $$a$$ and we show the continuity from the right at $$a$$; i.e. $$\lim_{x \to a^+} f(x) = f(a)$$.

8. Pick any $$c \in I$$ such that $$c > a$$.

9. Define a function

$g(t) = \frac{f(c -t) - f(c)}{t}.$
10. Clearly, $$g$$ is defined over $$(0, c-a]$$.

11. We shall show that $$g$$ is nondecreasing and upper bounded over $$(0, c-a]$$.

12. Pick any $$t,s$$ satisfying $$0 < t \leq s \leq c-a$$.

13. Then,

$c - t = \left (1 - \frac{t}{s} \right ) c + \frac{t}{s} (c - s).$
14. $$\frac{t}{s}$$ is well defined and $$\frac{t}{s} \in (0, 1]$$.

15. Thus, $$c-t$$ is a convex combination of $$c$$ and $$c-s$$.

16. Since $$f$$ is convex, hence

$\begin{split} & f(c - t) \leq \left (1 - \frac{t}{s} \right ) f(c) + \frac{t}{s} f(c - s)\\ & \iff f(c - t) - f(c) \leq \frac{t}{s} (f(c -s) - f(c)) \\ &\iff \frac{f(c - t) - f(c)}{t} \leq \frac{f(c -s) - f(c)}{s}. \end{split}$
17. Thus,

$g(t) \leq g(s) \Forall 0 < t \leq s \leq c-a.$
18. Thus, $$g$$ is nondecreasing over $$(0, c-a]$$.

19. Finally $$g(c-a) = \frac{f(a) - f(c)}{c - a}$$ is finite since both $$c,a \in \dom f$$.

20. Since $$g$$ is nondecreasing, hence

$g(t) \leq g(c -a) \Forall t \in (0, c-a].$
21. Thus, $$g$$ is upper bounded.

22. Since $$g$$ is nondecreasing and upper bounded, hence due to Theorem 2.38, the left hand limit of $$g(t)$$ at $$c-a$$ exists and is equal to some real number, say,

$\lim_{t \to (c-a)^-} g(t) = \ell.$

Note that we haven’t said that $$g$$ is continuous from the left at $$c-a$$.

23. Recall from the definition of $$g$$ that

$f(c-t) = f(c) + t g(t).$
24. Hence

$\lim_{t \to (c-a)^-} f(c -t) = f(c) + (c-a) \ell.$
25. Replacing $$c-t$$ by $$r$$, we get

$\lim_{r \to a^+} f(r) = f(c) + (c - a) \ell.$
26. We have shown so far that the limit from the right at $$a$$ exists for $$f$$ and is equal to $$f(c) + (c - a) \ell$$.

27. Using the upper bound on $$g$$, we can say that

$\begin{split} f(c -t) &= f(c) + t g(t) \\ &\leq f(c) + (c-a) g(c-a) \\ &= f(c) + f(a) - f(c) = f(a) \end{split}$

holds true for every $$t \in (0, c-a]$$.

28. Thus,

$\lim_{r \to a^+} f(r) = \lim_{t \to (c-a)^-} f(c -t) \leq f(a).$
29. On the other hand, since $$f$$ is closed, hence it is also lower semicontinuous. This means that

$\lim_{r \to a^+} f(r) \geq f(a).$
30. Combining these two inequalities, we get

$\lim_{r \to a^+} f(r) = f(a).$
31. Thus, $$f$$ is indeed continuous from the right at $$a$$.

32. Similarly, if $$I$$ has a right endpoint $$b$$, then $$f$$ is continuous from the left at $$b$$.

33. Thus, $$f$$ is continuous at every point in its domain.

### 9.13.2.2. Local Lipschitz Continuity#

Theorem 9.174 (Local Lipschitz continuity of convex functions)

Let $$\VV$$ be an $$n$$-dimensional real normed linear space. Let $$f: \VV \to \RR$$ be a convex function with $$S = \dom f$$. Let $$\ba \in \interior S$$. Then, there exists $$r > 0$$ and $$L > 0$$ such that $$B(\ba, r) \subseteq S$$ and

$|f (\bx) - f(\ba)| \leq L \| \bx - \ba \|$

for every $$\bx \in B[\ba, r]$$.

In other words, $$f$$ is locally Lipschitz continuous at every interior point of its domain.

We recall from Theorem 9.125 that if $$\dim \affine S < n$$ then $$S$$ has an empty interior. Thus, if $$\interior S$$ is nonempty, then, $$\affine S = \VV$$.

Proof. We shall structure the proof as follows. For any $$\ba \in \interior S$$:

1. We show that $$f$$ is bounded on a closed ball $$B[\ba, r] \subseteq S$$.

2. Then, we show that $$f$$ satisfies the Lipschitz inequality $$|f (\bx) - f(\ba)| \leq L \| \bx - \ba \|$$ on the closed ball $$B[\ba, r]$$ for a specific choice of $$L$$ depending on $$\ba$$ and $$r$$.

We first introduce $$\| \cdot \|_{\infty}$$ norm on $$\VV$$ and describe its implications.

1. Choose a basis $$\BBB = \{\be_1, \dots, \be_n \}$$ for $$\VV$$.

2. For every $$\bx \in \VV$$, we have a unique representation

$\bx = \sum_{i=1}^n x_i \be_i.$
3. Let $$T : \VV \to \RR^n$$ be a coordinate mapping which maps every vector $$\bx \in \VV$$ to its coordinate vector $$(x_1, \dots, x_n) \in \RR^n$$.

4. $$T$$ is an isomorphism.

5. Define $$\| \cdot \|_{\infty} : \VV \to \RR$$ as

$\| \bx \|_{\infty} = \| T(\bx) \|_{\infty} = \max_{i=1,\dots,n}|x_i|.$
6. It is easy to show that $$\| \cdot \|_{\infty}$$ is a norm on $$\VV$$.

7. By Theorem 4.60, all norms are equivalent.

8. Thus, $$\| \cdot \|$$ and $$\| \cdot \|_{\infty}$$ are equivalent norms for $$\VV$$.

9. By Definition 4.69, the norm topology is identical for all norms in a finite dimensional space.

10. Thus, a point is an interior point of $$S$$ irrespective of the norm chosen.

11. We introduce the closed and open balls in $$(\VV, \| \cdot \|_{\infty})$$ as

$B_{\infty}[\ba, \delta] = \{\bx \in \VV \ST \| \bx - \ba \|_{\infty} \leq \delta \} \text{ and } B_{\infty}(\ba, \delta) = \{\bx \in \VV \ST \| \bx - \ba \|_{\infty} < \delta \}.$
12. Let $$\ba \in \interior S$$.

13. Then, there exists $$r_1 > 0$$ such that $$B_{\infty}[\ba, r_1] \subseteq S$$. due to Remark 3.2.

14. Then, $$B_{\infty}(\ba, r_1) \subseteq B_{\infty}[\ba, r_1]$$.

15. By Theorem 3.25, there is an $$r_2 > 0$$ such that $$B(\ba, r_2) \subseteq B_{\infty}(\ba, r_1)$$.

16. By Theorem 3.2, we can pick an $$0 < r < r_2$$ such that

$B[\ba, r] \subseteq B(\ba, r_2) \subseteq B_{\infty}(\ba, r_1) \subseteq B_{\infty}[\ba, r_1] \subseteq S.$

We now show that $$f$$ is bounded on $$B[\ba, r]$$.

1. $$B_{\infty}[\ba, r_1]$$ is closed and bounded.

2. Hence $$B_{\infty}[\ba, r_1]$$ is compact due to Theorem 4.66.

3. By Krein Milman theorem, a compact convex set is convex hull of its extreme points. Thus,

$B_{\infty}[\ba, r_1] = \convex \extreme B_{\infty}[\ba, r_1].$
4. Let $$\bv_1, \dots, \bv_N$$ be the $$N=2^n$$ extreme points of $$B_{\infty}[\ba, r_1]$$.

1. These extreme points are given by

$\bv_i = \ba + r_1 \bw_i$

where $$\bw_i$$ are the vectors with coordinates $$\{-1, 1\}^n$$.

2. In other words,

$\bw_i = \sum_{j=1}^n w^i_j \be_j$

where $$w^i_j \in \{ -1, 1 \}$$.

3. Note that

$\| \bv_i - \ba \|_{\infty} = r \| \bw_i \|_{\infty} = r_1 \max \{ |w^i_j| \} = r_1.$
4. Thus, $$\bv_i \in \boundary B_{\infty}[\ba, r_1]$$.

5. Readers can verify that these are indeed the extreme points of $$B_{\infty}[\ba, r_1]$$ and there are no other extreme points.

5. Then, by Krein Milman theorem,

$B_{\infty}[\ba, r_1] = \convex \{\bv_1, \dots, \bv_N \}.$
6. Thus, every $$\bx \in B_{\infty}[\ba, r_1]$$ is a convex combination of the extreme points. Specially, there exists $$t \in \Delta_N$$ (unit simplex of $$\RR^N$$) such that

$\bx = \sum_{i=1}^N t_i \bv_i.$
7. Now, by Jensen's inequality,

$f(\bx) \leq \sum_{i=1}^N t_i f(\bv_i).$
8. Let $$M = \max \{f(\bv_1), \dots, f(\bv_N) \}$$.

9. Then,

$f(\bx) \leq \sum_{i=1}^N t_i f(\bv_i) \leq \sum_{i=1}^N t_i M = M \sum_{i=1}^N t_i = M.$
10. Since $$B[\ba, r] \subseteq B_{\infty}[\ba, r_1]$$, hence $$f(\bx) \leq M$$ for every $$\bx \in B[\ba, r]$$.

We have shown that $$f(\bx) \leq M$$ for every $$\bx \in B[\ba, r]$$. We next find an $$L$$ such that

$f (\bx) - f(\ba) \leq L \| \bx - \ba \|$

for every $$\bx \in B[\ba, r]$$.

1. Let $$\bx \in B_d[\ba, r]$$ (the deleted neighborhood).

2. Then, $$\| \bx - \ba \| \leq r$$ and $$f(\bx) \leq M$$.

3. Let $$\alpha = \frac{1}{r} \| \bx - \ba \|$$. Note that by definition $$\alpha \leq 1$$.

4. Define

$\by = \ba + \frac{1}{\alpha}(\bx - \ba).$
5. Note that

$\| \by - \ba \| = r \frac{\| \bx - \ba \| }{\| \bx - \ba \|} = r.$
6. Thus, $$\by \in B[\ba, r]$$.

7. Hence $$f(\by)\leq M$$.

8. We can rewrite the above equation (defining $$\by$$) as

$\bx = \alpha \by + (1- \alpha) \ba.$
9. Thus, $$\bx$$ is a convex combination of $$\by, \ba$$.

10. Then, by convexity,

$\begin{split} f(\bx) &\leq \alpha f(\by) + (1- \alpha) f(\ba)\\ &= f(\ba) + \alpha (f(\bx) - f(\ba))\\ &\leq f(\ba) + \alpha (M - f(\ba))\\ &= f(\ba) + \frac{1}{r} \| \bx - \ba \| (M - f(\ba)). \end{split}$
11. Consequently,

$f(\bx) - f(\ba) \leq \frac{M - f(\ba)}{r} \| \bx - \ba \|.$
12. Let $$L = \frac{M - f(\ba)}{r}$$.

13. Then, for every $$\bx \in B[\ba, r]$$, we have

$f(\bx) - f(\ba) \leq L \| \bx - \ba \|.$

We next show that for this choice of $$L$$

$f (\ba) - f(\bx) \leq L \| \bx - \ba \|$

for every $$\bx \in B[\ba, r]$$.

1. Define

$\bz = \ba + \frac{1}{\alpha} (\ba - \bx).$
2. It is easy to see that $$\| \ba - \bz \| = r$$.

3. Hence, $$\bz \in B[\ba, r]$$ and $$f(\bz) \leq M$$.

4. Rearranging, we have

$\bx = \ba + \alpha (\ba - \bz).$
5. Now, note that:

$\ba = \frac{1}{1 + \alpha}(\ba + \alpha(\ba - \bz)) + \frac{\alpha}{1 + \alpha} \bz.$
6. Thus, $$\ba$$ is a convex combination of $$\bx = \ba + \alpha (\ba - \bz)$$ and $$\bz$$.

7. Also, both $$\bx, \bz \in B[\ba, r]$$.

8. Applying convexity,

$f(\ba) \leq \frac{1}{1 + \alpha} f(\bx) + \frac{\alpha}{1 + \alpha} f(\bz).$
9. Thus,

$(1 + \alpha)f(\ba) \leq f(\bx) + \alpha f(\bz).$
10. Thus,

$f(\bx) \geq (1 + \alpha)f(\ba) - \alpha f(\bz) = f(\ba) + \alpha (f(\ba) - f(\bz)).$
11. Continuing from here

$\begin{split} f(\bx) &\geq f(\ba) + \alpha (f(\ba) - f(\bz))\\ &\geq f(\ba) - \alpha (M - f(\ba))\\ &= f(\ba) - \frac{M - f(\ba)}{r} \| \bx - \ba \|\\ = f(\ba) - L \| \bx - \ba \|. \end{split}$
12. Thus, $$f(\ba) - f(\bx) \leq L \| \bx - \ba \|$$.

Combining, we see that with $$L = \frac{M - f(\ba)}{r}$$,

$|f (\bx) - f(\ba)| \leq L \| \bx - \ba \|$

for every $$\bx \in B[\ba, r]$$.

Thus, $$f$$ is locally Lipschitz at every interior point of $$S = \dom f$$.

### 9.13.2.3. Continuity of Proper Convex Functions#

Theorem 9.175 (Continuity of proper convex functions)

Let $$\VV$$ be an $$n$$-dim real normed linear space. Let $$f: \VV \to \RR$$ be a real valued convex function. Then it is continuous. More generally, if $$f : \VV \to \RERL$$ is a proper convex function, then $$f$$, restricted to $$\dom f$$, is continuous over the relative interior of $$\dom f$$.

Proof. We will restrict our attention to the affine hull of the domain of $$f$$. We shall assume that origin belongs to $$\relint \dom f$$. We shall use a transformation argument as needed.

1. Let $$S = \dom f$$.

2. Let $$A = \affine S$$.

3. Let $$L$$ the linear subspace parallel to $$A$$.

4. Let $$\ba \in \relint S$$. If $$\bzero \in \relint S$$, we can pick $$\ba = \bzero$$.

5. Define the function

$g(\bx) = f(\bx + \ba).$
6. Clearly $$g(\bzero) = f(\ba)$$.

7. We can see that $$\dom g = S - \ba$$ and $$\affine \dom g = L$$.

8. Consider the restriction of $$g$$ to $$L$$ defined as $$h : L \to \RERL$$ given by $$h(\bx) = g(\bx)$$.

9. $$\dom h = S - \ba$$.

10. We note that relative interior of $$S - \ba$$ w.r.t. $$\VV$$ is the same as the interior of $$S - \ba$$ w.r.t. $$L$$.

11. By Theorem 9.174, $$h$$ is locally Lipschitz continuous at every interior point of $$S - \ba$$ (relative to $$L$$).

12. Hence $$g$$ is continuous over the relative interior of $$S - \ba$$.

13. Hence $$f$$ is continuous over the relative interior of $$S$$.

Corollary 9.12 (Closedness of real valued convex functions)

Let $$\VV$$ be an $$n$$-dim real normed linear space. A real valued convex function $$f: \VV \to \RR$$ with $$\VV = \dom f$$ is closed.

Proof. By Theorem 9.175, $$f$$ is continuous over $$\VV$$.

1. For real valued convex functions, $$\VV = \dom f$$.

2. $$\VV$$ is a closed set in the topology of $$(\VV, \| \cdot \|)$$.

3. By Theorem 3.96, continuity and closed domain imply that $$f$$ is closed.