# 3.6. Functions and Continuity#

The material in this section is primarily based on [2, 41].

Let $$(X,d)$$ and $$(Y, \rho)$$ be metric spaces.

Recall that for a function $$f: (X,d) \to (Y, \rho)$$:

1. If $$f$$ is a partial function, then $$\dom f \subseteq X$$.

2. If $$f$$ is a total function, then $$\dom f = X$$.

We will primarily focus on total functions while some definition and results are valid for partial functions too.

## 3.6.1. Open and Closed Mappings#

Definition 3.35 (Open mapping)

A (total) function $$f : (X, d) \to (Y, \rho)$$ is called an open mapping if $$f(A)$$ is open whenever $$A$$ is open.

In other words, $$f$$ maps open sets to open sets.

Definition 3.36 (Closed mapping)

A (total) function $$f : (X, d) \to (Y, \rho)$$ is called a closed mapping if $$f(A)$$ is closed whenever $$A$$ is closed.

In other words, $$f$$ maps closed sets to closed sets.

Example 3.14 (A closed map need not be open)

Let $$f: X \to Y$$ be defined as $$f(x) = y_0$$ for every $$x \in X$$ where $$y_0 \in Y$$ is some fixed point.

Then, for every $$A \subseteq X$$, $$f(A) = \{ y_0\}$$. Since $$\{ y_0\}$$ is a singleton, hence

1. $$f$$ maps every closed set in $$X$$ to a (fixed) closed set in $$Y$$.

2. But $$f$$ doesn’t map open sets in $$X$$ to open sets in $$Y$$.

Example 3.15 (An open map need not be closed)

Consider the function $$f : \RR^2 \to \RR$$ given by

$f((x, y)) = x.$

Thus, $$f$$ is a projection function which projects a point in $$\RR^2$$ to its first coordinate.

We first show that $$f$$ is an open mapping.

1. Now, let $$A$$ be an open set in $$\RR^2$$.

2. Let $$x \in f(A)$$.

3. Let $$y \in \RR$$ such that $$(x,y) \in A$$. Thus, $$f ((x,y)) = x$$.

4. Since $$A$$ is open, hence $$(x,y)$$ is an interior point of $$A$$.

5. Thus, there exists $$r > 0$$ such that $$B((x,y), r) \subseteq A$$.

6. But then, $$f(B((x,y), r)) \subseteq f(A)$$.

7. Note that $$f(B((x,y), r)) = (x-r, x+r)$$.

8. Thus, $$(x-r, x+r) \subseteq f(A)$$.

9. Thus, $$x$$ is an interior point of $$f(A)$$.

10. Thus, every point in $$f(A)$$ is its interior point.

11. Thus, $$f(A)$$ is open.

12. Thus, $$f$$ is an open mapping.

We now show that $$f$$ is not a closed mapping.

1. Consider the set \$L = { (x, y) \in \RR^2 | x> 0 \text{ and } xy = 1}.

2. This is a curve in $$\RR^2$$ (visualize).

3. It is thus a closed set.

4. $$f(L) = (0, \infty)$$.

5. $$f(L)$$ is not a closed set in $$\RR$$. It is rather an open interval.

6. Thus, $$f$$ doesn’t map every closed set to a closed set. Although, it does map some closed sets to closed sets.

7. Thus, $$f$$ is not a closed mapping.

## 3.6.2. Bounded Functions#

Definition 3.37 (Bounded functions)

A (total) function $$f : (X, d) \to (Y, \rho)$$ is called a bounded if its image $$f(X)$$ is bounded (in the metric space sense).

In other words, there exists a number $$M > 0$$ such that

$\rho(f(x), f(y)) \leq M \Forall x, y \in X.$

Compare this definition with the definition for bounded real valued functions in Definition 2.50.

## 3.6.3. Continuous Functions#

Definition 3.38 (Continuous function)

A function $$f: X \to Y$$ between the two metric spaces is said to be continuous at a point $$a \in \dom f$$ if for every $$\epsilon > 0$$, there exists $$\delta > 0$$ (depending on $$\epsilon$$ and $$a$$) such that for all $$x \in \dom f$$

$d(x, a) < \delta \implies \rho (f(x), f(a)) < \epsilon$

holds true.

$$f$$ is said to be continuous on $$A \subseteq \dom f$$ if $$f$$ is continuous at every point of $$A$$.

In other words, there is an open ball $$B_X(a, \delta)$$ around $$a$$ which maps within the open ball $$B_Y(f(a), \epsilon)$$ around $$f(a)$$.

The “continuity at a point” definition above is valid for both partial and total functions.

1. If $$a$$ is an isolated point in $$\dom f$$, then $$f$$ is continuous at $$a$$.

2. If $$a$$ is an accumulation point in $$\dom f$$ then, $$\lim_{x \to a} f(x) = f(a)$$ must hold true for $$f$$ to be continuous at $$x=a$$.

Remark 3.7

If $$f$$ is continuous on $$A$$ then $$A \subseteq \dom f$$. If $$f$$ is continuous on $$X$$ then $$\dom f = X$$.

Note

If $$f : (X,d) \to (Y, \rho)$$ is not defined for all of $$X$$, then we can consider the restriction of $$f$$ to $$A =\dom f$$ and work with $$\tilde{f}: (A,d) \to (Y, \rho)$$ given by $$\tilde{f}(x) = f(x) \Forall x \in A$$ where $$(A,d)$$ is a metric subspace of $$(X, d)$$. Then $$f'$$ is a total function.

Example 3.16 (Distance from a set)

Recall from Definition 3.5 that the distance from a nonempty set $$A \subseteq X$$ of any point $$x\in X$$ is defined as:

$d(x, A) = \inf \{ d(x,a) \Forall a \in A \}.$

If we fix $$A$$, then we can define a function $$d_A : X \to \RR$$ as:

$d_A(x) = d(x, A).$

The function is well defined since the set $$\{ d(x,a) \Forall x \in A \}$$ is bounded from below and thus has a unique greatest lower bound.

We now show that $$d_A$$ is continuous.

We first establish some basic inequalities. For any $$x,y \in X$$ and $$a \in A$$ we have:

$d(a,x) \leq d(a,y) + d(x,y)$

Thus,

$d(a, y) \geq d(a, x) - d(x,y).$

Since $$d(a,x) \geq d_A(x)$$, we get:

