Skip to main content

Section 1.1 Metrics, Norms and Inner Products

The central notion of this course is that of a metric space. This is a concept that allows one to generalise the notion of distance, and as a consequence the notions of convergence, continuity, etc., to an abstract setting and to many examples in a variety of contexts.

Definition 1.1.

Suppose that \(X\) is a set. A function \(d \maps X \times X \to \R\) is called a metric on \(X\) if it has the following properties:
  1. \(d(x,y) \ge 0\) for all \(x,y \in X\text{,}\)
  2. \(d(x,y) = 0\) if and only if \(x = y\text{,}\)
  3. \(d(x,y) = d(y,x)\) for all \(x,y \in X\) (symmetry) and
  4. \(d(x,z) \le d(x,y) + d(y,z)\) for all \(x,y,z \in X\) (triangle inequality).
The pair \((X,d)\) is then called a metric space.
Sometimes \(d\) is called a ‘distance function’ rather than a ‘metric’. Some authors require that \(X\) is non-empty in the definition of a metric space. We will not do this, but we will also not spend too much time worrying about empty metric spaces because they are not interesting.

Definition 1.2.

A normed space is a pair \((X, \n\blank)\text{,}\) where \(X\) is a vector space over \(\R\) and \(\n\blank \maps X \to \R\) is a function satisfying the following axioms:
  1. \(\n x \ge 0\) for all \(x \in X\text{;}\)
  2. \(\n x = 0\) if and only if \(x = 0\text{;}\)
  3. \(\n{\alpha x} = \abs\alpha \n x\) for all \(x \in X\) and all \(\alpha \in \R\text{;}\)
  4. \(\|x+y\| \le \n x+ \n y\) for all \(x, y \in X\) (triangle inequality).
The function \(\n\blank\) is then called a norm on \(X\text{.}\)
Any normed space \((X, \n\blank)\) gives rise to a metric space \((X,d)\) with metric \(d\) defined as follows:
\begin{gather} d(x, y) = \|x - y\|, \quad x, y \in X\tag{1.1} \end{gather}
We say the metric \(d\) is induced by the norm \(\n\blank\text{.}\) However, not every metric space arises this way. (We will see examples shortly.) Note that a normed space requires a certain algebraic structure (the structure of a vector space), but a metric space need not satisfy any such conditions. This means that in a normed space, we automatically have the operations of vector addition and multiplication by real numbers (scalars). In a generic metric space, such operations make no sense, unless additional properties are given.

Definition 1.3.

Let \(X\) be a vector space over \(\R\text{.}\) An inner product on \(X\) is a function \(\scp\blank\blank \maps X \times X \to \R\) such that
  1. \(\scp{x + y}{z} = \scp xz + \scp yz\) for all \(x,y,z \in X\text{;}\)
  2. \(\scp{\alpha x}{y} = \alpha \scp xy\) for all \(x,y \in X\) and \(\alpha \in \R\text{;}\)
  3. \(\scp xy = \scp yx\) for all \(x,y \in X\text{;}\)
  4. \(\scp xx \ge 0\) for all \(x \in X\text{,}\) with equality if and only if \(x = 0\text{.}\)
The pair \((X,\scp\blank\blank)\) is then called an inner product space.
You know from MA20216 (Algebra 2A) that for any inner product space \((X,\scp\blank\blank)\text{,}\) we have an induced norm \(\n\blank\) on \(X\text{,}\) defined by
\begin{gather} \n x = \sqrt{\scp xx}, \quad x \in X\text{.}\tag{1.2} \end{gather}
Moreover, we have the following important lemma (which have been proved in MA20216).

Example 1.5. Euclidean spaces.

Let \(n \in \N\) and define \(\scp\blank\blank \maps \R^n \times \R^n \to \R\) as follows:
\begin{equation*} \scp xy = \sum_{i = 1}^n x_i y_i, \quad x, y \in \R^n\text{.} \end{equation*}
This is an inner product (called the Euclidean inner product), which means that \((\R^n, \scp\blank\blank)\) is an inner product space (and also a normed space and a metric space).
Figure 1.1. All inner product spaces are normed spaces, and all normed spaces are both metric spaces and vector spaces. In your Algebra units you will have seen more general algebraic structures, and those of you taking Topology will have seen a wide-reaching generalisation of the notion of a metric space. In this unit we are primarily concerned with metric spaces. Among other things, this lays the groundwork for the Year 4 units ‘Functional analysis’ and ‘Analysis in Hilbert spaces’ which develop more specialised theories for normed and inner product spaces.

