# Metric spaces > *Definition 1*: a **metric space** is a pair $(X,d)$, where $X$ is a set and $d$ is a metric on $X$, which is a function on $X \times X$ such that > > 1. $d$ is real, finite and nonnegative, > 2. $\forall x,y \in X: \quad d(x,y) = 0 \iff x = y$, > 3. $\forall x,y \in X: \quad d(x,y) = d(y,x)$, > 4. $\forall x,y,z \in X: \quad d(x,y) \leq d(x,z) + d(y,z)$. The metric $d$ is also referred to as a distance function. With $x,y \in X: d(x,y)$ the distance from $x$ to $y$. ## Examples of metric spaces For the **Real line** $\mathbb{R}$ the usual metric is defined by $$ d(x,y) = |x - y|, $$ for all $x,y \in \mathbb{R}$. Obtaining a metric space $(\mathbb{R}, d)$. ??? note "*Proof*:" Will be added later. For the **Euclidean space** $\mathbb{R}^n$ with $n \in \mathbb{N}$, the usual metric is defined by $$ d(x,y) = \sqrt{\sum_{j=1}^n (x(j) - y(j))^2}, $$ for all $x,y \in \mathbb{R}^n$ with $x = (x(j))$ and $y = (y(j))$. Obtaining a metric space $(\mathbb{R}^n, d)$. ??? note "*Proof*:" Will be added later. Similar examples exist for the complex plane $\mathbb{C}$ and the unitary space $\mathbb{C}^n$. For the space $C([a,b])$ of all **real-valued continuous functions** on a closed interval $[a,b]$ with $a *Definition 2*: let $l^p$ with $p \geq 1$ be the set of sequences $x \in l^p$ of complex numbers with the property that > > $$ > \sum_{j \in \mathbb{N}} | x(j) |^p \text{ is convergent}, > $$ > > for all $x \in l^p$. We have that a metric $d$ for $l^p$ may be defined by $$ d(x,y) = (\sum_{j \in \mathbb{N}} | x(j) - y(j) |^p)^\frac{1}{p}, $$ for all $x,y \in l^p$. ??? note "*Proof*:" Will be added later. From definition 2 the sequence space $l^\infty$ follows, which is defined as the set of all bounded sequences $x \in l^\infty$ of complex numbers. A metric $d$ of $l^\infty$ may be defined by $$ d(x,y) = \sup_{j \in \mathbb{N}} | x(j) - y(j) |, $$ for all $x, y \in l^\infty$. ??? note "*Proof*:" Will be added later.