$d(a,y) \geq d_A(x) - d(x,y).$

Since this inequality is valid for every $$a \in A$$, taking the infimum on the L.H.S, we get:

$d_A(y) \geq d_A(x) - d(x,y) \iff d_A(x) - d_A(y) \leq d(x,y).$

Interchanging $$x$$ with $$y$$, we get:

$d_A(y) - d_A(x) \leq d(y, x) = d(x,y).$

Combining the two, we get:

$|d_A(x) - d_A(y)| \leq d(x,y).$

Now for any $$\epsilon > 0$$, choosing $$\delta = \epsilon$$, we get that

$d (x, y) < \delta \implies |d_A(x) - d_A(y)| < \delta = \epsilon.$

Hence, $$d_A$$ is continuous on $$X$$.

### 3.6.3.1. Continuity Characterization#

Theorem 3.42 (Characterization of continuous functions)

Let $$f: X \to Y$$ be a (total) function between two metric spaces. The following statements are equivalent:

1. $$f$$ is continuous on $$X$$.

2. $$f^{-1}(\OOO)$$ is open subset of $$X$$ whenever $$\OOO$$ is an open set of $$Y$$.

3. If $$\lim x_n = x$$ holds in $$X$$, then $$\lim f(x_n) = f(x)$$ holds in $$Y$$.

4. $$f(\closure A) \subseteq \closure f(A)$$ holds for every subset $$A$$ of $$X$$.

5. $$f^{-1}(C)$$ is a closed subset of $$X$$ whenever $$C$$ is a closed subset of $$Y$$.

Proof. (1) $$\implies$$ (2). We prove this by showing that every point in $$f^{-1}(\OOO)$$ is its interior point.

1. Let $$\OOO$$ be open in $$Y$$. Let $$a \in f^{-1}(\OOO)$$.

2. Thus, $$f(a) \in \OOO$$.

3. Since $$\OOO$$ is open, there exists $$r > 0$$ such that $$B_Y(f(a), r) \subseteq \OOO$$.

4. Since $$f$$ is continuous at $$a$$, there exists $$\delta > 0$$ (depending on $$r$$) such that

$d(x, a) < \delta \implies \rho(f(x), f(a)) < r.$
5. i.e., for any $$x \in B_X(a, \delta)$$, $$f(x) \in B_Y(f(a), r) \subseteq \OOO$$.

6. Thus, $$x \in f^{-1}(\OOO)$$ for any $$x \in B_X(a, \delta)$$.

7. This means that $$B_X(a, \delta) \subseteq f^{-1}(\OOO)$$.

8. Thus, $$a$$ is an interior point of $$f^{-1}(\OOO)$$.

9. Since every point in $$f^{-1}(\OOO)$$ is its interior point, hence $$f^{-1}(\OOO)$$ is open.

(2) $$\implies$$ (3)

1. Let $$\lim x_n = x$$ in $$X$$ and $$r > 0$$.

2. Let $$\OOO = B_Y(f(x), r)$$.

3. By (2), $$f^{-1}(\OOO)$$ is open in $$X$$.

4. Since $$x \in f^{-1}(\OOO)$$, there exists some $$\delta > 0$$ such that $$B_X(x, \delta) \subseteq f^{-1}(\OOO)$$.

5. Since $$\lim x_n = x$$, there exists $$k \in \Nat$$ such that $$x_n \in B_X(x, \delta)$$ for all $$n > k$$.

6. Thus, $$x_n \in f^{-1}(\OOO)$$ for all $$n > k$$.

7. Thus, $$f(x_n) \in \OOO$$ for all $$n > k$$.

8. i.e., for every $$r > 0$$, there exists $$k \in \Nat$$ such that $$f(x_n) \in B_Y(f(x), r)$$ for all $$n > k$$.

9. Thus, $$\lim f(x_n) = f(x)$$.

(3) $$\implies$$ (4). We will show that every point in $$f(\closure A)$$ belongs to $$\closure f(A)$$.

1. Let $$A$$ be a subset of $$X$$.

2. Let $$y \in f(\closure A)$$.

3. Then, there exists $$x \in \closure A$$ such that $$y = f(x)$$.

4. Since $$x$$ is a closure point of $$A$$, there exists a sequence $$\{ x_n \}$$ of $$A$$ that converges to $$x$$.

5. Since $$x_n \in A$$, hence $$f(x_n) \in f(A)$$.

6. Thus, $$\{ f(x_n) \}$$ is a sequence of $$f(A)$$.

7. Since $$\lim x_n = x$$, hence, by (3), $$\lim f(x_n) = f(x) = y$$.

8. Thus, $$y$$ is a closure point of $$f(A)$$.

9. Thus, $$y \in f(\closure A) \implies y \in \closure f(A)$$.

10. Thus, $$f(\closure A) \subseteq \closure f(A)$$.

(4) $$\implies$$ (5)

1. Let $$C$$ be a closed subset of $$Y$$.

2. Thus, $$C = \closure C$$.

3. Let $$A = f^{-1}(C)$$.

4. Using (4), $$f(\closure A) \subseteq \closure f(A) = \closure C = C$$.

5. Thus, $$\closure A \subseteq f^{-1}(C) = A$$.

6. Since $$A \subseteq \closure A$$ always, hence $$A = \closure A$$.

7. Thus, $$A = f^{-1}(C)$$ is a closed subset of $$X$$.

(5) $$\implies$$ (1). We will show that $$f$$ is continuous at any $$x \in X$$.

1. Let $$a \in X$$. Let $$\epsilon > 0$$.

2. Consider the open ball $$B_Y(f(a), \epsilon)$$.

3. Consider the closed set $$C = Y \setminus B_Y(f(a), \epsilon)$$.

4. $$C$$ can be written as:

$C = \{y \in Y \ST \rho(f(a), y) \geq \epsilon \}.$
5. Using (5), $$f^{-1}(C)$$ is closed in $$X$$.

6. Since $$f(a) \notin C$$, hence $$a \notin f^{-1}(C)$$.

7. Thus, $$a \in X \setminus f^{-1}(C)$$ which is an open subset of $$X$$.

8. Thus, there exists $$\delta > 0$$ such that $$B_X(a, \delta) \subseteq X \setminus f^{-1}(C)$$.

