# Lp Metric on Closed Real Interval is Metric

## Theorem

Let $S$ be the set of all real functions which are continuous on the closed interval $\left[{a \,.\,.\, b}\right]$.

Let $p \in \R_{\ge 1}$.

Let $d_p: S \times S \to \R$ be the $L^p$ metric on $\left[{a \,.\,.\, b}\right]$:

$\displaystyle \forall f, g \in S: d \left({f, g}\right) := \left({\int_a^b \left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$

Then $d_p$ is a metric.

## Proof

### Proof of $M1$

 $\displaystyle d_p \left({f, f}\right)$ $=$ $\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - f \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$ Definition of $d_p$ $\displaystyle$ $=$ $\displaystyle \left({\int_a^b 0^p \ \mathrm d t}\right)^{\frac 1 p}$ Definition of Absolute Value $\displaystyle$ $=$ $\displaystyle 0$ Definite Integral of Constant

So axiom $M1$ holds for $d_p$.

$\Box$

### Proof of $M2$

It is required to be shown:

$d_p \left({f, g}\right) + d_p \left({g, h}\right) \ge d_p \left({f, h}\right)$

for all $f, g, h \in S$.

Let:

$(1): \quad t \in \left[{a \,.\,.\, b}\right]$
$(2): \quad \left\vert{f \left({t}\right) - g \left({t}\right) = r \left({t}\right)}\right\vert$
$(3): \quad \left\vert{g \left({t}\right) - h \left({t}\right) = s \left({t}\right)}\right\vert$

Thus we need to show that:

$\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p} + \left({\int_a^b \left\vert{g \left({t}\right) - h \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p} \ge \left({\int_a^b \left\vert{f \left({t}\right) - h \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$

We have:

 $\displaystyle d_p \left({f, g}\right) + d_p \left({g, h}\right)$ $=$ $\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p} + \left({\int_a^b \left\vert{g \left({t}\right) - h \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$ Definition of $d_p$ $\displaystyle$ $=$ $\displaystyle \left({\int_a^b \left({r \left({t}\right)}\right)^p \ \mathrm d t}\right)^{\frac 1 p} + \left({\int_a^b \left({s \left({t}\right)}\right)^p \ \mathrm d t}\right)^{\frac 1 p}$ $\displaystyle$ $\ge$ $\displaystyle \left({\int_a^b \left({r \left({t}\right) + s \left({t}\right)}\right)^p \ \mathrm d t}\right)^{\frac 1 p}$ Minkowski's Inequality for Integrals $\displaystyle$ $=$ $\displaystyle \left({\int_a^b \left({\left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert + \left\vert{g \left({t}\right) - h \left({t}\right)}\right\vert}\right)^2 \ \mathrm d t}\right)^{\frac 1 2}$ Definition of $r \left({t}\right)$ and $s \left({t}\right)$ $\displaystyle$ $=$ $\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - h \left({t}\right\vert}\right)^2 \ \mathrm d t}\right)^{\frac 1 2}$ Triangle Inequality for Real Numbers $\displaystyle$ $=$ $\displaystyle d_p \left({f, h}\right)$ Definition of $d_p$

So axiom $M2$ holds for $d_p$.

$\Box$

### Proof of $M3$

 $\displaystyle d_p \left({f, g}\right)$ $=$ $\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$ Definition of $d_p$ $\displaystyle$ $=$ $\displaystyle \left({\int_a^b \left\vert{g \left({t}\right) - f \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$ Definition of Absolute Value $\displaystyle$ $=$ $\displaystyle d_p \left({g, f}\right)$ Definition of $d_p$

So axiom $M3$ holds for $d_p$.

$\Box$

### Proof of $M4$

 $\, \displaystyle \forall t \in \left[{a \,.\,.\, b}\right]: \,$ $\displaystyle f \left({t}\right)$ $\ne$ $\displaystyle g \left({t}\right)$ $\displaystyle \implies \ \$ $\displaystyle \left\vert{f \left({t}\right) - g \left({t}\right\vert}\right)^p$ $\ge$ $\displaystyle 0$ $\displaystyle \implies \ \$ $\displaystyle \left({\int_a^b \left\vert{f \left({t}\right) - g \left({t}\right)}\right\vert^p \ \mathrm d t}\right)^{\frac 1 p}$ $\ge$ $\displaystyle 0$ Sign of Function Matches Sign of Definite Integral
$d_p \left({f, g}\right) = 0 \implies f = g$

on $\left[{a \,.\,.\, b}\right]$.

So axiom $M4$ holds for $d_p$.

$\blacksquare$