Skip to content

Problem Sheet 2

Question 1

Show that \(d_1(f, g) = \int_0^1 |f(t) - g(t)| \, dt\) and \(d_2(f, g) = \left(\int_0^1 |f(t) - g(t)|^2 \, dt \right)^{1/2}\) are both metrics on the set \(C[0,1]\).

Solution

We first prove \(d_1\) is a metric on the set \(C[0, 1]\).

  • For positive definiteness we prove the contrapositive, that is suppose that \((f - g)(t) \neq 0\) for some \(t \in [0, 1]\). As \(f - g\) is continuous, then there is some \(\delta\) such that for all \(x \in [0, 1] \cap [t - \delta, t + \delta]\), we have that

    \[|(f - g)(x) - (f - g)(t)| < |(f - g)(t)| / 2 \implies |(f - g)(x)| > |(f - g)(t)| / 2.\]

    And so we have that,

    \[d_1(f, g) \geq \int_{[0, 1] \cap [t - \delta, t + \delta]} |(f - g)(x)| \, dx > \delta|(f - g)(t)| / 2 > 0.\]
  • For symmetry, clearly we have,

    \[d_1(f, g) = \int_0^1 |f(t) - g(t)| \, dt = \int_0^1 |g(t) - f(t)| \, dt = d_1(g, f).\]
  • For triangle inequality for \(d_1\) we use the triangle inequality on real numbers to give,

    \[d_1(f, g) + d_1(g, h) = \int_0^1 |f(t) - g(t)| \, dt + \int_0^1 |g(t) - h(t)| \, dt = \int_0^1 |f(t) - g(t)| + |g(t) - h(t)| \, dt \geq \int_0^1 |f(t) - h(t)| = d_1(f, h).\]

Very similar ideas follow for proving \(d_2\) is a metric.

Question 3

Which of the following are metrics on \(\mathbb{R}^n\)?

  1. \(d(\mathbf{x}, \mathbf{y}) = \left| |\sum_{j = 1}^n x_j| - |\sum_{j = 1}^n y_j| \right|\).
  2. \(d(\mathbf{x}, \mathbf{y}) = \sum_{j = 1}^n \sqrt{|x_j - y_j}\).
  3. \(d(\mathbf{x}, \mathbf{y}) = \sum_{j = 1}^n (x_j - y_j)^2\).

Proof

  1. No. Consider \(\mathbf{x} = (0, 1)\) and \(\mathbf{y} = (1, 0)\) in \(\mathbb{R}^2\). Then \(d(\mathbf{x}, \mathbf{y}) = |1 - 1| = 0\) but \(\mathbf{x} \neq \mathbf{y}\).
  2. Yes. Positive definiteness and symmetry are clear. We can show triangle inequality by applying the \(\sqrt{a + b} \leq \sqrt{a} + \sqrt{b}\) inequality on real numbers, element wise.
  3. No. Consider \(d((1, 0), (-1, 0)) = 4 > d((1, 0), (0, 0)) + d((0, 0), (-1, 0)) = 1 + 1 = 2\).

Question 5.

Suppose that \((X, d)\) is a metric space and that \(\alpha \geq 0\). Define \(d'(x, y) = d(x, y)^\alpha\). For which \(\alpha\) are you guaranteed that \(d'\) is a metric on \(X\)?

Proof

From Question 3, it looks as if \(0 < \alpha \leq 1\) should be the values we require. Notably if \(\alpha = 1\) then the result follows. Now suppose that \(0 < \alpha < 1\). For positive definiteness and symmetric, these follow for any \(\alpha > 0\) we now we show triangle inequality.

We need \(d(x, z)^\alpha \leq d(x, y)^\alpha + d(y, z)^\alpha\). However since \(d(a, b) \in \mathbb{R}\) it suffices to show for all \(a, b \geq 0\)

\[(a + b)^\alpha \leq a^\alpha + b^\alpha.\]