9. Note that $$x \in X \setminus f^{-1}(C)$$ implies that $$\rho(f(a), f(x)) < \epsilon$$. For if $$\rho(f(a), f(x)) \geq \epsilon$$ then $$f(x) \in C$$ then $$x \in f^{-1}(C)$$.

10. Thus, $$x \in B_X(a, \delta)$$ implies that $$f(x) \in B_Y(f(a), \epsilon)$$.

11. Thus, for every $$\epsilon > 0$$, there exists $$\delta > 0$$ such that $$d(x, a) < \delta$$ implies $$\rho(f(x), f(a)) < \epsilon$$.

12. Thus, $$f$$ is continuous at $$a$$.

13. Since $$a$$ is arbitrary, hence $$f$$ is continuous on $$X$$.

### 3.6.3.2. Continuity Characterization for Partial Functions#

We can extend the characterization in Theorem 3.42 for partial functions with slight changes. The primary change is that on the function domain side we have to work with the subspace topology. Readers may skip this subsection on first reading.

Theorem 3.43 (Characterization of continuity for partial functions)

Let $$f: (X,d) \to (Y, \rho)$$ be a partial function between two metric spaces with $$S = \dom f \subseteq X$$. Let $$(S, d)$$ denote the metric subspace with the distance function $$d$$ restricted to $$S \times S$$.

The following statements are equivalent:

1. $$f$$ is continuous on $$S$$.

2. $$f^{-1}(\OOO)$$ is open relative to $$(S,d)$$ whenever $$\OOO$$ is an open set of $$Y$$.

3. If $$\lim x_n = x$$ holds in $$S$$, then $$\lim f(x_n) = f(x)$$ holds in $$Y$$.

4. $$f(\closure A) \subseteq \closure f(A)$$ holds for every subset $$A$$ of $$S$$ where $$\closure A$$ means closure of $$A$$ relative to the subspace $$(S,d)$$.

5. $$f^{-1}(C)$$ is a closed in $$(S,d)$$ whenever $$C$$ is a closed subset of $$(Y, \rho)$$.

Proof. (1) $$\implies$$ (2). We prove this by showing that every point in $$f^{-1}(\OOO)$$ is its interior point relative to $$(S, d)$$.

1. Let $$\OOO$$ be open in $$Y$$. Let $$a \in f^{-1}(\OOO)$$.

2. Thus, $$f(a) \in \OOO$$.

3. Since $$\OOO$$ is open, there exists $$r > 0$$ such that $$B_Y(f(a), r) \subseteq \OOO$$.

4. Since $$f$$ is continuous at $$a$$, there exists $$\delta > 0$$ (depending on $$r$$) such that for every $$x \in S$$

$d(x, a) < \delta \implies \rho(f(x), f(a)) < r.$
5. In other words, for every $$x \in B_X(a, \delta) \cap S$$, $$f(x) \in B_Y(f(a), r) \subseteq \OOO$$.

6. Thus, $$x \in f^{-1}(\OOO)$$ for every $$x \in B_X(a, \delta) \cap S$$.

7. This means that $$B_X(a, \delta) \cap S \subseteq f^{-1}(\OOO)$$.

8. Thus, $$a$$ is an interior point of $$f^{-1}(\OOO)$$ relative to $$(S, d)$$.

9. Since every point in $$f^{-1}(\OOO)$$ is its interior point, hence $$f^{-1}(\OOO)$$ is open in $$(S, d)$$.

(2) $$\implies$$ (3)

1. Let $$\lim x_n = x$$ in $$S$$ and $$r > 0$$.

2. Let $$\OOO = B_Y(f(x), r)$$.

3. By (2), $$f^{-1}(\OOO)$$ is open in $$(S, d)$$.

4. Since $$x \in f^{-1}(\OOO)$$, there exists some $$\delta > 0$$ such that $$B_X(x, \delta) \cap S \subseteq f^{-1}(\OOO)$$.

5. Since $$\lim x_n = x$$, there exists $$k \in \Nat$$ such that $$x_n \in B_X(x, \delta) \cap S$$ for all $$n > k$$.

6. Thus, $$x_n \in f^{-1}(\OOO)$$ for all $$n > k$$.

7. Thus, $$f(x_n) \in \OOO$$ for all $$n > k$$.

8. i.e., for every $$r > 0$$, there exists $$k \in \Nat$$ such that $$f(x_n) \in B_Y(f(x), r)$$ for all $$n > k$$.

9. Thus, $$\lim f(x_n) = f(x)$$.

(3) $$\implies$$ (4). We will show that every point in $$f(\closure A)$$ belongs to $$\closure f(A)$$.

1. Let $$A$$ be a subset of $$S$$.

2. Let $$y \in f(\closure A)$$.

3. Then, there exists $$x \in \closure A$$ such that $$y = f(x)$$.

4. Since $$x$$ is a closure point of $$A$$, there exists a sequence $$\{ x_n \}$$ of $$A$$ that converges to $$x$$.

5. Since $$x_n \in A$$, hence $$f(x_n) \in f(A)$$.

6. Thus, $$\{ f(x_n) \}$$ is a sequence of $$f(A)$$.

7. Since $$\lim x_n = x$$, hence, by (3), $$\lim f(x_n) = f(x) = y$$.

8. Thus, $$y$$ is a closure point of $$f(A)$$.

9. Thus, $$y \in f(\closure A) \implies y \in \closure f(A)$$.

10. Thus, $$f(\closure A) \subseteq \closure f(A)$$.

(4) $$\implies$$ (5)

1. Let $$C$$ be a closed subset of $$Y$$.

2. Thus, $$C = \closure C$$.

3. Let $$A = f^{-1}(C)$$.

4. Using (4), $$f(\closure A) \subseteq \closure f(A) = \closure C = C$$.

5. Thus, $$\closure A \subseteq f^{-1}(C) = A$$.

6. Since $$A \subseteq \closure A$$ always, hence $$A = \closure A$$.

7. Thus, $$A = f^{-1}(C)$$ is a closed subset of $$S$$.

(5) $$\implies$$ (1). We will show that $$f$$ is continuous at every $$x \in S$$.

1. Let $$a \in S$$. Let $$\epsilon > 0$$.

2. Consider the open ball $$B_Y(f(a), \epsilon)$$.

3. Consider the closed set $$C = Y \setminus B_Y(f(a), \epsilon)$$.

