The space of functions that vanish at infinity is a Banach space Prove that $C_0(X) = \{ f \in C(X) \mid \forall \varepsilon &gt;0 \ \exists K \subset X \text{ compact such that } |f(x)| &lt; \varepsilon \text{ for } x \notin K \}$ is a Banach space with the norm $\|f\|_{\infty}$.

I'm trying to prove that $C_0(X)$ is closed subset of $C(X)$, therefore I suppose $f \in \overline{C_0(X)}$ so there exist a sequence $f_n \in C_0(X)$ such that $f_n \to f$. I am stuck here: why $f \in C_0(X)$?
This is a typical $\varepsilon/2$-argument. Fix $\varepsilon&gt;0$. Then there exists  $n$ such that $\|f-f_n\|&lt;\varepsilon/2$. Since $f_n\in C_0 (X) $, there exists $K\subset X $, compact, with $|f_n (x)|&lt;\varepsilon/2$ for all $x\in X\setminus K $. So, outside $K $,
$$
|f (x)|\leq|f(x)-f_n (x)|+|f_n (x)|&lt;\frac\varepsilon2+\frac\varepsilon 2=\varepsilon. 
$$
As $C(X)$ is a Banach space, you only need to prove as you noticed that $C_0(X)$ is closed in $C(X)$.

Suppose that $f_n \to f$. $f$ is continuous because $C(X)$ is a Banach space. You only need to prove that $f$ vanishes at infinity.

Take $\epsilon &gt; 0$. By hypothesis you can find $N \in \mathbb{N}$ with $\Vert f-f_N \Vert_\infty &lt; \epsilon/2$. As $f_N \in C_0(X)$, there exists a compact $K \subset X$ such that $\vert f_N(x) \vert &lt; \epsilon/2$ for all $x \in X \setminus K$.

Hence for $x \in X \setminus K$:
$$\vert f(x) \vert \le \vert f_N(x) \vert + \Vert f-f_N \Vert_\infty \le \epsilon$$

Proving that $f$ vanishes at infinity. And you're done.