TITLE: Taking the automorphism group of a group is not functorial.
QUESTION [33 upvotes]: Once upon a time I proved that there is no functorial 'association'
$$F:\ \mathbf{Grp}\ \longrightarrow\ \mathbf{Grp}:\ G\ \longmapsto\ \operatorname{Aut}(G).$$
A few days ago I casually mentioned this to someone, and was asked for a proof. Unfortunately I could not and still can not recall how I proved it. Here is how much of my proof I do recall:
Suppose such a functor does exist. Choose some group $G$ wisely, and let $f\in\operatorname{Hom}(V_4,G)$ and $g\in\operatorname{Hom}(G,V_4)$ be such that $g\circ f=\operatorname{id}_{V_4}$. Then, because $F$ is a co- or contravariant functor we have
$$F(g)\circ F(f)=F(g\circ f)=F(\operatorname{id}_{V_4})=\operatorname{id}_{\operatorname{Aut}(V_4)},$$
or
$$F(f)\circ F(g)=F(g\circ f)=F(\operatorname{id}_{V_4})=\operatorname{id}_{\operatorname{Aut}(V_4)},$$
where $\operatorname{Aut}(V_4)\cong S_3$. In particular $\operatorname{Aut}(G)$ contains a subgroup isomorphic to $S_3$. Then something about the order of $\operatorname{Aut}(G)$ leads to a contradiction.
I cannot for the life of me find which goup $G$ would do the trick. Any ideas?

REPLY [15 votes]: Though the question has effectively been answered by the combined comments of Martin Brandenburg and Derek Holt, I thought I'd write up a complete answer for completeness' sake.
Let $N:=\Bbb{F}_{11}$ the finite field of $11$ elements and $H:=\Bbb{F}_{11}^{\times}$ its unit group. Let $G:=N\rtimes H$ the semidirect product of $N$ and $H$ given by the multiplication action of $H$ on $N$. Note that $G$ is isomorphic to the group of affine transformations of $\Bbb{F}_{11}$. Then the maps
$$f:\ H\ \longrightarrow\ G:\ h\ \longmapsto\ (0,h)\qquad\text{ and }\qquad g:\ G\ \longrightarrow\ H:\ (n,h)\ \longmapsto\ h,$$
are group homomorphisms and satisfy $g\circ f=\operatorname{id}_H$. Now suppose there exists a covariant functor 
$$F:\ \mathbf{Grp}\ \longrightarrow\ \mathbf{Grp}:\ X\ \longmapsto\ \operatorname{Aut}(X).$$
Then we have group homomorphisms
$$F(f):\ \operatorname{Aut}(H)\ \longrightarrow\ \operatorname{Aut}(G)\qquad\text{ and }\qquad F(g):\ \operatorname{Aut}(G)\ \longrightarrow\ \operatorname{Aut}(H),$$
satisfying
$$F(g)\circ F(f)=F(g\circ f)=F(\operatorname{id}_H)=\operatorname{id}_{\operatorname{Aut}(H)},$$
so the identity on $\operatorname{Aut}(H)$ factors over $\operatorname{Aut}(G)$, i.e. $\operatorname{Aut}(G)$ has a subgroup isomorphic to $\operatorname{Aut}(H)$.
We have $\operatorname{Aut}(H)\cong\Bbb{Z}/4\Bbb{Z}$ because $H$ is abelian of order $10$. By this question we have $\operatorname{Aut}(G)\cong G$. But $|\operatorname{Aut}(G)|=|G|=11\times10=110$ is not divisible by $|\operatorname{Aut}(H)|=|\Bbb{Z}/4\Bbb{Z}|=4$, a contradiction. This shows that no such covariant functor exists. The contravariant case is entirely analogous.