4. $$C$$ can be written as:

$C = \{y \in Y \ST \rho(f(a), y) \geq \epsilon \}.$
5. Using (5), $$f^{-1}(C)$$ is closed in $$(S, d)$$.

6. Since $$f(a) \notin C$$, hence $$a \notin f^{-1}(C)$$.

7. Thus, $$a \in S \setminus f^{-1}(C)$$ which is an open subset of $$(S, d)$$.

8. Thus, there exists $$\delta > 0$$ such that $$B_X(a, \delta) \cap S \subseteq S \setminus f^{-1}(C)$$.

9. Note that $$x \in S \setminus f^{-1}(C)$$ implies that $$\rho(f(a), f(x)) < \epsilon$$. For if $$\rho(f(a), f(x)) \geq \epsilon$$ then $$f(x) \in C$$ then $$x \in f^{-1}(C)$$.

10. Thus, $$x \in B_X(a, \delta) \cap S$$ implies that $$f(x) \in B_Y(f(a), \epsilon)$$.

11. Thus, for every $$\epsilon > 0$$, there exists $$\delta > 0$$ such that for every $$x \in S$$, $$d(x, a) < \delta$$ implies $$\rho(f(x), f(a)) < \epsilon$$.

12. Thus, $$f$$ is continuous at $$a$$.

13. Since $$a$$ is arbitrary, hence $$f$$ is continuous on $$S$$.

### 3.6.3.3. Closures#

Theorem 3.44 (Continuity and closure)

Let $$f: X \to Y$$ be a continuous function between two metric spaces. Let $$A \subseteq X$$. Then,

$\closure f(\closure A) = \closure f(A).$

Proof. Since $$f$$ is continuous, hence by Theorem 3.42 (4)

$f(\closure A) \subseteq \closure f(A).$

Now, $$\closure f(A)$$ is a closed set. Hence, due to Proposition 3.6

$\closure f(\closure A) \subseteq \closure f(A).$

Now, note that:

$f(A) \subseteq f(\closure A)$

since $$A \subseteq \closure A$$.

But then, taking closure on both sides, we get:

$\closure f(A) \subseteq \closure f(\closure A).$

Combining the inclusions, we obtain:

$\closure f(\closure A) = \closure f(A).$

### 3.6.3.4. Interiors#

Theorem 3.45 (Continuity characterization with interiors)

Let $$f: X \to Y$$ be a function between two metric spaces. $$f$$ is continuous if and only if for every $$A \subseteq Y$$

$f^{-1}(\interior A) \subseteq \interior f^{-1}(A).$

Proof. Assume $$f$$ is continuous. Let $$A \subseteq Y$$ be arbitrary.

1. Let $$x \in f^{-1}(\interior A)$$.

2. Then, $$f(x) \in \interior A$$.

3. Thus, there is an open ball $$U = B(f(x), r) \subseteq A$$.

4. Now, $$x \in f^{-1}(U)$$ since $$f(x) \in U$$.

5. But $$U \subseteq A$$.

6. Thus, $$x \in f^{-1}(A)$$.

7. Since $$f$$ is continuous and $$U$$ is open, hence $$f^{-1}(U)$$ is an open set due to Theorem 3.42.

8. But since $$U \subseteq A$$, hence $$f^{-1}(U) \subseteq f^{-1}(A)$$.

9. Thus, we have $$x \in f^{-1}(U) \subseteq f^{-1}(A)$$.

10. Since $$f^{-1}(U)$$ is open, hence $$x$$ is an interior point of $$f^{-1}(U)$$.

11. Thus, $$x$$ is an interior point of $$f^{-1}(A)$$ also.

12. Thus, $$x \in \interior f^{-1}(A)$$.

13. Thus, we have

$f^{-1}(\interior A) \subseteq \interior f^{-1}(A)$

for every $$A \subseteq Y$$.

Now assume that for every $$A \subseteq Y$$

$f^{-1}(\interior A) \subseteq \interior (f^{-1}(A))$

holds true.

1. Let $$U \subseteq Y$$ be an arbitrary open set.

2. We have that

$f^{-1}(\interior U) = f^{-1}(U) \subseteq \interior f^{-1}(U) \subseteq f^{-1}(U).$
3. Therefore $$f^{-1}(U) = \interior f^{-1}(U)$$ must hold ($$P \subseteq Q \subseteq P$$ means $$P=Q$$).

4. Therefore, $$f^{-1}(U)$$ is open.

5. We have shown that for every open set $$U \subseteq Y$$, its pre-image $$f^{-1}(U)$$ is open.

6. Thus, by Theorem 3.42, $$f$$ is continuous.

### 3.6.3.5. Function Compositions#

Theorem 3.46 (Continuity and composition)

Composition of continuous (total) functions is continuous.

Proof. Let $$(X_1, d_1), (X_2, d_2), (X_3, d_3)$$ be metric spaces. Let $$f: X_1 \to X_2$$ and $$g: X_2 \to X_3$$ be continuous. Define $$h : X_1 \to X_3$$ as $$h = g \circ f$$.

Let $$\{ x_n \}$$ be a sequence of $$X_1$$.

1. Then, $$\{y_n = f(x_n)\}$$ is a sequence of $$X_2$$.

2. And, $$\{z_n = g(y_n)) \}$$ is a sequence of $$X_3$$.

Assume that $$\lim x_n = x$$. Let $$y = f(x)$$ and $$z = g(y)$$.

1. Since $$f$$ is continuous, hence $$\lim x_n =x \implies \lim y_n = y$$ due to Theorem 3.42.

2. Since $$g$$ is continuous, hence $$\lim y_n = y \implies \lim z_n = z$$.

3. Thus, $$\lim x_n = x \implies \lim z_n = z$$.

4. Since this is valid for any convergent sequence of $$X$$, $$g \circ f$$ is continuous; again due to Theorem 3.42.

### 3.6.3.6. Level Sets#

Theorem 3.47 (Level sets of continuous functions)

Let $$f: X \to Y$$ be a continuous function between two metric spaces. Then, the level sets of $$f$$ given by

$A_y = \{x \in X \ST f(x) = y \}$

are closed.

Proof. By definition:

$A_y = f^{-1}(\{ y \}).$

Now, $$\{ y \}$$ is a singleton set in $$Y$$, hence closed in $$Y$$ due to Theorem 3.8.

