Complete metric space Let $C^0([a,b])$ denote the space of continuous function $f:[a,b]→\Bbb R$. Define $d(f,g)=sup_{[a,b]}|f-g|$. I've proved that d is metric in $C^0([a,b])$. How to prove that this metric space is complete?
 A: The first thing to do is to take a Cauchy sequence $\{f_n\}$. Notice that for every $x \in [a,b]$, $\{f_n(x)\}$ is a Cauchy sequence in $\mathbb{R}$, a complete metric space! Then for every $x$ we can define $f(x)$ as the limit of $f_n(x)$. Now that we have a pointwise limit there are two things left to do:


*

*Show that $f_n \to f$ in the metric $d$

*Show that $f \in C^0([a,b])$.


The second part is easy, assuming that we have already proved $1.$, indeed the uniform limit of continuous functions is a continuous function. To conclude the argument, let's prove 1.
Let $\epsilon > 0$ be given and find $N$ such that if $m,n \ge N$ then $d(f_n,f_m) \le \epsilon$. Then $$|f_n(x) - f(x)| = \lim_{m\to \infty}|f_n(x) - f_m(x)| \le \lim_{m \to \infty}d(f_n,f_m) \le \epsilon.$$ Taking the supremum over $[a,b]$ yields $d(f_n,f) \le \epsilon$.
A: Let $(f_{n})$ be a Cauchy sequence in $C^0[a,b]$. For each $x\in [a,b]$, $(f_{n}(x))$ is a Cauchy sequence in $\mathbb{R}$, and hence converges to some limit $p_{x}$. Define $f:[a,b]\to\mathbb{R}$ by $f(x)=p_{x}$. We claim that $f\in C^{0}[a,b]$ and that $(f_{n})$ converges to $f$ in $C^{0}[a,b]$. Note that the first assertion will follow from the second since convergence in $C^{0}[a,b]$ is the same as uniform convergence and the uniform limit of a sequence of continuous functions is continuous. 
To this end, let $\epsilon >0$. Let $x\in[a,b]$. Since $(f_{n})$ is Cauchy in $C^{0}[a,b]$, there is an $N$ such that for all $n,m\geq N$, we have $d(f_{n},f_{m})<\epsilon$. Hence, 
$$
|f_{N}(x)-f(x)|=\lim_{m\to\infty}|f_{N}(x)-f_{m}(x)|\leq\lim_{m\to\infty}d(f_{N},f_{m})\leq\epsilon.
$$
But this holds for any $x\in [a,b]$, and so, we have
$$
d(f_{N},f)=\sup_{x\in[a,b]}|f_{N}(x)-f(x)|\leq \epsilon.
$$