Example 1.6. Discrete metric.

Let \(X\) be a set. Define \(d(x,x) = 0\) for every \(x \in X\) and \(d(x,y) = 1\) if \(x \ne y\text{.}\) Then Axioms i, ii and iii in Definition 1.1 are clearly satisfied. Axiom iv is quite easy to verify, too, and so \(d\) is a metric, called the discrete metric, on \(X\text{.}\)

Example 1.7. Supremum norm.

For a given set \(S\text{,}\) consider the space \(B(S)\text{,}\) comprising all bounded
 1 
A function \(f \maps S \to \R\) is called bounded if there exists a constant \(M \ge 0\) such that \(\abs{f(x)} \le M\) for all \(x \in S\text{.}\)
functions \(f \maps S \to \R\text{.}\) This is a vector space with vector addition and scalar multiplication defined as follows: for \(f, g \in B(S)\) and \(\alpha \in \R\text{,}\) let
\begin{equation*} (f + g)(s) = f(s) + g(s), \quad s \in S\text{,} \end{equation*}
and
\begin{equation*} (\alpha f)(s) = \alpha f(s), \quad s \in S\text{.} \end{equation*}
If \(S\ne\varnothing\text{,}\) we may define \(\n\blank_{\sup}\maps B(S)\to\R\) by setting
\begin{equation*} \n f_{\sup}= \sup_{s \in S} |f(s)|\text{.} \end{equation*}
It is verified in Exercise 1.1.6 that \(\n\blank_{\sup}\) is a norm, called the supremum norm. Hence \((B(S),\n\blank_{\sup})\) is a normed space.
Figure 1.2. Graphical depiction of the supremum norm \(\n f_{\sup}\) of a function \(f \in B(S)\) where \(S\) is an interval \([a,b]\text{.}\) For all \(s \in [a,b]\) we have \(\abs{f(s)} \le \n f_{\sup}\text{,}\) and \(\n f_{\sup}\) is the smallest number with this property.
The triangle inequality gives rise to the following useful inequality.

Proof.

Suppose first that \(d(x, y) \ge d(y, z)\text{.}\) Then the desired inequality is equivalent to
\begin{equation*} d(x, y) - d(y, z) \le d(x, z)\text{,} \end{equation*}
which is just the triangle inequality rearranged. If \(d(x,y) \lt d(y,z)\text{,}\) we can use the same arguments.
Given a metric, normed, or inner product space, we may restrict the metric, norm, or inner product to a subset or vector subspace.

Definition 1.9.

Suppose that \((X,d)\) is a metric space and \(Y \subset X\) is a subset, and let \(d' = d|_{Y \times Y}\) denote the restriction of \(d\) to pairs of points in \(Y\text{.}\) Then \((Y,d')\) is a metric space and is called a metric subspace of \((X,d)\text{.}\) We call \(d'\) the induced metric.

Convention 1.10.

Since the induced metric \(d'\) in Definition 1.9 is just a restriction of \(d\text{,}\) we will often abuse notation and write \((Y,d)\text{.}\) Also, the specific symbol \(d'\) in is arbitrary; we could just as well have used different letter such as \(\rho\text{,}\) for instance, or some other symbol like \(d_Y\) to remind us of the dependence on \(Y\text{.}\) The important thing is not the symbol which is used but instead the terms ‘metric subspace’ and ‘induced metric’. The same goes for the two definitions below.

Definition 1.11.

Suppose that \((X, \n\blank)\) is a normed space and \(Y \subset X\) is a linear subspace, and let \(\n\blank'\) denote the restriction of \(\n\blank\) to points in \(y\text{.}\) Then \((Y, \n\blank')\) is a normed space and is called a normed subspace of \((X, \n\blank)\text{.}\)

Definition 1.12.

Suppose that \((X, \scp\blank\blank)\) is an inner product space and \(Y \subset X\) is a linear subspace, and let \(\scp\blank\blank'\) denote the restriction of \(\scp\blank\blank\) to pairs of points in \(Y\text{.}\) Then \((Y, \scp\blank\blank')\) is an inner product space and is called an inner product subspace of \((X, \scp\blank\blank)\text{.}\)

