deepdream of
          a sidewalk
Show Question
Math and science::Topology

Metric space

Metric

A metric d on a set X is a function d:X×X[0,) with the following three properties:

What is this called?
d(x,y)=0x=y, for all x,yX
Triangle inequality
d(x,y)+d(y,z)d(x,z), for all x,y,zX
Symmetry
d(x,y)=d(y,x), for all x,yX

A metric space is a set together with a metric on it, or more formally, a pair (X,d) where X is a set and d is a metric on X.


Example

Some interesting metrics

1. d1,d2,d (instances of dp) on Rn

For all x=(x1,...,xn) and y=(y1,...,yn) in Rn (or any subset thereof):

  • The Euclidean metric, d2 on Rn is given by: d2(x,y)=(i=1n(xiyi)2)12
  • d1 is given by: d1(x,y)=i=1n|xiyi|
  • d by: d(x,y)=max1in|xiyi|

All these metrics are particular cases of the dp metric.

2. d1,d2,d (instances of dp) on C[a,b])

All dp metrics have parallels over function spaces. C[a,b] is the set of continuous functions [a,b]R. Three interesting metrics on C[a,b] are given by:

d1(f,g)=ab|f(t)g(t)|dt

d2(f,g)=(ab|f(t)g(t)|dt)12

d(f,g)=supatb|f(t)g(t)|

3. Hamming metric

With A being any set, and x,yAn, the Hamming metric d on A is given by

d(x,y)=|{i{1,...,n}:xiyi}|

In other words, the count of how many coordinates differ.

Context