---
title: "Metric Spaces: Distance as an Axiom"
description: "Keep only the properties distance must have, and check how much of the analysis of the real line survives on that alone."
canonical: https://lightmysky.com/learn/mathematics/metric-spaces-distance-as-an-axiom-mt_A3TMb8wL6k
source: https://lightmysky.com/learn/mathematics/metric-spaces-distance-as-an-axiom-mt_A3TMb8wL6k.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Metric Spaces: Distance as an Axiom

Keep only the properties distance must have, and check how much of the analysis of the real line survives on that alone.

Subject: Mathematics · Area: Topology · Ages 20 to 21
Page: https://lightmysky.com/learn/mathematics/metric-spaces-distance-as-an-axiom-mt_A3TMb8wL6k

## Ready when they can

- State the metric axioms and verify them for an unfamiliar example such as a function space
- Redefine convergence and continuity using only the metric
- Give two metrics on one set that disagree about which sequences converge

## Lesson: Distance as a short list of rules

A metric on a set X assigns a finite real distance d(x,y) to every pair. For all x,y,z in X, it satisfies four axioms: d(x,y)>=0; d(x,y)=0 exactly when x=y; d(x,y)=d(y,x); and d(x,z)<=d(x,y)+d(y,z). These are nonnegativity, identity of indiscernibles, symmetry and the triangle inequality. Verification must cover every allowed point. One counterexample disproves a proposed metric.

A formula resembling ordinary distance may fail an axiom. On the reals, d(x,y)=|x-y|^2 is nonnegative, symmetric and zero exactly when x=y, but its triangle inequality can fail. The formula d(x,y)=||x|-|y|| has another problem: opposite nonzero numbers have distance zero. This violates identity of indiscernibles.

*(drawing: For squared distance, the direct distance can exceed the sum through a third point.)*

For three distinct points with positive symmetric distances u,v,r, check all three triangle inequalities: r<=u+v, u<=r+v and v<=r+u. Together these give |u-v|<=r<=u+v, with r>0 also required. If two distances are 4 and 6, the third may be any value from 2 through 10. Set every diagonal distance to zero.

The usual real metric is d(x,y)=|x-y|. The discrete metric is 0 for equal points and 1 for distinct points. It obeys the triangle inequality: when x differs from z, at least one leg through y has distance 1. An open ball B(a,r)={x:d(x,a)<r} uses r>0 and a strict inequality. A discrete open ball with radius at most 1 contains only its center.

A sequence x_n converges to x if, for every epsilon>0, some positive integer N makes d(x_n,x)<epsilon for all n>=N. Equivalently, its distances to x tend to zero. Indices start at n=1. Find a tail inside an open ball by solving this strict inequality. For distance 1/n and radius 0.02, solve n>50. For distance 1/n^2, solve n^2>1/epsilon.

In the usual real metric, 1/n converges to 0. Discrete convergence to x requires eventual equality with x: apply epsilon=1/2. Eventual equality also suffices. Thus 1/n has no discrete limit. Different metrics need not disagree: e(x,y)=2d(x,y) is a metric because multiplying by 2 preserves each axiom. Its convergent sequences and limits agree with those of d, since 2d(x_n,x) tends to zero exactly when d(x_n,x) does.

For f:(X,d_X)->(Y,d_Y), continuity at a means that every epsilon>0 has a delta>0 such that d_X(x,a)<delta implies d_Y(f(x),f(a))<epsilon for every x in X. For f(x)=kx with usual real metrics and k!=0, the output gap is |k||x-a|. Choose delta=epsilon/|k|. Any larger delta admits an input gap epsilon/|k|, which gives output gap epsilon and fails the strict bound.

In metric spaces, f is continuous at a exactly when every sequence x_n tending to a has f(x_n) tending to f(a). Continuity controls late terms using its delta. If continuity fails, one epsilon>0 has a violating input inside every positive radius. Choose x_n with input distance below 1/n and output distance at least epsilon. Then x_n tends to a, but its images do not tend to f(a).

Every function from a discrete metric space to any metric space is continuous. At any input a, fix epsilon>0 and choose delta=1. The condition d_X(x,a)<1 forces x=a. The output distance is then d_Y(f(a),f(a))=0<epsilon. This argument uses the discrete input metric and places no restriction on the function's values.

Let C([a,b]) be the real continuous functions on a closed bounded interval, with a<=b. Define d(f,g)=max_{t in [a,b]} |f(t)-g(t)|. The extreme value theorem gives a finite attained maximum. This distance is nonnegative and symmetric. A zero maximum means every gap is zero, so f=g. On other domains, continuity alone need not give a finite attained maximum.

To prove the uniform metric's triangle inequality, first use |f(t)-h(t)|<=|f(t)-g(t)|+|g(t)-h(t)| at each t. Bound the two right-hand gaps by their separate maxima d(f,g) and d(g,h). This bound is independent of t. Taking the maximum on the left gives d(f,h)<=d(f,g)+d(g,h), completing the metric verification.

**Example.** To calculate a uniform distance, find the absolute gap function and maximize it on the stated interval. For f(t)=2t and g(t)=t on [0,3], the gap is t. Its maximum is 3 at t=3. More generally, a gap ct with c>=0 on [0,b], where b>=0, has maximum cb.

**Recap.** The four metric axioms let us define convergence and continuity. The chosen metric determines which sequences converge.

*This lesson, its questions and its flashcards were written for this dataset.*

## Practice

17 questions on this page, each with its working shown.

## Needs first

- [Continuity and Uniform Continuity](https://lightmysky.com/learn/mathematics/continuity-and-uniform-continuity-mt_plWc9raOwz)
- [The Completeness Axiom: Suprema and Infima](https://lightmysky.com/learn/mathematics/the-completeness-axiom-suprema-and-infima-mt_xjI-pIfh95)

## Opens up

- [Open Sets, Closed Sets and Limit Points](https://lightmysky.com/learn/mathematics/open-sets-closed-sets-and-limit-points-mt_9bBdT38dbB)
- [Topological Spaces: Continuity Without Distance](https://lightmysky.com/learn/mathematics/topological-spaces-continuity-without-distance-mt_D2oPq0AVhI)
