# How to find a completion for a metric space (For instance, support compact continuous real functions)

A completion of a metric space $$(M,d)$$ is a complete metric space $$(M^*,d^*)$$ such that $$(M,d)$$ is a dense subspace of $$(M^*,d^*)$$. I understand this, but how do I explicitely find a completion of a given space?

I need to find the completion of the non complete metric space of real valued compact supported continuous functions with sup norm but I have no idea on how to. I already proved that the space is not complete using the hints in these two answers:

Is the set of all real valued continuous functions on $$\mathbb R$$ with compact support complete?

Completeness of continuous real valued functions with compact support

Thanks.

The classic thing here is the Cauchy construction. You have your metric space $$M$$, and you take the set $$X$$ of Cauchy sequences of $$M$$. Now put an equivalence relation by saying two Cauchy sequences $$x_i$$ and $$y_i$$ are equivalent if $$d(x_i,y_i)\to 0$$. Call the set of equivalence classes $$M'$$, and put a metric on $$M'$$ by saying that $$d([x_i],[y_i]) = \lim_{i\to \infty} d(x_i,y_i)$$, and then you have a map $$M\to M'$$ by $$x\mapsto [(x,x,\ldots)]$$.
The intuition here is that "holes" in $$M$$ are really just Cauchy sequences with no limit, so if you're trying to define a new point that goes in that hole, define it to be that Cauchy sequence.
Another method which I like is to embed $$M$$ isometrically into $$C_b(M)$$ (the space of bounded continuous functions on $$M$$, with sup norm) by fixing $$x_0 \in M$$ and defining $$g_x(y) = d(x,y) - d(x_0,y)$$, then the map $$x\mapsto g_x$$ is our embedding. $$C_b(M)$$ is a Banach space, so then we just take the closure of the image.