Q is dense in R and Completions What is the relation between the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$ and the fact that the completion of $\mathbb{Q}$ is $\mathbb{R}$? Or in general, that is if $A$ is dense in a metric space $B$, what's the relation between the completion of $A$ and $B$?
 A: That a set $B$ is dense in a set $A$ means that $B\subset A$ and that the smallest closed subset of $A$ that contain $B$ is $A$. This term is frequently used in General Topology.
The work completion is more relevant to Metric space. A metric space $X$ is complete provided any Cauchy sequence of $X$ converges (to an element of $X$).
Now suppose we look at a metric space $Y$ that is not complete, then there is an abstract (but highly useful) method to construct a complete metric space $X$ such that $Y$ is a dense subspace of $X$. The space $X$ is more or less unique and hence may be called The Completion of $Y$. $X$ might be viewed upon as a subset of the set of all Cauchy sequences of $Y$ (two sequences is to be identified if "the distance between" them approaches $0$ see the comments).
Example 1. If $Y=\mathbb{Q}$, then $X = \mathbb{R}$. 
Example 2. Consider the space $Y=C_0(\mathbb{R})$, that is the linear space of continuous functions on $\mathbb{R}$ that vanish outside a compact set, then the Riemann integral defines a norm (see below for the distance function) through $$\|f\|_{C_0(\mathbb{R})}=\int_\mathbb{R} |f(x)|dx$$ 
($d(f,g)=\|f-g\|$) however $Y$ is not complete in this norm. The completion $X$ of $Y$ is the Lebesgue space, that is $X = L^1(\mathbb{R})$.
A: Given a metric space $X$ with distance $d$, you can construct the set $\tilde{X}=C/\sim$ where $C$ is the set of all Cauchy sequences in $X$ and you declare that
$$
\forall s,t\in C,\qquad s\sim t\iff\lim_{n\to\infty}d(s_n,t_n)=0.
$$
Then, $\tilde{X}$ becomes a metric space under the distance
$$
\tilde{d}([s],[t])=\lim_{n\to\infty}d(s_n,t_n)
$$
(one needs to check well-definedness). Then one sees that $X$ embeds isometrically in $\tilde{X}$ as $x\mapsto[\{x\}]$ (class of the constant sequence at $x$) and proves that


*

*$\tilde{X}$ is complete under $\tilde d$;

*$X$ is dense in $\tilde X$;

*If $X^\prime$ is a complete metric space in which $X$ embeds isometrically as a dense subspace, then there exists a canonical isometry $X^\prime\rightarrow\tilde{X}$ which is the identity on $X$.


The space $\tilde{X}$ is called the completion of $X$.
The reals $\Bbb R$ are the completion of $\Bbb Q$ under the euclidean metric induced by the standard absolute value.
By taking the $p$-adic absolute values on $\Bbb Q$ one may construct the complete field ${\Bbb Q}_p$ of $p$-adic numbers.
The celebrated theorem of Ostrowski says that $\Bbb R$ and the ${\Bbb Q}_p$ are essentially all the possible ways to construct a complete space out of ${\Bbb Q}$. 
A: If $B$ is a complete metric space, and the metric on $A$ is the restriction of that of $B$, and $A$ is dense in $B$, then $B$ is (isometric to) the completion of $A$.
A: If $X$ is any complete metric space, and we have an isometric embedding of $t: \mathbb{Q} \to X$, then $t$ extends to an isomorphism of $\mathbb{\overline{Q}}$ with the closure of $t(\mathbb{Q})$ in $X$. The closure of $\mathbb{Q}$ is $\mathbb{R}$ (i.e. $\overline{\mathbb{Q}} = \mathbb{R}$) which is equivalent to $\mathbb{Q}$ being dense in $\mathbb{R}$.