Example 1.13. \(C^0([a,b])\).

For \(a \lt b\text{,}\) consider the closed interval \([a,b]\text{.}\) Recall the space \(B([a,b])\) (comprising all bounded functions on \([a,b]\)) and consider the linear subspace \(C^0([a,b])\) comprising all continuous functions \(f \maps [a,b] \to \R\text{.}\) (By the Weierstrass extreme value theorem, any such function is bounded, thus we have the inclusion \(C^0([a,b]) \subset B([a,b])\text{.}\)) The restriction of the supremum norm to \(C^0([a,b])\) gives rise to a normed subspace of \(B([a,b])\text{.}\)

Definition 1.14.

Suppose that \((X, d_X)\) and \((Y, d_Y)\) are metric spaces. Then the metric space consisting of the set \(X \times Y\) and the metric \(d_{X \times Y}\) with
\begin{equation*} d_{X \times Y}((x_1, y_1), (x_2, y_2)) = \sqrt{(d_X(x_1, x_2))^2 + (d_Y(y_1, y_2))^2} \end{equation*}
(for \(x_1, x_2 \in X\) and \(y_1, y_2 \in Y\)) is called the product space of \((X,d_X)\) and \((Y,d_Y)\text{.}\)
Figure 1.3. The formula for the metric \(d_{X \times Y}\) in Definition 1.14 is motivated by the Pythagorean theorem. It says that the square of the distance between two points \((x_1,y_1)\) and \((x_2,y_2)\) in \(X \times Y\) is the sum of the squares of the distance \(d_X(x_1,x_2)\) between the \(X\)-components and the distance \(d_Y(y_1,y_2)\) between the \(Y\)-components.
You are asked in Exercise 1.1.9 to show that \(d_{X \times Y}\) is a metric on \(X \times Y\text{.}\) Product subspaces can also be defined for normed spaces and inner product spaces. The above is not the only way to equip \(X \times Y\) with a metric, but it arises naturally when you think of a metric induced by an inner product.

Definition 1.15.

Let \((X,d)\) be a metric space and \(S \subseteq X\text{.}\)
  • The diameter of \(S\) is \(\diam S = \sup_{x,y \in S} d(x,y)\text{.}\)
  • We say that \(S\) is bounded if \(\diam S \lt \infty\text{.}\)
  • If \(S=X\) is bounded, we say that the metric space \((X,d)\) is bounded.
  • If \((X,\n\blank)\) is a normed space, we say that \(S\) is bounded if \(\sup_{x \in S} \n x \lt \infty\text{.}\)
Since normed spaces are also metric spaces, we should check that the second and fourth bullet points in Definition 1.15 are equivalent. This is indeed the case; the details are requested in Exercise 1.1.11.

Convention 1.16.

When the metric \(d\) is clear from context, and as things get complicated, for brevity we will often omit it and say things like “\(X\) is a metric space”. This is especially true for later chapters. In particular,
  • If \(X\) is (a subset of) \(\R\) or \(\R^n\text{,}\) then, unless stated otherwise, we will assume that the relevant metric \(d\) is the Euclidean metric, and similarly use \(\n\blank\) and \(\scp\blank\blank\) to denote the Euclidean norm and inner product.
  • If \(X\) is (a subset of) a space \(B(S)\) of bounded functions \(S \to \R\text{,}\) then, unless stated otherwise, we will assume the relevant metric \(d\) is the one induced by the supremum norm, \(d(f,g)=\n{f-g}_{\sup}\text{.}\)
  • If \(X\) is (a subset of) a product \(Y \times Z\) where \((Y,d_Y)\) and \((Z,d_Z)\) are metric spaces, then, unless stated otherwise, we will assume the relevant metric is the one \(d_{Y \times Z}\) given in Definition 1.14 above.
Similarly,
  • If \((X,\n\blank)\) is a normed space, then, unless stated otherwise, we also think of it as a metric space \((X,d)\) with the induced metric \(d\) from (1.1).
  • If \((X,\scp\blank\blank)\) is an inner product space, then, unless stated otherwise, we also think of it as a normed space \((X,\n\blank)\) with the induced norm \(\n\blank\) from (1.2). We then also think of it is a metric \((X,d)\) with the induced metric \(d\) defined in (1.1).