Then, by Theorem 3.42 (5), $$f^{-1}(\{ y \})$$ is closed.

## 3.6.4. Discontinuity#

Definition 3.39 (Discontinuity)

A function $$f: X \to Y$$ between the two metric spaces is said to be discontinuous at a point $$a \in \dom f$$ if there exists $$\epsilon > 0$$, such that for every $$\delta > 0$$ there exists $$x \in \dom f$$ with $$d(x, a) < \delta$$ and $$\rho (f(x), f(a)) \geq \epsilon$$.

## 3.6.5. Uniform Continuity#

Definition 3.40 (Uniform continuity)

A function $$f: (X, d) \to (Y, \rho)$$ between two metric spaces is called uniformly continuous on $$A \subseteq \dom f$$ if for every $$\epsilon > 0$$, there exists some $$\delta > 0$$ (depending on $$\epsilon$$) such that

$\rho(f(x), f(y)) < \epsilon \text{ whenever } d(x, y) < \delta \text{ and } x, y \in A.$

Remark 3.8

If $$f$$ is uniformly continuous on $$A \subseteq \dom f$$, then $$f$$ is continuous on $$A$$.

For real valued functions, the standard metric on $$\RR$$ is $$d(x,y) = |x - y|$$. The uniform continuity definition simplifies accordingly as:

Remark 3.9 (Uniform continuity for real valued functions)

A real valued function $$f: (X, d) \to \RR$$ is called uniformly continuous on $$A \subseteq \dom f$$ if for every $$\epsilon > 0$$, there exists some $$\delta > 0$$ (depending on $$\epsilon$$) such that

$|f(x) - f(y)| < \epsilon \text{ whenever } d(x, y) < \delta \text{ and } x, y \in A.$

## 3.6.6. Homeomorphism#

Homeomorphism is the fusion of the ideas of continuity and bijection. We are interested in bijective mappings where the function and its inverse are both continuous.

Homeomorphisms characterize what are known as topological properties. Properties of sets in metric spaces which are preserved by homeomorphisms are known as topological properties. For example, homeomorphisms preserve openness, closedness, compactness. But they don’t preserve boundedness or completeness.

Homeomorphisms can be thought of as continuous deformations which are reversible.

If two spaces are connected through a homeomorphism, they are called homeomorphic. Once we prove that two spaces are homeomorphic, we need to study only one of them for their topological properties.

Definition 3.41 (Homeomorphism)

Let $$(X,d)$$ and $$(Y, \rho)$$ be two metric spaces. A function $$f : X \to Y$$ is called a homeomorphism if

1. $$f$$ is bijective (thus the inverse $$f^{-1}$$ exists).

2. $$f$$ is continuous.

3. $$f^{-1}$$ is continuous.

If a homeomorphism exists between two metric spaces $$(X,d)$$ and $$(Y, \rho)$$, then the metric spaces are called homeomorphic.

Procedure to show that two metric spaces are homeomorphic:

1. Pick a suitable bijective function $$f : X \to Y$$.

2. Show that $$f$$ is continuous.

3. Show that $$f^{-1}$$ is continuous.

Example 3.17 (1/x)

Let $$X = (0,1]$$ and $$Y = [1, \infty)$$. Let $$f : X \to Y$$ be given by

$f(x) = \frac{1}{x}.$
1. $$f$$ is continuous.

2. $$f$$ is bijective.

3. $$f^{-1}$$ exists.

4. $$f^{-1} = f$$. It is self inverse (involution).

5. Thus, $$f$$ is a homeomorphism between $$X$$ and $$Y$$.

Further observations:

1. $$(0, 1]$$ is bounded but $$[1, \infty)$$ is not.

2. $$[1, \infty)$$ is complete but $$(0, 1]$$ is not.

Thus, homeomorphisms do not preserve boundedness or completeness.

### 3.6.6.1. An Equivalence Relation#

Theorem 3.48 (Homeomorphism is an equivalence relation)

Consider the family of all metric spaces denoted by $$M$$. Consider the relation where we say that $$A \sim B$$ for any $$A, B \in M$$ if $$A$$ and $$B$$ are homeomorphic (i.e., there exists a homeomorphism between them).

Then, $$\sim$$ is an equivalence relation.

Proof. [Reflexivity]

1. Let $$A \in M$$.

2. Consider the identity mapping $$I : A \to A$$ given by $$I(x) = x$$ for every $$x \in A$$.

3. Then, $$I$$ is a homeomorphism.

4. Thus, $$A \sim A$$.

[Symmetry]

1. Let $$A, B \in M$$ such that $$A \sim B$$.

2. Thus, there exists a homeomorphism $$f : A \to B$$ where $$f$$ is bijective, $$f$$ is continuous and $$f^{-1}$$ is continuous.

3. Let $$g = f^{-1}$$.

4. Then, $$g$$ is a bijective mapping from $$B$$ to $$A$$, $$g$$ is continuous and $$g^{-1} = f$$ is also continuous.

5. Thus, $$g$$ is a homeomorphism from $$B$$ to $$A$$.

6. Thus, $$A \sim B$$ implies $$B \sim A$$.

[Transitivity]

1. Let $$A,B,C \in M$$ so that $$A \sim B$$ and $$B \sim C$$.

2. Thus, there exists a homeomorphism $$f : A \to B$$ and another homeomorphism $$g : B \to C$$.

3. Consider the function $$h = g \circ f$$ which is a mapping from $$A$$ to $$C$$.

4. Since $$f$$ and $$g$$ are bijective, hence $$h$$ is also bijective.

5. In fact, $$h^{-1} = (g \circ f)^{-1} = f^{-1} \circ g^{-1}$$.

6. Since $$f$$ and $$g$$ are both continuous, hence $$h$$ is also continuous.

7. Since $$g^{-1}$$ and $$f^{-1}$$ are both continuous, hence $$h^{-1}$$ is also continuous.

8. Thus, $$h: A \to C$$ is bijective and both $$h$$ and $$h^{-1}$$ are continuous.

9. Thus, $$h$$ is a homeomorphism from $$A$$ to $$C$$.

10. Thus, $$A$$ and $$C$$ are homeomorphic.

11. Thus, $$A \sim C$$.

### 3.6.6.2. Open and Closed Mappings#

Theorem 3.49 (Homeomorphisms are both open and closed)

