Let $G$ be a group. The automorphism group of $G$ is the group of all isomorphisms $G\to G$. We denote this group by ${\rm Aut}(G)$. Is it necessarily true that ${\rm Aut}(G\times H) \cong {\rm Aut}(G)\times {\rm Aut}(H)$?

Suppose $G$ and $H$ are finite groups whose orders are coprime. Then any homomorphism $f:G\to H$ must be trivial because for any $g\in G$, the element $f(g)$ has order dividing the order of $H$, but also dividing the order of $G$. Thus $f(g) = 1\in H$ where $1\in H$ is the group identity.

That means that any homomorphism $G\times H\to G\times H$ can be factored as a homomorphism $(f_G,f_H)$ where $f_G:G\to G$ and $f_H:H\to H$ are homomorphisms. Thus, if $G$ and $H$ are finite groups of coprime order, then ${\rm Aut}(G\times H) \cong {\rm Aut}(G)\times{\rm Aut}(H)$. Try working this out directly with $\Z/6\cong\Z/2\times\Z/3$.

Of course, this result does not hold in general. For example, an automorphism $\Z/2\times\Z/2\to\Z/2\times\Z/2$ is just a linear isomorphism of vector spaces, and so ${\rm Aut}(\Z/2\times\Z/2)\cong {\rm GL}_2(\Z/2)$. Incidentally, the latter is actually isomorphic to the symmetric group $S_3$ of permutations on three symbols.