Introduction to Metric Spaces
Metric Spaces
Definition of a Metric Space
A metric space consists of:
A set M whose elements are the objects being studied.
A distance function D that assigns a real number to every pair of elements in M.
The distance function is written as
For elements X,Y∈M, the value D(X,Y) represents the distance between X and Y.
The elements of M do not have to be real numbers or points in the plane. They could be:
Real numbers
Complex numbers
Vectors
Functions
Points in R2
A finite collection of physical objects, such as markers
The set M and distance function D form a metric space only when D satisfies four properties.
The Four Metric Properties
1. Positivity
For every X,Y∈M,
Distances cannot be negative. The distance between two objects may be zero or positive, but never negative.
2. Non-degeneracy
The distance between two elements is zero if and only if the elements are identical:
This property ensures that the distance function distinguishes different elements. If two distinct elements had distance zero, the distance function would fail to separate them and would be considered degenerate.
The two directions of this statement are:
If X=Y, then D(X,Y)=0.
If D(X,Y)=0, then X=Y.
3. Symmetry
For every X,Y∈M,
The distance from X to Y is the same as the distance from Y to X.
4. Triangle Inequality
For every X,Y,Z∈M,
The direct distance from X to Y cannot be greater than the distance obtained by traveling from X to an intermediate point Z and then from Z to Y.
The triangle inequality formalizes the idea that taking a detour cannot make a journey shorter.
In Euclidean space, this corresponds to the fact that the length of one side of a triangle is less than or equal to the sum of the lengths of the other two sides.
The Discrete Metric
Definition
Let M be any set. The discrete metric on M is defined by
Thus, the discrete metric assigns:
Distance 0 to an element and itself
Distance 1 to every pair of distinct elements
For example, if M is a set of colored markers:
and
Every pair of different markers is exactly one unit apart, regardless of their physical locations.
Verifying the Discrete Metric
Positivity
The only possible values of the discrete metric are 0 and 1. Both are nonnegative, so
Therefore, positivity holds by construction.
Non-degeneracy
The definition directly gives
If two elements are the same, their distance is zero. If their distance is zero, they must be the same element.
Symmetry
If X=Y, then both D(X,Y) and D(Y,X) equal 0.
If X=Y, then both values equal 1.
Therefore,
Triangle Inequality
The triangle inequality requires
For the discrete metric:
The left-hand side is either 0 or 1.
Each term on the right-hand side is either 0 or 1.
Therefore, the right-hand side can be 0, 1, or 2.
The only possible way for the inequality to fail would be
However, if the right-hand side equals zero, then both terms must equal zero:
By non-degeneracy,
By transitivity of equality, X=Y, which implies
This contradicts the assumption that D(X,Y)=1. Hence, the only possible failure cannot occur, and the triangle inequality holds.
Therefore, every set equipped with the discrete metric is a metric space.
Geometry in the Discrete Metric
Changing the metric changes the geometry of the space. Familiar geometric objects, such as circles and discs, may look very different under different distance functions.
Circles in a Metric Space
A circle of radius r centered at a point P is the set
This consists of all points whose distance from the center is exactly r.
A closed disc of radius r centered at P is the set
This consists of all points whose distance from the center is at most r.
Discrete-Metric Circles
Suppose M is a finite set of markers with the discrete metric, and let P be one particular marker.
Circle of Radius 1
Every element different from P has distance 1 from P. Therefore,
The unit circle centered at P consists of every other marker in the set.
Circle of Radius 2
No element has discrete distance 2 from P, because the only possible distances are 0 and 1. Therefore,
The circle of radius 2 is empty.
Closed Disc of Radius 1
Every element of M has distance at most 1 from P:
D(P,P)=0
D(X,P)=1 for every X=P
Thus,
The closed disc of radius 1 is the entire metric space.
This differs greatly from Euclidean geometry, where a circle of radius 1 and a disc of radius 1 do not contain the entire plane.
The Taxi-Cab Metric
Definition
Let
For points
the taxi-cab metric, also called the Manhattan metric, is defined by
This distance adds:
The horizontal distance between the points
The vertical distance between the points
It does not measure the length of the straight-line segment between the points.
Example Calculation
Consider
The horizontal difference is
and the vertical difference is
Therefore,
The taxi-cab distance is 7.
In Euclidean distance, the straight-line distance would instead be
The two metrics generally produce different distances.
Interpretation
The taxi-cab metric models movement through a city arranged in a rectangular grid. A taxi cannot travel directly through buildings, so it must move along horizontal and vertical streets.
For example, traveling from one point to another might require:
Five blocks east
Two blocks north
The total distance is
blocks.
This is analogous to the number of horizontal and vertical movements required to reach the destination.
Verifying the Taxi-Cab Metric
Positivity
Absolute values are always nonnegative:
Therefore, their sum is nonnegative:
Non-degeneracy
First, if U=V, then U1=V1 and U2=V2. Therefore,
Conversely, suppose
Then
Both terms are nonnegative. A sum of nonnegative numbers can equal zero only if both terms equal zero:
Thus,
so U=V.
Therefore,
Symmetry
Using the fact that ∣a−b∣=∣b−a∣,
Therefore, the taxi-cab metric is symmetric.
Triangle Inequality
Let
The distance from U to V is
Insert the coordinates of W:
and
Therefore,
Applying the triangle inequality for absolute values, ∣a+b∣≤∣a∣+∣b∣, gives
Rearranging the terms,
The first group is D(U,W) and the second group is D(W,V). Hence,
Therefore, R2 equipped with the taxi-cab metric is a metric space.
Geometric Features of the Taxi-Cab Metric
Multiple Shortest Paths
In Euclidean space, two points have a unique shortest path: the straight-line segment connecting them.
Under the taxi-cab metric, there may be many shortest paths. Any path that:
Moves the required total distance horizontally
Moves the required total distance vertically
Avoids unnecessary movement in the opposite direction
has the same minimum length.
For example, if one point is five units east and two units north of another, a shortest path may:
Move all five units east, then two units north
Move two units north, then five units east
Alternate between horizontal and vertical movements
Every such route has length 7.
Detours involving movement west or south increase the total distance.
Circles in the Taxi-Cab Metric
A circle of radius r centered at the origin consists of all points (x,y) satisfying
For radius 2,
In each quadrant, this equation describes a line segment. The four line segments join to form a diamond shape with vertices
Thus, a taxi-cab circle centered at the origin is a diamond rather than the usual Euclidean circle.
The diamond includes points such as:
because each satisfies
The coordinates need not be integers; the taxi-cab metric applies to all points in R2.
Norms Induce Metrics
The Induced Metric
Let V be a normed vector space with norm ∥⋅∥. Define a distance function by
More generally, if the vectors are denoted by v,w∈V, then
This is called the metric induced by the norm.
The set of the metric space is the vector space itself, and the distance between two vectors is the norm of their difference.
Every normed vector space automatically becomes a metric space when distance is defined by D(v,w)=∥v−w∥.
The proof follows from the four norm properties.
Positivity of the Induced Metric
A norm is nonnegative, so
Since
it follows immediately that
Thus, positivity of the metric is inherited from positivity of the norm.
Non-degeneracy of the Induced Metric
The norm is non-degenerate, meaning
where 0 is the zero vector.
Therefore,
Hence,
Non-degeneracy of the metric is inherited from non-degeneracy of the norm.
Symmetry of the Induced Metric
Consider the distance from w to v:
Since
the absolute homogeneity property of the norm gives
Because ∣−1∣=1,
Therefore,
Symmetry follows from:
Vector addition and scalar multiplication in the vector space
The identity w−v=−(v−w)
The norm property ∥αx∥=∣α∣∥x∥
Triangle Inequality of the Induced Metric
For vectors v,w,u∈V,
Therefore,
Applying the triangle inequality for the norm,
Using the definition of the induced metric,
Thus,
Therefore, the induced metric satisfies the triangle inequality.
Relationship Between Inner Products, Norms, and Metrics
The constructions form a one-way hierarchy:
Inner Product Induces a Norm
In a real inner product space, an inner product can define a norm by
The inner product supplies the notion of vector magnitude.
Norm Induces a Metric
A norm then supplies a distance:
The distance is obtained by taking the norm of the displacement vector from w to v.
The Implication Does Not Generally Reverse
A metric space does not necessarily come from a normed vector space.
For example, a set of markers equipped with the discrete metric is a metric space, but it does not have:
A distinguished origin
Vector addition
Additive inverses
Scalar multiplication
A vector-space structure
Since it is not a vector space, it cannot be a normed vector space or an inner product space.
Therefore, the existence of a metric does not imply the existence of a norm or inner product.
Metrics on a Normed Vector Space
The norm-induced metric is a valid and natural metric on a normed vector space, but it is not necessarily the only possible metric.
For example, even if a vector space already has a norm-induced metric, the same underlying set can also be equipped with the discrete metric.
Thus:
A normed vector space always provides at least one natural metric through D(v,w)=∥v−w∥.
Other metrics may also be defined on the same set.
The norm-induced metric is a particular choice, not a unique one.
The essential distinction is that a norm automatically produces a metric, whereas an arbitrary metric does not automatically produce a vector space, norm, or inner product.

Ask anything
We've read this whole study set, so questions about it get the best answers.