Let $$f: (X,d) \to (Y, \rho)$$ be a homeomorphism. Then $$f$$ is both an open mapping as well as a closed mapping.

$$f^{-1}$$ is also both an open mapping and a closed mapping.

Proof. Let $$f$$ be homeomorphism and $$g = f^{-1}$$. Then, $$g^{-1} = f$$.

We first show that $$f$$ is an open mapping.

1. Let $$A \subseteq X$$ be open.

2. Since $$g$$ is continuous, hence $$g^{-1}(A)$$ is open due to by Theorem 3.42 (2).

3. But $$g^{-1}(A) = f(A)$$.

4. Thus, $$f(A)$$ is open whenever $$A$$ is open.

5. Thus, $$f$$ maps open sets to open sets.

6. Thus, $$f$$ is an open mapping.

We next show that $$f$$ is an open mapping.

1. Let $$A \subseteq X$$ be closed.

2. Since $$g$$ is continuous, hence $$g^{-1}(A)$$ is closed due to by Theorem 3.42 (5).

3. But $$g^{-1}(A) = f(A)$$.

4. Thus, $$f(A)$$ is closed whenever $$A$$ is closed.

5. Thus, $$f$$ maps closed sets to closed sets.

6. Thus, $$f$$ is a closed mapping.

A similar reasoning establishes that $$g = f^{-1}$$ is also both a closed and an open mapping.

### 3.6.6.3. Metric Equivalence as homeomorphism#

Theorem 3.50 (Metric equivalence and identity homeomorphism)

Two metrics $$d_1$$ and $$d_2$$ on $$X$$ are equivalent if and only if the identity mapping $$I : (X, d_1) \to (X, d_2)$$ given by

$I (x) = x \Forall x \in X$

is a homeomorphism.

Proof. Identity function is a bijection and is the inverse of itself. Thus, $$I^{-1} = I$$.

Recall from Definition 3.25 that two metrics are equivalent if they generate the same topology.

Assume $$d_1, d_2$$ to be equivalent.

1. Let $$A \in (X, d_2)$$ be open.

2. Then, $$I^{-1}(A) = A$$.

3. But $$A$$ is open in $$(X, d_1)$$ also since the metrics are equivalent.

4. Thus, for every open set $$A$$ in $$(X, d_2)$$ $$I^{-1}(A)$$ is open in $$(X, d_1)$$.

5. Therefore, $$I$$ is continuous due to Theorem 3.42.

6. Similarly, by starting with an open set in $$(X, d_1)$$, we can show that $$I^{-1}$$ is also continuous.

7. Thus, $$I$$ is bijective, and both $$I$$ and $$I^{-1}$$ are continuous.

8. Thus, $$I$$ is a homeomorphism.

Now, assume $$I$$ to be a homeomorphism.

1. We first show that if $$A$$ is an open set in $$(X, d_1)$$ then $$A$$ is an open set in $$(X, d_2)$$ also.

2. By Theorem 3.49, $$I$$ is both an open mapping and a closed mapping.

3. Thus, if $$A$$ is an open set in $$(X, d_1)$$, then $$I(A)= A$$ is an open set in $$(X, d_2)$$ also.

4. We now show that if $$A$$ is an open set in $$(X, d_2)$$ then $$A$$ is an open set in $$(X, d_1)$$ also.

5. Since $$I^{-1} = I$$, and $$I$$ is an open mapping, hence, if $$A$$ is an open set in $$(X, d_2)$$, then $$I^{-1}(A)= I(A) = A$$ is an open set in $$(X, d_1)$$ also.

6. Thus, every set in $$(X, d_1)$$ is open if and only if it is open in $$(X, d_2)$$.

7. Thus, both metric spaces have same topology.

8. Thus, the metrics $$d_1$$ and $$d_2$$ are equivalent.

We can construct another proof by using an equivalent definition of equivalent metrics. In Theorem 3.37, we showed that two metrics are equivalent if and only if their convergent sequences are identical. This proof is from .

Proof. Let $$\{x_n \}$$ be a sequence of $$X$$.

Assume that the two metrics are equivalent.

1. Then, $$\lim d_1(x_n, x) = 0 \iff \lim d_2(x_n, x) = 0$$.

2. Thus, if $$\lim d_1(x_n, x) = 0$$ then $$\lim d_2(x_n, x) = \lim d_2(I(x_n), I(x)) = 0$$ means that $$I$$ is continuous.

3. Similarly, if $$\lim d_2(x_n, x) = 0$$ then $$\lim d_1(x_n, x) = \lim d_1(I^{-1}(x_n), I^{-1}(x)) = 0$$ means that $$I^{-1}$$ is continuous.

4. Thus, $$I$$ is a homeomorphism.

Assume that $$I$$ is a homeomorphism.

1. $$I$$ is continuous. Hence $$\lim d_1(x_n, x) = 0$$ implies $$\lim d_2(I(x_n), I(x)) = d_2(x_n, x) = 0$$.

2. $$I^{-1}$$ is continuous. Hence $$\lim d_2(x_n, x) = 0$$ implies $$\lim d_1(I^{-1}(x_n), I^{-1}(x)) = d_1(x_n, x) = 0$$.

3. Hence, the metrics $$d_1$$ and $$d_2$$ are equivalent.

### 3.6.6.4. Closures#

Theorem 3.51 (Homeomorphisms preserve closures)

Let $$f: (X,d) \to (Y, \rho)$$ be a homeomorphism. Let $$A \subseteq X$$. Then,

$f(\closure A) = \closure f(A).$

In other words, a homeomorphism preserves closures.

Compare this with the result in Theorem 3.44. We no longer have to take another closure on the L.H.S..

Proof. Since $$f$$ is a homeomorphism, hence $$f$$ is bijective, $$f^{-1}$$ exists and both $$f$$ and $$f^{-1}$$ are continuous.

Since $$f$$ is continuous, hence by Theorem 3.42 (4)

$f(\closure A) \subseteq \closure f(A).$

We showed in Theorem 3.44 that

$\closure f(\closure A) = \closure f(A).$

Thus, if we can show that $$f(\closure A)$$ is closed, then we are done.

By Theorem 3.49, $$f$$ is a closed mapping.

Hence, $$f(\closure A)$$ is a closed set. Thus,

$\closure f(\closure A) = f(\closure A) = \closure f(A).$