You are of course also free to save ink by using these conventions on your problem sheets.

Exercises Exercises

1. Iterated triangle inequality.

Let \((X,d)\) be a metric space. Show that, for any finite list \(x_1,\ldots,x_n\) of points in \(X\text{,}\)
\begin{gather*} d(x_1,x_n) \le d(x_1,x_2) + d(x_2,x_3) + \cdots + d(x_{n-1},x_n) \text{.} \end{gather*}
Hint.
Repeatedly apply the triangle inequality, for instance using induction.

2. Spaces with three points.

Let \(X=\{1,2,3\}\) and let \(a,b,c\gt 0\) be positive real numbers. Define a function \(d \maps X \times X \to \R\) by
\begin{align*} d(1,1)\amp=d(2,2)=d(3,3)=0,\\ d(1,2)\amp=d(2,1)=a,\\ d(2,3)\amp=d(3,2)=b,\\ d(1,3)\amp=d(3,1)=c\text{.} \end{align*}
Find a necessary and sufficient condition on \(a,b,c\) for \(d\) to be a metric.
Hint.
The main thing to check is the triangle inequality. Since \(X\) only has three elements, this can be done by brute force.

3. Are these metric spaces?

Do the following definitions of a set \(X\) and a function \(d \maps X \times X \to \R\) give rise to a metric space \((X,d)\text{?}\)
(a)
Let \(X = \R^2\) and \(d(x, y) = \max\set{n \in \N \cup \{0\}}{n \le \n{x-y}}\) for \(x, y \in \R^2\) (so \(\n{x-y}\) is rounded down to the next integer).
(b)
Let \(X = \R^2\) and \(d(x,y) = \min\set{n \in \N \cup \{0\}}{n \ge \n{x-y}}\) for \(x, y \in \R^2\) (so \(\n{x-y}\) is rounded up to the next integer).
(c)
Let \(X\) be the set of all finite subsets of \(\N\) and \(d(A,B) = |A \setminus B| + |B \setminus A|\) for \(A, B \in X\text{,}\) where \(\abs S\) denotes the number of elements of a set \(S \subset \N\text{.}\)

4. The inner product is not the metric.

Consider the Euclidean inner product space \((\R^2,\scp\blank\blank)\text{,}\) with \(\n\blank\) and \(d\) the induced norm and metric.
(a)
Find a pair of points \(x,y \in \R^2\) with \(\scp xy \ne d(x,y)\text{.}\)
(b)
Find a pair of points \(x,y \in \R^2\) with \(\scp xy = d(x,y)\text{.}\)

5. (PS2) Some norms on \(\R^2\).

We saw in Example 1.5 that the mapping \(\n\blank_2 \maps \R^2 \to \R\) defined by \(\n x_2 = \sqrt{x_1^2 + x_2^2}\) is norm on the vector space \(\R^2\text{.}\) In this exercise we consider the alternative norms \(\n\blank_1\) and \(\n\blank_\infty\) defined by
\begin{align*} \n x_1 \amp = \abs{x_1} + \abs{x_2}, \\ \n x_\infty \amp = \max\{\abs{x_1},\abs{x_2}\} \end{align*}
for all \(x \in \R^2\text{.}\)
(a)
Show that \(\n\blank_1\) satisfies the triangle inequality, and conclude that \((\R^2,\n\blank_1)\) is a normed space. Sketch the set \(\set{x \in \R^2}{\n x_1 = 1}\text{.}\)
Hint.
Use the triangle inequality for \(\abs\blank\) and regroup terms.
(b)
Show that \(\n\blank_\infty\) satisfies the triangle inequality, and conclude that \((\R^2,\n\blank_\infty)\) is a normed space. Sketch the set \(\set{x \in \R^2}{\n x_\infty = 1}\text{.}\)
Hint.
This one is slightly trickier. In addition to the triangle inequality for \(\abs\blank\text{,}\) the obvious inequalities \(\abs{x_1}, \abs{x_2} \le \n x_\infty\) are also useful. I would advise against breaking into different cases based on whether \(\abs{x_1}\) or \(\abs{x_2}\) is larger and so on.
(c)
Show that, for any \(x \in \R^2\text{,}\) we have the four inequalities
\begin{gather} \n x_\infty \le \n x_2 \le \n x_1 \le \sqrt 2 \n x_2 \le 2 \n x_\infty \text{.}\tag{✶} \end{gather}
Hint 1.
It may be helpful to look back to your sketches from the previous two parts.
Hint 2.
For the third inequality, interpret \(\n x_1\) as the inner product of the vectors \((\abs{x_1},\abs{x_2})\) and \((1,1)\text{,}\) and use the Cauchy–Schwarz inequality.

