Let $C$ be a small category: we define its *nerve* $(N(C)\_k)\_k$ as the following simplicial set: $N(C)\_0=Ob(C)$ (the set of objects), $N(C)\_1=Mor(C)$ (the set of all morphisms) and $N(C)\_k$ to be a set of all $k$-tuples of compasable morhpisms $(f\_1,...,f\_k)$. This is equipped with the face maps $d\_i$ defined by $d\_i(f\_1,...,f\_k):=(f\_1,...,f\_{i-1},f\_i \circ f\_{i+1},f\_{i+2},...,f\_k)$ except of $d\_0$ and $d\_k$ which omit the first and the last morphism. Degeneracies act as follows $s\_j(f\_1,...,f\_k):=(f\_1,...,f\_{j-1},id,f\_j,...,f\_k)$. 


When $G$ is a group then $G$ can be viewed as a small category with only one object and the set of morphisms being $G$ itself. Thus everything is composable and $N(G)\_k=G^k$. 


One thus arrives at the well defined simplicial set. Therefore one can speak about its geometric realization $|N(G)|$: there are in fact two possible versions, the standard one, sometimes called ,,thin realization'' and another version, which is called ,,thick'' realization which is denoted by $\| N(G) \|$ and which is defined using only relations involving the face maps. See also [this](https://mathoverflow.net/questions/288461/homotopy-equivalence-of-geometric-realizations) discussion. 


I was told that this geometric realization is in fact (possible version of) the classifying space $BG$. I wonder why it is true. This question is motivated by [this discussion](https://math.stackexchange.com/questions/2032002/group-cohomology-and-classyfing-spaces). Since my original motivation was the statement that the group cohomology coincides with the (singular for example) cohomology of the classifying space and with the help of the cited discussion I was able to understand why is it true directly (not invoking the fact that $BG$ is geometric realization of $N(G)$) I'm posting this question as another topic. So my question is:



> 
> Why the geometric realization of $N(G)$ is (homotopy equivalent to) $BG$?
> 
> 
> 


Some ideas can be found in Hatcher's book ,,Algebraic Topology'' however, as I understood correctly, the face maps $d\_i$ from this book would act rather as $(g\_1,...,g\_k) \mapsto (g\_1,...,g\_{i-1},g\_{i+1},...,g\_k)$ which is not the same as for $N(G)$.


EDIT: The classifying space is not unique up to homeomorphism, but it is unique up to homotopy: the definition which is most familiar for me is the abstrack definition as the quotient of contractible principial $G$-bundle $EG$. There is also specyfic *construction* due to Milnor using infinite join which is also familiar to me. 


EDIT 2: As I understood correctly the answer below: each element from $\mathcal{E}G\_n$ being of the form $(g\_0,g\_1,...,g\_n)$ may be presented in the form $(g\_0',g\_0'g\_1',...,g\_0'g\_1'...g\_n')$. Solving in $g\_0',...,g\_n'$ gives $g\_0'=g\_0,g\_1'=g\_0^{-1}g\_1,...,g\_n'=g\_{n-1}^{-1}g\_n$. Thus we obtain a bijective map $\alpha:\mathcal{E}G\_n \to \mathcal{E}G\_n$ given by $\alpha(g\_0,...,g\_n)=(g\_0,g\_0^{-1}g\_1,...,g\_{n-1}^{-1}g\_n)$. Let $d\_i,s\_j$ be the face maps and degeneracies which you described (omitting $i$-th vertex and repeating) and $d\_i',s\_j'$ be faces and degeneracies as in the definition of the nerve of the category. Then $\alpha s\_j=s\_j' \alpha$ and $\alpha d\_i=d\_i' \alpha$ for all $j$ and for all $i$ *except* $i=0$ where we obtain the difference on the zeroth coordinate $(\alpha d\_0)(g\_0,...,g\_n)=(g\_1,...)$ and $(d'\_0 \alpha)(g\_0,...,g\_n)=(g\_0^{-1}g\_1,...)$ (the remaining entries are the same). Therefore if we pass to the quotient we get an equality. This suggest that there is something correct in this procedure: however I'm little bit confused with the following: $\mathcal{E}G$ is a simplicial set. Its geometric realization is just topological space: the bar notation which you are using refers to $EG/G$ which is also topological space. However you described face and degeneracies maps for $EG/G$ which looks like the relevant maps for $NG$ but the former is just topological space while the latter is (abstract) simplicial set.



Classifying space as the geometric realization of the nerve of $G$ viewed as a small category
You're spot on with Hatcher's construction. First he constructs the space $EG$ as a $\Delta$-complex, but this can easily be upgraded to a simplicial set $\mathcal{E}G$ such that $EG$ is the geometric realisation of $\mathcal{E}G$:


In fact let $\mathcal{E}G\_n:=G^{n+1}$ and define the face maps as $(g\_0, ..., g\_n) \mapsto (g\_0, ..., \widehat{g\_i}, ..., g\_n)$ and the degeneracy maps as $(g\_0, ..., g\_{n-1}) \mapsto (g\_0, ..., g\_i, g\_i, ...., g\_n)$. Then $G$ acts by simplicial maps via $g(g\_0, ..., g\_n) \mapsto (gg\_0, ..., gg\_n)$ and therefore it also acts simplicially on the realisation $EG:=|\mathcal{E}G|$. In fact $G$ acts freely and $EG$ is contractible so that $EG/G$ is a model of $BG$.


He also explains with the bar notation how this space is exactly equal to the geometric realisation of the nerve of $G$ (even if Hatcher does not use these words). Explicitly: $[g\_1|g\_2|...|g\_n]$ is the image in $EG/G$ of all the simplices $g\_0\cdot(1,g\_1,g\_1g\_2,...,g\_1..g\_n)$ in $EG$. The face maps in bar notation are $[g\_1|...|g\_n]\mapsto [g\_2|...|g\_n]$ for $i=0$, $[g\_1|...|g\_n]\mapsto[g\_1|...|g\_ig\_{i+1}|...g\_n]$ for $0<i<n$ and $[g\_1|...|g\_n]\mapsto[g\_1|...|g\_{n-1}]$ for $i=n$ which are exactly the face maps for the nerve $N(G)$. The degeneracy maps in bar notation are exactly $[g\_1|...|g\_{n-1}] \mapsto [g\_1|...|g\_i|1|g\_{i+1}|...|g\_{n-1}]$ which is also exactly the same as for $N(G)$. Therefore $EG/G = |N(G)|$ (not just a homotopy equivalency, a very canonical homeomorphism)


