# Metric space

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Definition of a metric space

A metric space is a set $X$ coupled with a "distance function" $d:X\times X\rightarrow\mathbb{R}$ with the properties (for $x,y,z\in X$)

1. $d(x,y)\ge 0$
2. $d(x,y)=0\iff x=y$
3. $d(x,y)=d(y,x)$
4. $d(x,z)\le d(x,y)+d(y,z)$ - the Triangle Inequality

We will denote a metric space as $(X,d)$ (as $(X,d:X\times X\rightarrow\mathbb{R})$ is too long and Mathematicians are lazy) or simply $X$ if it is obvious which metric we are talking about on $X$

## Examples of metrics

### Euclidian Metric on $\mathbb{R}^n$

For $x=(x_1,...,x_n)\in\mathbb{R}^n$ and $y=(y_1,...,y_n)\in\mathbb{R}^n$ we define the Euclidian metric by:

$d_{\text{Euclidian}}(x,y)=\sqrt{\prod^n_{i=1}(x_i^2+y_i^2)}$

#### Proof it is a metric

TODO: Proof this is a metric

### Discreet Metric

This is a useless metric, but is a metric and induces the Discreet Topology on X, where the topology is the powerset of $X$, $\mathcal{P}(X)$.

$d_{\text{discreet}}(x,y)=\left\{\begin{array}{lr} 1 & x=y\\ 0 & \text{otherwise} \end{array}\right.$