Discrete metric

The discrete metric on a set is an example of a metric.

Definition
The discrete metric d on a set X is defined by


 * $$ d(x,x) = 0, \, $$
 * $$ d(x,y) = 1 \hbox{ if } x \neq y . \,$$

Properties

 * A discrete metric space is complete
 * The topology induced by the discrete metric is the discrete topology, in which every set is open.