A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

Metric Spaces: Definition and Examples

Graduate Depth 67 in the knowledge graph ☐ I know this ☆ Set as goal
88topics build on this
243prerequisites beneath it
See this on the map →
Set Theory BasicsOpen and Closed Sets on the Real Line→→Cauchy Sequences in Metric SpacesThe Topology Induced by a Metric
metric-spaces distance

Core Idea

A metric space (X, d) has a metric d: X × X → ℝ with d(x,y) ≥ 0 (equality iff x=y), symmetry d(x,y) = d(y,x), and triangle inequality d(x,z) ≤ d(x,y) + d(y,z). Examples include ℝⁿ with Euclidean distance, function spaces with supremum norm, and discrete metrics where d(x,y) = 1 for x ≠ y.

How It's Best Learned

Test candidate distances on ℝ against each axiom: (x − y)² fails the triangle inequality at 0, 1, 2, and |x² − y²| fails identity, since it gives 0 for 1 and −1. |x − y|/(1 + |x − y|) passes: t ↦ t/(1 + t) is increasing and satisfies f(a + b) ≤ f(a) + f(b). Then sketch the unit balls in ℝ² for the sum, Euclidean and max metrics: a diamond, a disk, a square.

Common Misconceptions

Explainer

You already know open and closed sets on the real line ℝ. That familiar notion of closeness in ℝ comes from the absolute value distance: d(x, y) = |x − y|. A metric space abstracts this idea: it is a set X equipped with a distance function d that can measure how far apart any two elements are, subject to axioms that capture what "distance" must mean to support rigorous analysis.

The three axioms are: (1) non-negativity with identity — d(x, y) ≥ 0, with d(x, y) = 0 if and only if x = y (zero distance means you are the same point, nothing else); (2) symmetry — d(x, y) = d(y, x) (the distance from A to B equals the distance from B to A); (3) the triangle inequality — d(x, z) ≤ d(x, y) + d(y, z) (no detour through an intermediate point can be shorter than going directly). These three conditions are the minimal requirements for "distance" to produce a coherent geometry.

The diversity of examples is what makes the abstraction powerful. The Euclidean metric on ℝⁿ, d(x, y) = √(Σ(xᵢ − yᵢ)²), is the standard geometric distance you know from coordinates. The discrete metric sets d(x, y) = 1 for any x ≠ y — every pair of distinct points is the same distance apart. In this metric, every singleton {x} is an open ball of radius 1/2, so every subset is open; the discrete metric makes every subset "open" and "closed." The supremum metric on continuous functions, d(f, g) = sup_{x∈[a,b]} |f(x) − g(x)|, measures the worst-case pointwise gap between two functions — this is exactly the metric whose convergence notion is uniform convergence.

The abstract axioms unify these disparate examples: any theorem proved from only the three metric axioms applies simultaneously to ℝⁿ, function spaces, sequence spaces, and more. Open balls, convergent sequences, Cauchy sequences, completeness, and compactness all make sense in any metric space. The specific metric you choose for a given set determines which subsets are open, which sequences converge, and which functions are continuous — the entire analytical character of the space flows from d. This is why metric spaces are the natural habitat for real analysis and the first step toward the more general structure of topological spaces.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → One-to-One Correspondence → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Addition Within 10 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Properties of Operations → Ordered Field Axioms of the Real Numbers → The Completeness Axiom (Least Upper Bound Property) → Supremum and Infimum → Sequences: Epsilon-N Convergence → Open and Closed Sets on the Real Line → Metric Spaces: Definition and Examples

Longest path: 68 steps · 243 total prerequisite topics

Prerequisites (2)

Leads To (2)