Introduction to Metric Spaces
Metric Spaces: Distance, Geometry, and Metrics Induced by Norms
A metric space is a mathematical setting in which it is possible to talk about distance. The setting is intentionally broad: its elements might be real numbers, complex numbers, points in the plane, physical objects, or even a small collection of markers. What matters is not what the elements are, but whether a suitable notion of distance can be defined between them.
A metric space consists of two ingredients:
- A set M of elements.
- A function D that assigns a real-valued distance to every ordered pair of elements in M.
The distance function is written
D:M×M→R.For elements X,Y∈M, the value D(X,Y) represents the distance from X to Y. To qualify as a metric, the function must satisfy four fundamental properties.
The Four Properties of a Metric
Positivity
Distances cannot be negative. For every pair of elements X,Y∈M,
D(X,Y)≥0.This property is also called nonnegativity. It reflects the ordinary meaning of distance: a separation can be zero or positive, but not negative.
For example, a physical distance might be 3 meters, but it would not make sense for it to be −3 meters.
Non-degeneracy
The distance between two elements is zero exactly when the elements are the same:
D(X,Y)=0if and only ifX=Y.This is called non-degeneracy or the identity of indiscernibles. It ensures that the metric can distinguish different elements. If two distinct elements had distance zero, the distance function would be collapsing them together and would fail to represent genuine separation.
The phrase “if and only if” is important because both directions must hold:
- If X=Y, then D(X,Y)=0.
- If D(X,Y)=0, then X=Y.
Symmetry
The distance from X to Y must equal the distance from Y to X:
D(X,Y)=D(Y,X).The order of the two elements does not affect the distance. For instance, the distance from a green marker to an orange marker must be the same as the distance from the orange marker to the green marker.
The Triangle Inequality
For any X,Y,Z∈M,
D(X,Y)≤D(X,Z)+D(Z,Y).This property says that traveling directly from X to Y cannot be longer than traveling from X to Z and then from Z to Y.
The point Z represents a possible detour. The direct route from X to Y is never longer than a route that passes through an intermediate point.
In the ordinary Euclidean plane, the triangle inequality says that the length of one side of a triangle cannot exceed the sum of the lengths of the other two sides. If the points are X, Y, and Z, then
length(XY)≤length(XZ)+length(ZY).A metric is a rule for measuring distance that is nonnegative, separates distinct points, is symmetric, and obeys the triangle inequality.
Think About It
If a proposed distance function assigns a negative value to some pair of elements, which metric property fails immediately? What if two different elements have distance zero?
The Discrete Metric
The flexibility of the definition becomes clearer through an unusual example. Let M be a set containing five markers. The elements of M are not numbers or points in a plane; they are simply distinct objects.
Define the discrete metric by
D(X,Y)={0,1,X=Y,X=Y.Thus, the only possible distances are 0 and 1:
- An object has distance 0 from itself.
- Every pair of distinct objects has distance 1.
For example,
D(orange,orange)=0,while
D(orange,green)=1.The physical locations of the markers do not matter. Even if two distinct markers are placed very close together or very far apart, their discrete distance is still 1.
Verifying Positivity
The discrete metric only produces the values 0 and 1. Neither value is negative, so
D(X,Y)≥0.Therefore, positivity holds automatically.
Verifying Non-degeneracy
The definition directly gives
X=Y⟹D(X,Y)=0.Conversely, the only way the discrete metric can equal zero is if the two elements are the same. Therefore,
D(X,Y)=0⟺X=Y.Non-degeneracy holds.
Verifying Symmetry
If X=Y, then both D(X,Y) and D(Y,X) equal 0.
If X=Y, then both values equal 1. Hence,
D(X,Y)=D(Y,X).Symmetry holds.
Verifying the Triangle Inequality
The triangle inequality requires
D(X,Y)≤D(X,Z)+D(Z,Y).For the discrete metric, the left-hand side can only be 0 or 1. Each term on the right-hand side can also only be 0 or 1, so the sum on the right can be 0, 1, or 2.
The only possible way for the inequality to fail would be
D(X,Y)=1andD(X,Z)+D(Z,Y)=0.For the right-hand side to equal zero, both terms must be zero:
D(X,Z)=0andD(Z,Y)=0.By non-degeneracy, these imply
X=ZandZ=Y.By transitivity of equality,
X=Y.But then D(X,Y) must equal 0, contradicting the assumption that D(X,Y)=1. Therefore, the failure case is impossible, and the triangle inequality holds.
The marker set equipped with the discrete metric is therefore a metric space.
Geometry in the Discrete Metric
Changing the metric changes the geometry. A circle is defined using distance, so its appearance depends on the chosen distance function.
A circle centered at a point P with radius r is the set of all points at exactly distance r from P:
{X∈M:D(X,P)=r}.Unit Circles
Consider the discrete metric and a center marker P.
The unit circle centered at P consists of every other marker:
{X∈M:D(X,P)=1}.Since every marker different from P has distance 1 from P, all of those markers belong to the unit circle.
Circles of Radius Two
No two markers have discrete distance 2. Therefore, the circle centered at P with radius 2 is empty:
{X∈M:D(X,P)=2}=∅.This differs sharply from Euclidean geometry, where circles with many positive radii contain infinitely many points.
Closed Discs of Radius One
A closed disc of radius 1 centered at P consists of all points whose distance from P is at most $1:
{X∈M:D(X,P)≤1}.Every element of the discrete metric space has distance either 0 or 1 from P. Consequently, the closed disc of radius 1 is the entire set M.
This example shows that familiar geometric objects do not have universal appearances. Their descriptions depend on the metric being used.
Think About It
In the discrete metric, why is the circle of radius 2 empty while the closed disc of radius 1 contains every element?
The Taxi Cab Metric on the Plane
A second example uses the ordinary plane R2, but gives it a different notion of distance.
For points
U=(U1,U2)andV=(V1,V2),the taxi cab metric, also called the Manhattan metric, is defined by
D(U,V)=∣U1−V1∣+∣U2−V2∣.The first absolute value measures the horizontal separation, and the second measures the vertical separation. The two distances are added because movement is restricted to horizontal and vertical directions.
Example of Taxi Cab Distance
Consider
U=(−3,1)andV=(2,3).The horizontal separation is
∣−3−2∣=5,and the vertical separation is
∣1−3∣=2.Therefore,
D(U,V)=∣−3−2∣+∣1−3∣=5+2=7.The taxi cab distance is not the length of the straight line segment between the points. The Euclidean distance would measure the direct diagonal route, while the taxi cab metric measures the total horizontal and vertical movement required.
The name comes from a city-grid analogy. A taxi cannot drive directly through buildings. It must follow streets, moving along blocks. The distance is therefore the number of blocks traveled horizontally plus the number traveled vertically.
Verifying Positivity
Absolute values are always nonnegative:
∣U1−V1∣≥0and∣U2−V2∣≥0.Their sum is also nonnegative:
D(U,V)=∣U1−V1∣+∣U2−V2∣≥0.Thus, positivity follows directly from the definition.
Verifying Non-degeneracy
First, if U=V, then their coordinates are equal:
U1=V1andU2=V2.Therefore,
D(U,V)=∣U1−V1∣+∣U2−V2∣=∣0∣+∣0∣=0.For the converse, suppose
D(U,V)=0.Then
∣U1−V1∣+∣U2−V2∣=0.Both terms are nonnegative. A sum of nonnegative numbers can equal zero only if each term equals zero:
∣U1−V1∣=0and∣U2−V2∣=0.Thus,
U1=V1andU2=V2,which means U=V. Hence,
D(U,V)=0⟺U=V.Verifying Symmetry
The distance from V to U is
D(V,U)=∣V1−U1∣+∣V2−U2∣.Absolute value is unchanged when the order of subtraction is reversed:
∣V1−U1∣=∣U1−V1∣,∣V2−U2∣=∣U2−V2∣.Therefore,
D(V,U)=∣U1−V1∣+∣U2−V2∣=D(U,V).Symmetry holds.
Verifying the Triangle Inequality
Let
U=(U1,U2),V=(V1,V2),W=(W1,W2).The taxi cab distance from U to V is
D(U,V)=∣U1−V1∣+∣U2−V2∣.Insert W1 and W2 into the coordinate differences:
U1−V1=(U1−W1)+(W1−V1),and
U2−V2=(U2−W2)+(W2−V2).Using the triangle inequality for absolute value,
∣a+b∣≤∣a∣+∣b∣,gives
∣U1−V1∣≤∣U1−W1∣+∣W1−V1∣,and
∣U2−V2∣≤∣U2−W2∣+∣W2−V2∣.Adding these inequalities yields
D(U,V)≤∣U1−W1∣+∣U2−W2∣+∣W1−V1∣+∣W2−V2∣.Recognizing the two groups as taxi cab distances gives
D(U,V)≤D(U,W)+D(W,V).Thus, the taxi cab metric satisfies the triangle inequality, and R2 equipped with this metric is a metric space.
Shortest Paths in the Taxi Cab Metric
In Euclidean geometry, two points have one straight-line shortest path between them. The taxi cab metric allows many shortest paths.
For example, a route may move horizontally first and vertically second, vertically first and horizontally second, or alternate between the two directions. Every route that moves the required amount horizontally and vertically without unnecessary backtracking has the same total length.
The distance is determined by the total coordinate changes, not by the particular order in which those changes occur.
Circles in the Taxi Cab Metric
Consider the circle of radius 2 centered at the origin (0,0). A point (x,y) belongs to this circle when
D((x,y),(0,0))=2.Using the taxi cab formula,
∣x∣+∣y∣=2.This equation produces a diamond rather than the familiar Euclidean circle.
For example, points such as
(2,0),(0,2),(−2,0),(0,−2)lie on the circle. So do points such as
(1.5,0.5)and(0.5,1.5),because in each case the sum of the absolute coordinate values is 2.
The four line segments connecting these extreme points form a diamond. Therefore, the geometric appearance of a circle depends entirely on the metric used to define “equal distance from the center.”
Think About It
Why does the equation ∣x∣+∣y∣=2 produce a diamond, while a Euclidean circle is described by an equation involving x2+y2?
Norms Induce Metrics
A major connection exists between normed vector spaces and metric spaces.
A normed vector space V already has a function ∥⋅∥ that measures the size or magnitude of vectors. From this norm, a distance can be defined by
D(V,W)=∥V−W∥.This is called the metric induced by the norm. The set underlying the metric space is the set of vectors in the normed vector space.
The reason this construction works is that the four metric properties follow from the corresponding properties of the norm.
Positivity from Norm Positivity
A norm is always nonnegative, so
∥V−W∥≥0.Therefore,
D(V,W)≥0.The metric inherits positivity directly from the norm.
Non-degeneracy from Norm Non-degeneracy
A norm equals zero exactly when its argument is the zero vector:
∥X∥=0⟺X=0.For the induced metric,
D(V,W)=0⟺∥V−W∥=0.By non-degeneracy of the norm,
∥V−W∥=0⟺V−W=0.Adding W to both sides gives
V=W.Thus,
D(V,W)=0⟺V=W.Symmetry from Norm Multiplicativity
To prove symmetry, begin with
D(W,V)=∥W−V∥.Since
W−V=−(V−W),this becomes
D(W,V)=∥−(V−W)∥.The norm is absolutely homogeneous, meaning
∥αX∥=∣α∣∥X∥.Using α=−1 gives
∥−(V−W)∥=∣−1∣∥V−W∥=∥V−W∥.Therefore,
D(W,V)=∥V−W∥=D(V,W).Symmetry comes from the norm’s behavior under multiplication by the scalar −1.
The Triangle Inequality from the Norm Triangle Inequality
For any U,V,W∈V,
V−W=(V−U)+(U−W).Therefore,
D(V,W)=∥V−W∥=∥(V−U)+(U−W)∥.Applying the triangle inequality for the norm gives
∥(V−U)+(U−W)∥≤∥V−U∥+∥U−W∥.Recognizing the two terms as induced distances,
D(V,W)≤D(V,U)+D(U,W).Thus, the induced function is a metric.
Every normed vector space automatically becomes a metric space when distance is defined by D(V,W)=∥V−W∥.
The Hierarchy: Inner Products, Norms, and Metrics
These constructions form a one-way chain:
inner product⟶norm⟶metric.An inner product can induce a norm, and a norm can induce a metric. For example, an inner product can produce the Euclidean magnitude of a vector, and that magnitude can then define distance between two vectors by taking the norm of their difference.
The reverse implications do not generally hold.
A metric space does not necessarily have:
- An origin.
- Vector addition.
- Scalar multiplication.
- A vector-space structure.
- An inner product.
The discrete metric on a set of markers illustrates this point. The markers form a metric space because a valid distance function has been defined, but they do not automatically form a vector space. There is no specified vector addition, scalar multiplication, or distinguished zero vector. Consequently, a norm and an inner product cannot be inferred from the discrete metric alone.
A Normed Vector Space Can Have More Than One Metric
The induced metric
D(V,W)=∥V−W∥is a natural metric on a normed vector space, but it is not necessarily the only possible metric.
For instance, even on a normed vector space, one could define the discrete metric:
D(V,W)={0,1,V=W,V=W.This would be a valid metric, although it would ignore the vector-space norm and treat every pair of distinct elements as equally far apart.
Thus, saying that a norm induces a metric means that the norm provides one guaranteed and useful way to define distance. It does not mean that the induced metric is the unique metric available.
Comprehensive Review
A metric space is a set M together with a real-valued distance function D. The distance must satisfy four conditions:
-
Positivity:
D(X,Y)≥0. -
Non-degeneracy:
D(X,Y)=0⟺X=Y. -
Symmetry:
D(X,Y)=D(Y,X). -
Triangle inequality:
D(X,Y)≤D(X,Z)+D(Z,Y).
The discrete metric demonstrates that a metric space can be built on a set of arbitrary objects, with distance 0 for identical elements and 1 for distinct elements. In that geometry, a unit circle contains every point except its center, a radius-two circle is empty, and a closed disc of radius one contains the whole space.
The taxi cab metric on R2 measures horizontal plus vertical separation:
D(U,V)=∣U1−V1∣+∣U2−V2∣.It models travel along a city grid, permits many shortest paths, and produces diamond-shaped circles.
Finally, every normed vector space becomes a metric space through
D(V,W)=∥V−W∥.The metric’s positivity, non-degeneracy, symmetry, and triangle inequality come respectively from positivity, non-degeneracy, absolute homogeneity, and the triangle inequality of the norm. The central structural relationship is that inner products induce norms, norms induce metrics, and general metrics do not necessarily recover either a norm or an inner product.

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