6. (PS2) Supremum norm.

Let \(S\) be a set, and define \(B(S)\) and \(\n\blank_{\sup} \maps B(S) \to \R\) as in Example 1.7. (You can take for granted that \(B(S)\) is a vector space.) Show that \(\n\blank_{\sup}\) is a norm on \(B(S)\text{.}\)

7. Calculating supremum norms.

For each of following sets \(S\) and functions \(f \maps S \to \R\text{,}\) calculate the supremum norm \(\n f_{\sup} = \sup_{s \in S} \abs{f(s)}\text{.}\)
(a)
\(S = [0,1]\text{,}\) \(f(s)=s+e^s\text{.}\)
(b)
\(S=\R\text{,}\) \(f(s)=(s-1)/(s^2+1)\text{.}\)
Hint.
Don’t forget about the absolute values! Also, you will need to use basic calculus.

8. (PS2) Estimating supremum norms.

For each of following sets \(S\) and functions \(f \maps S \to \R\text{,}\) do not calculate the supremum norm \(\n f_{\sup}\text{,}\) but instead find an explicit constant \(C \gt 0\) such that \(\n f_{\sup} \le C\text{.}\)
(a)
\(S = [0,1]\text{,}\) \(f(s)=e^{-s^3} \sin s\text{.}\)
Hint.
Estimate each factor separately.
(b)
\(S=[-1,2]\text{,}\) \(f(s)=-s-s^2+s^3/2-s^5/100\text{.}\)
Hint.
Estimate each term separately. Remember that the definition of \(\n\blank_{\sup}\) involves not only a supremum but an absolute value.

9. (PS2) Product spaces.

Let \((X, d_X)\) and \((Y, d_Y)\) be metric spaces, and define \(d_{X \times Y} \maps (X \times Y) \times (X \times Y) \to \R\) as in Definition 1.14,
\begin{equation*} d_{X \times Y}((x_1, y_1), (x_2, y_2)) = \sqrt{(d_X(x_1, x_2))^2 + (d_Y(y_1, y_2))^2} \end{equation*}
for \(x_1, x_2 \in X\) and \(y_1,y_2 \in Y\text{.}\) Show that \((X \times Y, d_{X \times Y})\) is a metric space.
Hint 1.
In one step it is helpful to use the Cauchy–Schwarz inequality in \(\R^2\text{,}\) which implies that \(ab + cd \le \sqrt{a^2 + c^2} \sqrt{b^2 + d^2}\) for all \(a, b, c, d \in \R\text{.}\)
Hint 2.
If you are struggling with this problem, one strategy is to break things down into stages:
  1. First, carefully write down what it would mean for \((X \times Y, d_{X \times Y})\) to be a metric space.
  2. Then use the definition of \(d_{X \times Y}\) to rephrase the axioms to be proved in terms of the metrics \(d_X\) and \(d_Y\text{.}\)
  3. Finally, try prove these rephrased versions.
In my experience marking this question over the years, many students run into problems because they effectively jump straight to this last step but have made serious errors in the first two which prevent this from working.

10. Normed spaces are unbounded.

Let \((X,\n\blank)\) be a normed space, and suppose that there exists a non-zero element \(x_0 \in X\text{.}\) Show that \(X\) is unbounded.
Hint.
Consider points of the form \(\alpha x_0\) where \(\alpha \in \R\text{.}\)

11. Bounded sets in normed spaces.

Let \((X,\n\blank)\) be a normed space and let \(S \subseteq X\text{.}\) Show that \(\diam S \lt \infty\) if and only if \(\sup_{x \in S} \n x \lt \infty\text{.}\)