### 3.6.6.5. Interiors#

Theorem 3.52 (Homeomorphisms preserve interiors)

Let $$f: (X,d) \to (Y, \rho)$$ be a homeomorphism. Let $$A \subseteq X$$. Then,

$f(\interior A) = \interior f(A).$

In other words, a homeomorphism preserves interiors.

Proof. Since $$f$$ is a homeomorphism, it is bijective and both $$f$$ and $$g = f^{-1}$$ are continuous.

We first show that $$f(\interior A) \subseteq \interior f(A)$$.

1. Let $$A \subseteq X$$ be arbitrary.

2. Due to Theorem 3.45,

$f(\interior A) \subseteq \interior f(A)$

since $$g$$ is continuous and $$f=g^{-1}$$.

We next show that $$\interior f(A) \subseteq f(\interior A)$$.

1. Let $$y \in \interior f(A)$$.

2. Then, there exists an open ball in $$Y$$ around $$y$$ such that

$y \in U = B(y, r) \subseteq f(A).$
3. Therefore,

$f^{-1}(y) \in f^{-1}(U) \subseteq f^{-1} (f(A)) = A$

since $$f$$ is bijective.

4. Now, since $$f$$ is a homeomorphism, hence $$f^{-1}$$ is an open mapping (Theorem 3.49).

5. Thus, since $$U$$ is open, hence $$f^{-1}(U)$$ is open.

6. Thus, $$f^{-1}(U)$$ is an open neighborhood of $$f^{-1}(y)$$ contained in $$A$$.

7. Thus, $$f^{-1}(y)$$ is an interior point of $$A$$.

8. Thus, $$f^{-1}(y) \in \interior A$$.

9. Thus, $$y \in f(\interior A)$$.

10. We have shown that $$y \in \interior f(A) \implies y \in f(\interior A)$$.

11. Thus, $$\interior f(A) \subseteq f(\interior A)$$.

Combining the two inclusions:

$\interior f(A) = f(\interior A).$

## 3.6.7. Isometry#

Definition 3.42 (Isometry)

A function $$f : (X, d) \to (Y, \rho)$$ is an isometry if for all $$x, y \in \dom f$$, we have:

$\rho(f(x), f(y)) = d(x, y).$

Theorem 3.53 (Isometries are injective)

Let $$f : (X, d) \to (Y, \rho)$$ be an isometry. Then, $$f$$ is injective.

Proof. We proceed as follows:

1. Let $$x_1, x_2 \in \dom f$$ with $$x_1 \neq x_2$$.

2. Then, $$d(x_1, x_2) > 0$$ since $$d$$ is a metric.

3. Since $$f$$ is an isometry, hence $$\rho(f(x_1), f(x_2)) = d(x_1, x_2) > 0$$.

4. Thus, $$f(x_1) \neq f(x_2)$$ since $$\rho$$ is a metric.

5. Thus, $$x_1 \neq x_2 \implies f(x_1) \neq f(x_2)$$.

6. Thus, $$f$$ is injective.

Theorem 3.54 (Isometries are uniformly continuous)

Let $$f : (X, d) \to (Y, \rho)$$ be an isometry. Then, $$f$$ is uniformly continuous.

Proof. Let $$\epsilon > 0$$. Choose $$\delta = \epsilon$$. Then, for any $$x,y \in \dom f$$,

$d(x,y) < \delta \implies \rho(f(x), f(y)) < \delta = \epsilon$

since $$f$$ is an isometry. Thus, $$f$$ is uniformly continuous on $$\dom f$$.

Definition 3.43 (Isometric spaces)

Two metric spaces $$(X, d)$$ and $$(Y, \rho)$$ are called isometric if there exists an isometry $$f : X \to Y$$ such that $$\dom f = X$$ and $$\range f = Y$$.

Such an isometry is bijective.

Theorem 3.55

Two metric spaces which are isometric are necessarily homeomorphic.

Proof. Let $$(X,d)$$ and $$(Y, \rho)$$ be isometric. Then, there exists an isometry $$f$$ from $$X$$ to $$Y$$ which is bijective. Since $$f$$ is an isometry, it is continuous. It is easy to see that $$f^{-1}$$ is also an isometry and is continuous. Thus, the metric spaces are homeomorphic.

## 3.6.8. Bounded Metric#

This section is dedicated to the development of a bounded metric on any metric space.

Theorem 3.56 (Bounded metric)

If $$d$$ is a metric on a set $$X$$, then the function $$\rho$$ given by

$\rho(x, y) = \frac{d(x,y)}{1 + d(x,y)}$

is also a metric on $$X$$. Besides, $$(X, \rho)$$ is bounded and $$\rho$$ is equivalent to $$d$$.

We structure the proof into three parts:

1. Show that $$\rho$$ is a metric.

2. Show that $$(X, \rho)$$ is bounded.

3. Show that $$\rho$$ and $$d$$ are equivalent.

Proof. $$\rho$$ is a metric.

(1) Non-negativity: Since $$d(x,y) \geq 0$$, hence $$\rho(x, y) \geq 0$$ as it is a ratio of a non-negative number with a positive number.

(2) Identity of indiscernibles:

1. Assume $$\rho(x, y) = 0$$.

2. Then $$d(x,y)=0$$.

3. Thus $$x=y$$ since $$d$$ is a metric.

4. Now, assume $$x=y$$.

5. Then $$d(x,y)=0$$.

6. Thus, $$\rho(x,y)=0$$.

(3) Symmetry:

$\rho(y, x) = \frac{d(y,x)}{1 + d(y,x)} = \frac{d(x,y)}{1 + d(x,y)} = \rho(x, y).$

(4) Triangle inequality. This will require some work.

Consider the function $$f: \RR \to \RR$$:

$f(t) = \frac{t}{1+t}$

with $$\dom f = \RR_+$$.

Its derivative is

$f'(t) = \frac{1}{(1+t)^2}.$

$$f'(t) \geq 0$$ for $$t \in \RR_+$$. Thus, $$f$$ is an increasing function on $$t \geq 0$$. In particular:

$d(x, y)\leq d(x, z) + d(z, y) \implies f(d(x,y)) \leq f(d(x, z) + d(z, y)).$

Now, we proceed as follows:

