Difference between revisions of "Discrete metric"

The discrete metric is a metric $d$ which can be defined on any set $S$, $d: S\times S \to \{0, 1\}$ as follows: if $x = y, d(x, y) = 0$ and if $x \neq y, d(x, y) = 1$. All three conditions on a metric (symmetry, positivity and the validity of the triangle inequality) are immediately clear from the definition.