Metric, Metric Space
A metric
- Positivity:
with equality if and only if ; - Symmetry:
for every ; - Triangle inequality:
for every . We call
a metric space.
Definition
Def Discrete Metric The discrete metric on any non-empty set
is defined by setting and if .
Definition
Def
-adic Metric Consider the set of integers. Let be a prime. For any with , there is a unique such that , where is not divisible by . Define -adic metric as follows:
Def Uniform Metric
Let
Lemma
Lemma Any norm
on a vector space gives rise to a metric on by setting . e.g.
- Let
be the set of all words (finite sequences of 26 symbols). Then the Levenshtein (spelling) distance between word and is the minimum number of ‘edits’ required to change from to , where an ‘edit’ is any one of (i) insertion of a symbol (ii) deletion of a symbol (iii) change of a letter. - Let
be a graph. The combinatorial metric defined on the vertices of is the minimal number of edges required to join the two vertices. (For this definition, we need to assume that each pair of vertices can be joined by a path in the graph).
Lemma
Lemma Let
and be two metric spaces. Then for any , we have defines a metric on .
Metric Subspace
Def Metric Subspace
Let
Prop Given
is open in iff with open in . is closed in iff with closed in . e.g. Consider in . and are open in , but is not open in . and are closed in , but is not closed in .