TITLE: Why are free groups residually finite?
QUESTION [40 upvotes]: Why is it that every nontrivial word in a free group (it's easy to reduce to the case of, say, two generators) has a nontrivial image in some finite group?  Equivalently, why is the natural map from a group to its profinite completion injective if the group is free?
Apparently, this follows from a result of Malcev's that finitely generated matrix groups over an arbitrary commutative ring are residually finite, but is there a more easily accessible proof if we only want the result for free groups?

REPLY [2 votes]: A proof based on algebraic topology can also be found in Thomas Koberda's lecture notes, RAAGS and their subgroups; in fact, he proves more generally that a finitely generated free group is residually $p$ for any prime. The proof is rather laconic, so I gives some details below.
A finitely generated free group $F$ is the fundamental group of a finite bouquet of circles $X_0$. By induction, we build a sequence of regular coverings $$\cdots \to X_2 \to X_1 \to X_0,$$ where $\mathrm{Aut}(X_{i+1} \to X_i) \simeq H_1(X_i, \mathbb{Z}_p)$; in order to construct $X_{i+1}$, it is sufficient to take the covering of $X_i$ associated to the subgroup of $\pi_1(X_i)$ consisting of the kernel of $$\pi_1(X_i) \twoheadrightarrow \pi_1(X_i)^{\mathrm{ab}} \simeq H_1(X_i,\mathbb{Z}) \twoheadrightarrow H_1(X_i, \mathbb{Z}_p).$$
In particular, notice that $H_1(X_i,\mathbb{Z}_p)$ is a finitely generated abelian torsion group, so it is a finite $p$-group. Therefore, any covering $X_{i+1} \to X_i$ of our sequence has a degree a power of $p$. To conclude, it is sufficient to notice that any loop in $X_0$ does not lift into $X_i$ as a loop for some large enough $i$. 
Because the action $\mathrm{Aut}(X_{i+1} \to X_i) \curvearrowright X_{i+1}$ is free, we deduce
Claim 1: A loop $\gamma \subset X_i$ lifts into $X_{i+1}$ as a loop iff $\gamma=1$ in $H_1(X_0, \mathbb{Z}_p)$.
Claim 2: A loop minimising the length among the homotopically nontrivial loops of a graph $Y$ defines a nontrivial element of $H_1(Y,\mathbb{Z})$.
Now let $l(X_i)$ denote the minimal length of a homotopically nontrivial loop in $X_i$. Of course, we have $l(X_0)=1$.
Claim 3: $l(X_{i}) \geq i+1$ for all $i \geq 0$.
Let $\gamma$ be a loop in $X_{i+1}$ and let $p$ denote the covering map $X_{i+1} \to X_i$. Then $p(\gamma)$ is a loop in $X_i$ that lifts into $X_{i+1}$ as a loop, so $\mathrm{lg}(p(\gamma)) \geq l(X_i)+1$ according to claims 1 and 2 (if $p$ is large enough). Hence $$\mathrm{lg}(\gamma) \geq \mathrm{lg}(p(\gamma)) \geq l(X_i)+1,$$ and finally $l(X_{i+1}) \geq l(X_i)+1$. Now, claim 3 follows easily.
We deduce from claim 3 that, if a homotopically nontrivial loop $\gamma \subset X_0$ loops into $X_i$ as a loop $\gamma'$, then $$\mathrm{lg}(\gamma)=\mathrm{lg}(\gamma') \geq l(X_i) \geq i+1;$$ therefore, for large enough $j$, $\gamma$ cannot lifts into $X_j$ as a loop.