# Definition:Metric Space/Distance Function

## Definition

Let $\struct {A, d}$ be a metric space.

The mapping $d: A \times A \to \R$ is referred to as a distance function on $A$.

Here, $d: A \times A \to \R$ is a real-valued function satisfying the metric space axioms:

 $(\text M 1)$ $:$ $\ds \forall x \in A:$ $\ds \map d {x, x} = 0$ $(\text M 2)$ $:$ Triangle Inequality: $\ds \forall x, y, z \in A:$ $\ds \map d {x, y} + \map d {y, z} \ge \map d {x, z}$ $(\text M 3)$ $:$ $\ds \forall x, y \in A:$ $\ds \map d {x, y} = \map d {y, x}$ $(\text M 4)$ $:$ $\ds \forall x, y \in A:$ $\ds x \ne y \implies \map d {x, y} > 0$

## Also known as

The distance function $d$ is frequently referred to as a metric on $A$.

The two terms are used interchangeably on this website.

Some sources call a distance function just a distance, but that is a general term with a number of interpretations.

## Also defined as

If $\struct {A, d}$ is a pseudometric space or quasimetric space, this definition still applies.

That is, a pseudometric and a quasimetric are also both found to be referred to in the literature as distance functions.

## Also denoted as

Some authors use a variant of $d$ for a distance function, for example $\eth$.

Others use, for example, $\rho$.

## Also see

• Results about distance functions can be found here.