Fix \(b \geq 0\) and consider \(f : \mathbb{R}^+ \to \mathbb{R}^+\) defined by \(f(a) = a^\alpha + b^\alpha - (a + b)^\alpha\). Then

\[f'(a) = \alpha a^{\alpha - 1} - \alpha(a + b)^{\alpha - 1} = \alpha(a^{\alpha - 1} - (a + b)^{\alpha - 1}).\]

For \(0 < \alpha \leq 1\) we have \(a^{\alpha - 1} \geq (a + b)^{\alpha - 1}\) hence \(f'(a) > 0\) for all \(a\). Thus \(f(a) > 0\) for all \(a > 0\) since \(f(0^{-}) = 0\).

However if \(\alpha > 1\), then \(d'\) may or may not be a metric. For example if \(d\) is the discrete metric, then \(d' = d\). But similar to Question 3c), if we consider \((\mathbb{R}, \left| \cdot \right|)\), then take \(x = 1, y = -1\) and \(z = 0\). Then \(d'(x, y) = 2^\alpha > 2 = d'(x, z) + d'(y, z) = 1\).

Question 6

Let \(X = C[0, 1]\) under the metric \(d_\infty\). Let

\[ Y = \{ f \in C[0, 1] : f(0) \neq 0\}.\]
  1. Prove that \(Y\) is open in \((C[0, 1], d_\infty)\)
  2. Is \(Y\) open in \((C[0, 1], d_1)?\)

Solution

  1. We show that \(Y = \mathrm{Int}(Y)\). The reverse direction is obvious. Now let \(f \in Y\), then there is some \(g \in B(f, |f(0)|)\).

    \[\begin{align*} |g(0)| &= |f(0) - (f(0) - g(0))| \\ &\geq |f(0)| - |f(0) - g(0)| \\ &\geq |f(0)| - d_\infty (f,g) \\ &> |f(0)| - |f(0)| \\ &= 0 \end{align*}\]

    hence \(g \in Y\). Thus \(Y\) is open in \((X, d_\infty)\).

  2. We claim that \(Y\) is open in \((X, d_1)\). The sequence \((f_n)_{n=1}^\infty\) where \(f_n(t) = (1 - t)^n\) is in \(Y\) and converges to \(0\) in \(d_1\) but \(0 \notin Y\).

Question 7

Let \(X = \mathbb{R}^2\) with the usual metric. For each of the following sets, identify the interior points and the boundary points, and decide whether the set is open, closed or neither.

  1. \(Y_1 = \{(x, y) \in \mathbb{R}^2: \sin x < y < \cos x\}\),
  2. \(Y_2 = \mathbb{Q} \times \mathbb{R}\),
  3. \(Y_3 = \{(\cos \frac{1}{t}, t) : t > 0\}\),
  4. \(Y_4 = \cup_{k=1}^\infty B((\frac{1}{k}, 0), \frac{1}{3k^2})\).

Solution

  1. Open since we can define continuous functions \(f_1, f_2 : \mathbb{R}^2 \to \mathbb{R}\) by \(f_1(x, y) = y - \sin x\) and \(f_2(x, y) = y - \cos x\). Then \(Y_1 = f_1^{-1}((0, \infty)) \cap f_2^{-1}((-\infty, 0))\). So \(\mathrm{Int}(Y_1) = Y_1\). The boundary can be identified as

    \[\mathrm{Bd}(Y_1) = \{(x, y) : \sin x = y \leq \cos x\} \cup \{(x, y) : \sin x \leq y = \cos x\}.\]
  2. No interior points and the boundary is \(\mathbb{R}^2\). Since between any two rational numbers you can find a real number. Neither open nor closed.

  3. No interior, and the boundary is \(Y_3 \cup [-1, 1] \times \{0\}\) so neither open nor closed.
  4. This is the union of open balls so clearly \(Y_4\) is open. We can see that its boundary includes \(\{(0, 0)\}\). Observe that the distance between the \(k\)th ball and the \((k + 1)\)th ball is

    \[\frac{1}{k} - \frac{1}{3k^2} - \left(\frac{1}{k + 1} + \frac{1}{3(k + 1)^2} \right) = \frac{3k^2 + k - 1}{3k^2(k + 1)^2}.\]

    which is positive for \(k \geq 1\), and so the boundary of \(Y_4\) is the circumferences of all the circles unioned with \(\{(0, 0)\}\).

Question 9

Prove that a finite union of closed sets is closed. Prove that the intersection of closed sets is closed.

Solution

Let

\[ F = \bigcup_{k = 1}^n F_k \]

be the union of a finite number of closed sets \(F_k\), and suppose \(x\) does not belong to \(F\). Then \(x\) does not belong to any of the sets \(F_k\) and hence cannot be a limit point of any of them. But then, for every \(k\), there is a ball \(B(x, \epsilon_k)\) containing no more than a finite number of points of \(F_k\). Choosing

\[ \epsilon = \min \{ \epsilon_1, \dots, \epsilon_n \}, \]

we get a ball \(B(x, \epsilon)\) so that \(x\) cannot be a limit point of \(F\). This proves that a point \(x \notin F\) cannot be a limit point of \(F\). Therefore \(F\) is closed.

Given arbitrary number of closed sets \(F_{\alpha}\) indexed by a parameter \(\alpha\), let \(x\) be a limit point of the intersection

\[ F = \bigcap_\alpha F_{alpha}. \]

Then any ball \(B(x, \epsilon)\) contains infinitely many points of \(F\), and hence infinitely many points of each \(F_\alpha\). Therefore \(x\) is a limit point of each \(F_\alpha\) and hence belongs to each \(F_\alpha\), since the sets \(F_\alpha\) are all closed. It followws that \(x \in F\), and hence that \(F\) itself is closed.

Question 10

Give examples of a metric space \((X, d)\) and a infinite family of closed sets \(\{E_j\}_{j = 1}^\infty\) in \(X\) such that

  1. \(\cup_{j = 1}^\infty E_j\) is not closed,
  2. \(\cup_{j = 1}^\infty E_j\) is closed,
  3. \(\cup_{j = 1}^\infty E_j\) is open and closed.

Solution

We take the metric space \((\mathbb{R}, |\cdot|)\) for all of the parts:

  1. \(E_j = [\frac{1}{j}, j]\) gives \(\cup_{j = 1}^\infty E_j = (0, \infty)\), which is not closed.
  2. \(E_j = [0, 1]\) gives \(\cup_{j = 1}^\infty E_j = [0, 1]\), which is closed.
  3. \(E_j = [-j, j]\) gives \(\cup_{j = 1}^\infty E_j = \mathbb{R}\), which both open and closed.

Question 12

Are there any metric spaces in which there are exactly 5 sets which are both open and closed? What about 6 open and closed sets?

Solution

Let \((X, d)\) be a metric space. Then obviously we have that \(\emptyset\) and \(X\) are both open and closed. Now observe that sets which are both open and closed must occur in pairs. Since if \(A\) is closed and open, then \(A^c\) is also closed and open. So a metric space with exactly 5 clopen sets is impossible.

If a metric space has a finite number of clopen sets, then it must be a power of 2. Write \(X \sqcup_{i = 1}^n A_i\) where \(A_i\) is a clopen set. Then there are \(2^n\) ways to take unions of the \(A_i\)s, all of which are clopen. So there can also not be 6.

Question 15

  1. Suppose that \(f: \mathbb{R} \to \mathbb{Z}\) (with their usual metrics). Can \(f\) be continuous?
  2. Suppose that \(f: \mathbb{Z} \to \mathbb{R}\). Can \(f\) be continuous? Must \(f\) be continuous?

Solution

  1. Only if \(f\) is constant.
  2. Every \(f\) is continuous.