Let \(G\) be a group. We are going to construct a category with one element whose morphisms are elements of this group \(G\). Definition : A category \(\mathcal{C}\) consists of
  • a collection of objects, \(\text{Ob}(\mathcal{C})\),
  • for each \(A,B\in \text{Ob}(\mathcal{C})\) a collection of maps from \(A\) to \(B\) denoted by \(\mathcal{C}(A,B)\).
  • for each \(A,B,C \in \text{Ob}(\mathcal{C})\) a function \(\mathcal{C}(B,C)\times \mathcal{C}(A,B)\rightarrow \mathcal{C}(A,C)\) with \((g,f)\mapsto g\circ f\) called the composition
  • for each \(A\in \text{Ob}(\mathcal{C})\) an element \(1_A\in \mathcal{C}(A,A)\) called the identity on \(A\)
satisfying the following conditions
  • Associativity : for each \(f\in \mathcal{C}(A,B), g\in \mathcal{C}(B,C), h\in \mathcal{C}(C,D)\) we have \((h\circ g)\circ f=h\circ (g\circ f)\).
  • Identity law : for each \(f\in \mathcal{C}(A,B)\) we have \(f\circ 1_A=f=1_B\circ f\).
We are not  constructing a categroy \(\mathcal{C}\) with \(\text{Ob}(\mathcal{C})=G\), we are  constructing a category \(\mathcal{C}\) with \(\text{Ob}(\mathcal{C})=\{A\}\)(one point set) and \(\mathcal{C}(A,A)=G\). We have defined objects and morphisms collections (here there is only one object so there is only one morphisms collection). We have to define composition \(\mathcal{C}(A,A)\times \mathcal{C}(A,A)\rightarrow \mathcal{C}(A,A)\) i.e., we have to give a map \(G\times G\rightarrow G\).  There are two natural ways to give this map \((g,h)\mapsto g.h\) or \((g,h)\mapsto h.g\). We consider the map \((g,h)\mapsto g\circ h:=g.h\) to give composition. Obvious choice of an identity element in \(\mathcal{C}\) is $llatex 1_A=e$ identity element of the group. Associativity of group implies associativity of composition

\((g\circ h)\circ f=(g.h)\circ f=(g.h).f=g.(h.f)=g\circ (h\circ f).\)

We have

\(1_A\circ g=e.g=g\) and \(g\circ 1_A=g.e=g\).

So, we have a category whose sets of objects contains exactly one element and whose set of morphisms is exactly one set equal to given group \(G\). Given a category \(\mathcal{C}\) and an element \(A\in\text{Ob}(\mathcal{C})\) we have a functor \(h_A:\mathcal{C}^{\text{op}}\rightarrow \text{Sets}\) defined by \(B\mapsto \mathcal{C}(B,A)\) and given an element \(f\in \mathcal{C}(B,C)\) we have \(h_A(f)\in \text{Mor}((h_A(C),h_A(B))\) given by \(h_A(f)(g)=g\circ f\). We will see explicitly what is  \(h_A\) in case of group as a category with exactly one object as defined above. We have \(h_A(A)=\mathcal{C}(A,A)=G\).  Let \(h\in \mathcal{C}(A,A)=G\). Then, \(h_A(h):G\rightarrow G\) given by \(g\mapsto g\circ h=g.h\). Let us see explicitly what are the natural transformations \(\eta:h_A\rightarrow h_A\). This should come up with \(\eta(A):h_A(A)\rightarrow h_A(A)\) i.e., with a map \(\eta(A)=\sigma:G\rightarrow G\) satisfying the naturality condition i.e., for every \(h\in G=\mathcal{C}(A,A)\) the following diagram commutes ql_5fecb8d9fff6db2810f2e1d2eec2e7a6_l3 i.e., we want \(\sigma:G\rightarrow G\) to be such that \((h_A(h)\circ \sigma)(g)=(\sigma\circ h_A(h))(g)\) for all \(g\in h_A(A)=G\) i.e., \(h_A(h)(\sigma(g))=\sigma(h_A(h)(g))\) ie., \(\sigma(g)h=\sigma(gh)\) for all $g\in G$. So, the set of all natural transformations from \(h_A\) to \(h_A\) is given by

\(\text{Nat}(h_A,h_A)=\{\sigma:G\rightarrow G : \sigma(gh)=\sigma(g)h \forall g,h\in G\}\).

See that every element in \(\text{Nat}(h_A,h_A)\) is an isomorphism, as a set. It is not even necessary that \(\sigma\in \text{Nat}(h_A,h_A)\) is a group homomorphism. See that \(\sigma(h)=\sigma(1.h)=\sigma(1).h ~~\forall h\in G\). Given \(\sigma\in \text{Nat}(h_A,h_A)\) define \(\tau:G\rightarrow G\) as \(\tau(h)=(\sigma(1))^{-1}h\). Then,
  • \(\sigma(\tau(h))=\sigma(\sigma(1)^{-1}h)=\sigma(1).\sigma(1)^{-1}.h=h\).
  • \(\tau(\sigma(h))=\tau(\sigma(1)h)=\sigma(1)^{-1}.\sigma(1).h=h\).
So, \(\tau\) is inverse of \(\sigma\). Thus, every element in \(\text{Nat}(h_A,h_A)\) is an isomorphism of sets. Thus, we have

\(\text{Nat}(h_A,h_A)=\{\sigma\in \text{Sym}(G) : \sigma(gh)=\sigma(g)h \forall g,h\in G\}\leq \text{Sym}(G)\).

Yoneda lemma states that \(\mathcal{C}(A,A)\cong \text{Nat}(h_A,h_A)\) i.e., \(G\cong H\leq \text{Sym}(G)\) which is exactly the statement of Cayley's theorem. So, yoneda lemma does say that any group can be identified with a subgroup of its symmetric group.