The notion of nerve is part of a notion of pairs of adjoint functors. For the general abstract theory behind this see
As soon as any locally small category $C$ comes equipped with a cosimplicial object
that we may think of as determining a realization of the standard $n$-simplex in $C$, we make every object of $C$ probeable by simplices in that there is now a way to find the set
of ways to map the $n$-simplex into a given object $A$.
These collections of sets evidently organize into a simplicial set
This simplicial set is called the nerve of $A$ (with respect to the chosen realization of the standard simplicies in $C$).
There are various obvious generalizations of this procedure, some of which are described below.
(notice that for the moment the following gives just one particular case of the more general notion of nerve)
Let $S$ be one of the categories of geometric shapes for higher structures, such as the globe category $G$, the simplex category $\Delta$, the cube category $\Box$, the cycle category $\Lambda$ of Connes, or certain category $\Omega$ related to trees whose corresponding presheaves are dendroidal sets.
If $C$ is any locally small category or, more generally, a $V$-enriched category equipped with a functor
we obtain a functor
from $C$ to globular sets or simplicial sets or cubical sets, respectively, (or the corresponding $V$-objects) given on an object $c \in C$ by
This $N_i(c)$ is the nerve of $c$ with respect to the chosen $i : S \to V$.
Typically, one wants that $i$ is dense functor, i.e. that every object $c$ of $C$ is canonically a colimit of a diagram of objects in $M$, more precisely,
which is equivalent to the requirement that the corresponding nerve functor is fully faithful (in other words, if $i$ is inclusion then $S$ is a left adequate subcategory of $C$ in terminology of [Isbell 1960]). The nerve functor may be viewed as a singular functor? of the functor $i$.
Recall that the simplex category $\Delta$ is equivalent to the full subcategory
of Cat on linear quivers, meaning that the object $[n] \in Obj(\Delta)$ can be identified with the category $[n] = \{0 \to 1 \to 2 \to \cdots \to n\}$. The morphisms of $\Delta$ are all functors between these “linear quiver” categories.
For $D$ any locally small category, the nerve $N(D)$ of $D$ is the simplicial set given by
where Cat is regarded as an ordinary 1-category with objects locally small categories, and morphisms being functors between these.
So the set $N(D)_n$ of $n$-simplices of the nerve is the set of functors $\{0 \to 1 \to \cdots \to n\} \to D$. This is clearly the same as the set of sequences of composable morphisms in $D$ of length $n$:
The collection of all functors between linear quivers
is generated from those that map almost all generating morphisms $k \to k+1$ to another generating morphism, except at one position, where they
map a single generating morphism to the composite of two generating morphisms
map one generating morphism to an identity morphism
It follows that, for instance
for $(d_0 \stackrel{f_1}{\to} d_1, d_1 \stackrel{f_2}{\to} d_2, d_2 \stackrel{f_3}{\to} d_3) \in N(D)_3$ the image under $d_1 := N(D)(\delta_1) : N(D)_3 \to N(D)_2$ is obtained by composing the first two morphisms in this sequence: $(d_0 \stackrel{f_2 \circ f_1}{\to} d_2, d_2 \stackrel{f_3}{\to} d_3) \in N(D)_2$
for $(d_0 \stackrel{f_1}{\to} d_1) \in N(D)_1$ the image under $s_1 := N(D)(\sigma_1) : N(D)_1 \to N(D)_2$ is obtained by inserting an identity morphism: $(d_0 \stackrel{f_1}{\to} d_1, d_1 \stackrel{Id_{d_1}}{\to} d_1) \in N(D)_2$.
In this way, generally the face and degeneracy maps of the nerve of a category come from composition of morphisms and from inserting identity morphisms.
In particular in light of their generalization to nerves of higher categories, discussed below, the cells in the nerve $N(D)$ have the following interpretation:
$S_0 = \{d | d \in Obj(D)\}$ is the collection of objects of $D$;
$S_1 = Mor(D) = \{d \stackrel{f}{\to} d' | f \in Mor(D)\}$ is the collection of morphisms of $D$;
$S_2 = \left\{ \left. \array{ && d_1 \\ & {}^{f_1}\nearrow &\Downarrow^{\exists !}& \searrow^{f_2} \\ d_0 &&\stackrel{f_2 \circ f_1}{\to}&& d_2 } \right| (f_1, f_2) \in Mor(D) {}_t \times_s Mor(D) \right\}$ is the collection of composable morphisms in $D$: the 2-cell itself is to be read as the composition operation, which is unique for an ordinary category (there is just one way to compose to morphisms);
$S_3 = \left\{ \left. \array{ d_1 &\stackrel{f_2}{\to}& d_2 \\ {}^{f_1}\uparrow & {}^{f_2 \circ f_1}\nearrow & \downarrow^{f_3} \\ d_0 &\stackrel{f_3\circ (f_2\circ f_1)}{\to}& d_3 } \;\;\;\;\;\stackrel{\exists !}{\Rightarrow} \;\;\;\;\; \array{ d_1 &\stackrel{f_2}{\to}& d_2 \\ {}^{f_1}\uparrow & \searrow^{f_3\circ f_2} & \downarrow^{f_3} \\ d_0 &\stackrel{(f_3\circ f_2) \circ f_1}{\to}& d_3 } \right| (f_3,f_2, f_1) \in Mor(D) {}_t \times_s Mor(D) {}_t \times_s Mor(D) \right\}$ is the collection of triples of composable morphisms, to be read as the unique associators that relate one way to compose three morphisms using the above 2-cells to the other way.
example: bar construction Let $A$ be a monoid (for instance a group) and write $\mathbf{B} A$ for the corresponding one-object category with $Mor(\mathbf{B} A) = A$. Then the nerve $N(\mathbf{B} A)$ of $\mathbf{B}A$ is the simplicial set which is the usual bar construction of $A$
In particular, when $A = G$ is a discrete group, then the geometric realization $|N(\mathbf{B} G)|$ of the nerve of $\mathbf{B}G$ is the classifying topological space $\cdots \simeq B G$ for $G$-principal bundles.
The following lists some characteristic properties of simplicial sets that are nerves of categories.
A simplicial set is the nerve of a category precisely if it satisfies the Segal condition.
See at Segal condition for more on this.
A simplicial set is the nerve of a small category precisely if all inner horns have unique fillers.
See inner fibration for details on this.
A simplicial set is the nerve of a groupoid precisely if all horns have unique fillers.
The nerve $N(C)$ of a category is 2-coskeletal.
Hence all horn inclusions $\Lambda[n]_i \hookrightarrow \Delta[n]$ have unique fillers for $n \gt 3$, and all boundary inclusions $\partial \Delta[n] \hookrightarrow \Delta[n]$ have unique fillers for $n \geq 3$.
Here the point as compared to the previous statements is that in particular all the outer horns have fillers for $n \gt 3$.
The nerve $N(C)$ of a small category is a Kan complex precisely if $C$ is a groupoid.
The existence of inverse morphisms in $D$ corresponds to the fact that in the Kan complex $N(D)$ the “outer” horns
have fillers
(even unique fillers, due to the above).
It suggests the sense that a Kan complex models an ∞-groupoid. The possible lack of uniqueness of fillers in general gives the ‘weakness’ needed, whilst the lack of a coskeletal property requirement means that the homotopy type it represents has enough generality, not being constrained to be a 1-type.
So functors between locally small categories are in bijection with morphisms of simplicial sets between their nerves.
A simplicial set $S$ is the nerve of a locally small category $C$ precisely if it satisfies the Segal conditions: precisely if all the commuting squares
are pullback diagrams.
Unwrapping this definition inductively in $(n+m)$, this says that a simplicial set is the nerve of a category if and only if all its cells in degree $\geq 2$ are unique compositors, associators, pentagonators, etc of composition of 1-morphisms. No non-trivial such structure cells appear and no further higher cells appear.
This characterization of categories in terms of nerves directly leads to the model of (∞,1)-category in terms of complete Segal spaces by replacing in the above discussion sets by topological spaces (or something similar, like Kan complexes) and pullbacks by homotopy pullbacks.
For 2-categories modeled as bicategories the nerve operation is called the Duskin nerve.
A simplicial set is the Duskin nerve of a bigroupoid precisely if it is a 2-hypergroupoid: a Kan complex such that the horn fillers in dimension $\geq 3$ are unique .
This is theorem 8.6 in (Duskin)
For a 2-category, regarded as a Cat-internal category one can apply the nerve operation for categories in stages, to obtain the double nerve.
Let $Ch_+$ be the category of chain complexes of abelian groups.
Then there is a cosimplicial chain complex
given by sending the standard $n$-simplex $\Delta[n]$ first to the free simplicial group $F(\Delta[n])$ over it and then that to the normalized Moore complex. This is a small version of the ordinary homology chain complex of the standard $n$-simplex.
The nerve induced by this cosimplicial object was first considered in
The nerve/realization adjunction induced from this is the Dold–Kan correspondence. See there for more details.
Often the operation of taking the nerve of a (higher) category is followed by forming the geometric realization of the corresponding cellular set.
For many purposes it is convenient to conceive categories and especially ∞-categories entirely in terms of their nerves: those simplicial sets that arise as certain nerves are usually characterized by certain properties. So one can turn this around and define an ∞-category as a simplicial set with certain properties. This is the strategy of a geometric definition of higher category. Examples for this are complicial sets, Kan complexes, quasi-categories, simplicial T-complexes,…
A variant of the nerve construction can also be applied internally within a category, to any internal category, see the discussion at internal category.
W. G. Dwyer, D. M. Kan, Singular functors and realization functors, Nederl. Akad. Wetensch. Indag. Math. 46 (1984), no. 2, 147–153. pdf
John Isbell, Adequate subcategories, Illinois J. Math. 4, 541–552 (1960)
Tom Leinster, Higher operads, higher categories , London Mathematical Society Lecture Note Series, 298. Cambridge Univ. Press 2004. xiv+433 pp. ISBN: 0-521-53215-9, arXiv:math.CT/0305049
Ross Street, The algebra of oriented simplexes, J. Pure Appl. Algebra 49 (1987), no. 3, 283–335.
Paul Bressler, Alexander Gorokhovsky, Ryszard Nest, Boris Tsygan, Formality for algebroids I: Nerves of two-groupoids, arxiv/1211.6603
The notion of the nerve of a category seems to be due to Grothendieck, which is in turn based on the nerve of a covering from 1926 work of P. S. Alexandroff?. One of the first papers to consider the properties of the nerve and to apply it to problems in algebraic topology was
Many of the later developments can already be seen there in ‘embryonic’ form.