MetricSpace - crowlogic/arb4j GitHub Wiki

A metric space is a fundamental concept in mathematics which encapsulates the intuitive notion of distance between elements in a set. Formally, a metric space is defined as follows:

A metric space is an ordered pair $(M, d)$ where $M$ is a set and $d$ is a function, called the metric, mapping $M \times M$ to the set of real numbers $\mathbb{R}$. The function $d$ is required to satisfy the following properties for all $x, y, z \in M$:

  1. Non-negativity: $d(x, y) \geq 0$. The distance between any two points is always non-negative.

  2. Identity of indiscernibles: $d(x, y) = 0 \iff x = y$. The distance between two points is zero if and only if the two points are the same.

  3. Symmetry: $d(x, y) = d(y, x)$. The distance from $x$ to $y$ is the same as the distance from $y$ to $x$.

  4. Triangle inequality: $d(x, z) \leq d(x, y) + d(y, z)$. The distance from $x$ to $z$ is at most the sum of the distance from $x$ to $y$ and the distance from $y$ to $z$.

A typical example of a metric space is the set of real numbers $\mathbb{R}$ with the usual absolute difference metric: $d(x, y) = |x - y|$. Another example is the Euclidean space $\mathbb{R}^n$ (the set of all ordered $n$-tuples of real numbers) with the usual Euclidean distance.

Metric spaces are foundational in the field of topology, and many theorems in analysis and topology assume a metric space setting. They provide the setting for concepts such as convergence, continuity, and compactness.