Topology 2: Metric Spaces and Euclidean n-Space
We won’t begin with the basic definitions of topology, but rather by considering a subclass of topological spaces known as “metric spaces”. We’re doing this because all metric spaces are in fact topological spaces, and they’re also “well-behaved” spaces that are more or less like the one we live in. The advantage of this is that it will help you see the point of the abstract definitions when we get to them.
Definition of a Metric Space
The term space in mathematics is imprecise, and really just means “set”; if X is the set {1, 4, -6, apple, {m}} then X can also be called a “space”, in which case its elements are called “points”. In this case, some of the points of X are numbers, one is a fruit and one is a set. X is a space having five points.
What makes a space a metric space is, of course, the addition of something called a “metric” to the set in question. A metric is any map that takes in two points in the space and maps them to a number. We write it “d(a, b)”, which you can read as “the distance between a and b”.
Metrics obey the following rules (read “≥” as “is greater than or equal to”):
- d(a, b) ≥ 0
- d(a, b) = d(b, a)
- d(a, b) = 0 if and only if a = b
- d(a, b) + d(b, c) ≥ g(a, c)
Any map from X2 to the real numbers R (see below) is a metric if it satisfies these criteria, and no map is a metric if it doesn’t.
The first criterion says that distances are never negative. That goes hand in hand with the second one, which says that when going from London to Paris you cover the same distance as when you go from Paris to London (assuming you take the same route).

The third rule says that the distance between a and b is zero only (and always) if a and b are the same things. So the distance from London to Londres is zero, but only because London and Londres are in fact different names for the same place.

The last of these criteria says “it’s no quicker to go around two sides of a triangle than it is to go along the other”. That’s a basic intuition we have about how distance works. In the next section we’ll see an example of a distance measure that fails to be a metric because it doesn’t obey the “triangle inequality”, as it’s called. All four of these rules are intended to capture what we mean by “distance”, not only in spaces like the one we live in but in very different ones as well.
Examples and Counterexamples
Example: The Taxicab Metric
Imagine you live in a place like midtown Manhattan, where the roads are laid out in a grid. To get from A to B you start at A, travel a certain number of blocks either east or west, then travel a certain number more blocks either north or south. One way to measure distance would be to measure how many blocks you have to go east-west and add the number of blocks you have to go north-south.

Say you start out at the corner of East 53rd and 2nd, and you want to get to West 47th and 6th. Well, you’d walk 6 blocks West (including Lexington, which isn’t numbered) and then 6 blocks south. By the “taxicab metric”, the distance from A to B was d(A, B) = 6 + 6 = 12. This is perhaps not a metric of great practical use in Manhattan, since the crosstown blocks are so much longer than the north-south ones, but you get the picture.
Formally, all we need is a set C of corners, which ideally would be just a pair of numbers like (53, 2), the place where we started. Then we define the metric as we described above; in full, if a = (w, x) and b = (y, z) then
d(a, b) = |w – y| + |x – z|
Here the vertical lines mean “make any negative values positive”, so |-4| = 4, say. Remember, we aren’t allowed negative distances, so this is important. Note that we’d have to renumber New York’s streets before this would work properly.
Example: The Real Number Line
The commonest by far will be the real numbers R; this set represents the standard number line. It includes positive and negative versions of all the whole and fractional (“rational”) numbers, plus some extra irrational numbers that are needed to “fill in the gaps”, and of course zero. Any finite length you might encounter in ordinary geometry can be measured using a real number, but R doesn’t include positive or negative infinity or any “infinitesimal” numbers.

The most natural metric on R is probably
d(x, y) = |x – y|
So that, for instance, the distance between 1.5 and 3.7 is 2.2. You may want to check for yourself that this “obvious” metric is in fact a metric (that is, if satisfies the four rules) and that it does behave the way we’d like; for instance, d(-1, 2) = 3 and so on.
Counterexample: The “Inverse Distance”
The number line R can have many other metrics defined on it. Here’s one that looks like, but actually isn’t, one. Define
d(x, y) = 0 if x = y and 1/|x – y| otherwise
This is odd because the distance between two points gets greater as they get, intuitively speaking, “closer together”. For instance, d(1, 2) = 1 but d(1, 3) = 1/2 and d(1, 5) is 1/4. But we don’t really have any rigorous way of saying two things are “close together” except by using a metric, so maybe that’s okay.
Let’s check the rules. Certainly d is never negative, and d(x, y) = d(y, x) for all x and y, simply because |x – y| has those properties. What’s more, by definition d(x, x) = 0. All that remains is the triangle inequality; but in fact the “inverse distance” measurement fails to satisfy it, so it can’t be called a metric. You may like to convince yourself of this failure by drawing a picture or, if you feel a bit stronger, proving it with basic algebra.
Example: Euclidean n-Space
Because R looks like a continuum — a line extending as far as you like in both directions, with no gaps — it’s a useful analogy for the space we live in, and its elements, the individual numbers, are points in that space. Bear in mind, though, that R is just a one-dimensional space, a single line.
We can make higher-dimensional spaces out of R by taking its product with itself. We’ll look at what this means in detail in a later post, but for now recall, if you can, the two-dimensional plane of analytic geometry, which you probably met at school.

This space is made by taking one copy of R — the so-called “x-axis” — and attaching another copy to every point on that axis. The result is a flat surface; it’s usual to indicate this by drawing one of the copies of R that was added — the one at zero — and calling it the “y-axis”. This space is called R2 (“R-squared”) and is the usual thing we have in mind when we talk about flat, two dimensional spaces.
We can continue this trick, putting more copies of R into the plane, sticking up and right-angles at every point. The result is the three-dimensional space R3; again, we usually identify just one of these copies of R, the one passing through the point (0, 0) on the plane, and call it the “z-axis”.

Don’t worry if this idea of creating 2- and 3-dimensional spaces using copies of a single line seems strange; we’ll look at how it works in more detail in a general topological setting later. The point is just to introduce the spaces we will use most often, the “Euclidean spaces” of 1, 2 and 3 dimensions (by convention, a 0-dimensional space is a single point).
Although it isn’t obvious, this process can be continued to create the family of spaces Rn. In all cases, the most “natural” metric to choose, other considerations aside, is the one that defines the distance between two points as the length of the shortest line between them — the distance as the crow flies. The formula, in n dimensions, happens to be
where xn is the nth co-ordinate of x and similarly for yn. It’s not important if you don’t know what the formula means, as long as you understand the general “shortest distance” idea.
The space Rn with this metric is called Euclidean n-space, and is perhaps the commonest of all topological spaces. In the next instalment we’ll look at maps between metric spaces, and see how the general idea of a metric helps us to say when such a map is “continuous”. The idea of continuous a map is the fundamental motivation for the more abstract ideas we’ll introduce when we look at topology in general.
This post is a part of a Topology Mini-Series