\begin{split} \begin{aligned} \rho(x, y) &= f(d(x,y)) \\ &\leq f(d(x, z) + d(z, y))\\ &= \frac{d(x, z) + d(z, y)}{1 + d(x, z) + d(z, y)}\\ &= \frac{d(x, z)}{1 + d(x, z) + d(z, y)} + \frac{d(z, y)}{1 + d(x, z) + d(z, y)}\\ &\leq \frac{d(x, z)}{1 + d(x, z)} + \frac{d(z, y)}{1 + d(z, y)}\\ &= \rho(x,z) + \rho(z,y). \end{aligned} \end{split}

Proof. $$\rho$$ is a bounded

It is easy to see that

$\sup \rho(x, y) = 1.$

Thus, $$(X, \rho)$$ is bounded.

Proof. $$\rho$$ is equivalent to $$d$$

We first show that the identity mapping $$I : (X, d) \to (X, \rho)$$ is continuous.

Let $$a \in X$$ and choose $$\epsilon > 0$$. Recall that $$\rho$$ is bounded with $$\rho(x,y) < 1$$.

Thus, if $$\epsilon \geq 1$$, we can choose any $$\delta > 0$$ leading to $$\rho(x,y) < \epsilon$$ whenever $$d(x,y) < \delta$$.

Now, consider the case $$\epsilon < 1$$.

\begin{split} \begin{aligned} &\rho(x, a) < \epsilon\\ &\iff \frac{d(x,a)}{1 + d(x,a)} < \epsilon\\ &\iff 1 - \frac{d(x,a)}{1 + d(x,a)} > 1 - \epsilon\\ &\iff \frac{1}{1 + d(x,a)} > 1 - \epsilon\\ &\iff 1 + d(x, a) < \frac{1}{1 - \epsilon}\\ &\iff d(x,a) < \frac{\epsilon}{1 - \epsilon}. \end{aligned} \end{split}

Now, choosing $$\delta = \frac{\epsilon}{1 - \epsilon}$$, we note that $$\delta > 0$$ for $$0 < \epsilon < 1$$.

Thus, for every $$\epsilon > 0$$, there exists $$\delta > 0$$ such that $$\rho(x, a) < \epsilon$$ whenever $$d(x, a) < \delta$$.

Hence, $$I$$ is continuous. A similar argument also shows that $$I^{-1}$$ is continuous.

Thus, $$I$$ is homeomorphism and the metric spaces $$(X, d)$$ and $$(X, \rho)$$ are homeomorphic.

Hence, due to Theorem 3.50, the two metrics are equivalent.

## 3.6.9. Lipschitz Continuity#

Definition 3.44 (Local Lipschitz continuity at a point)

Let $$f : (X,d) \to (Y, \rho)$$ be a (partial) function with $$S = \dom f$$.

We say that $$f$$ is locally Lipschitz continuous at some $$a \in S$$ if there is a constant $$L$$ (depending on $$a$$) and $$\delta > 0$$ (depending on $$a$$) such that

$\rho(f(x),f(a)) \leq L d(x, a)$

for every $$x \in B(a, \delta) \cap S$$.

In other words, for every $$x \in S$$

$d(x, x) < \delta \implies \rho(f(x), f(a)) \leq L d(x, a).$

Definition 3.45 (Lipschitz function)

Let $$f : (X,d) \to (Y, \rho)$$ be a (partial) function with $$S = \dom f$$.

We say that $$f$$ is a Lipschitz function if there is a constant $$L > 0$$ such that

$\rho(f(x),f(y)) \leq L d(x, y)$

for every $$x, y \in S$$.

Sometimes, we also say that $$f$$ is Lipschitz continuous on its domain.

Example 3.18

Let $$f(x) = \frac{1}{x}$$ with $$\dom f = (0, \infty)$$.

Choose some $$a > 0$$. Then, for any $$x > 0$$,

$|f(x) - f(a) | = \left |\frac{1}{x} - \frac{1}{a} \right | = \frac{|a - x|}{x a} = \frac{1}{x a} |a - x|.$

There is no single value of $$L$$ such that $$L \geq \frac{1}{x a}$$ for every $$x, a > 0$$. Thus, $$f$$ is not a Lipschitz function.

However, if we consider $$\delta = \frac{a}{2}$$, and consider the neighborhood $$(a-\delta, a + \delta)$$ then

1. $$x > a - \delta = \frac{a}{2}$$.

2. Thus, $$\frac{1}{x a} < \frac{2}{a^2}$$.

3. Thus, $$|f(x) - f(a) | < \frac{2}{a^2} |a - x|$$ for every $$x \in (a-\delta, a + \delta)$$.

4. Thus, $$f$$ is locally Lipschitz continuous at $$a$$ with $$L = \frac{2}{a^2}$$.

5. We can see that both $$L$$ and $$\delta$$ depend on $$a$$.

Now, restrict the domain of $$f$$ to $$(c, \infty)$$ for some $$c > 0$$.

1. Let $$x, y \in (c, \infty)$$.

2. Then, $$xy > c^2$$.

3. Thus, $$\frac{1}{xy} < \frac{1}{c^2}$$.

4. Thus, $$|f(x) - f(y)| < \frac{1}{c^2} |x - y|$$.

5. Choosing $$L = \frac{1}{c^2}$$, we see that $$f$$ is a Lipschitz function.

Theorem 3.57 (Lipschitz $$\implies$$ uniform continuity)

Every Lipschitz function is uniformly continuous.

Proof. Let $$f : (X,d) \to (Y, \rho)$$ be a function with $$S = \dom f$$. Assume that $$f$$ is Lipschitz. Thus, there exists $$L > 0$$ such that

$\rho(f(x),f(y)) \leq L d(x, y)$

for every $$x, y \in S$$.

1. Let $$\epsilon > 0$$.

2. Let $$\delta = \frac{\epsilon}{L}$$.

3. Let $$x, y \in S$$ such that $$d(x, y) < \delta$$.

4. Then,

$\rho(f(x),f(y)) \leq L d(x, y) < L \frac{\epsilon}{L} = \epsilon.$
5. Thus, for every $$\epsilon > 0$$, there exists $$\delta > 0$$ given by $$\delta = \frac{\epsilon}{L}$$ such that for every $$x, y \in S$$

$d(x, y) < \delta \implies \rho(f(x),f(y)) < \epsilon.$
6. Thus, $$f$$ is uniformly continuous.