For homework I was assigned the following problem. Let $K,H$ be finite groups of coprime order. Prove the obvious set function below is an isomorphism of groups. $$\mathsf{Aut}(K\times H)\cong \mathsf{Aut}(K)\times \mathsf{Aut}(H)$$
I started by drawing the diagram below where $\iota_1,\iota_2$ inject the unit of the missing coordinate.
Since $(k,h)=(k,1)(1,h)=(1,h)(k,1)$ these unit injections are jointly epimorphic. This gives an injection $\mathsf{End}(K\times H)\rightarrowtail \mathsf{Hom}(K,K\times H)\times \mathsf{Hom}(H,K\times H)$. Combining this with the universal property of the product means $f$ is determined by the four (tripe) composites in the diagram.
Now if the orders of $K,H$ are coprime the only group arrows between them are trivial, so we have an injection $$\mathsf{End}(K\times H)\rightarrowtail \mathsf{End}(K)\times \mathsf{End}(H).$$
I think this is also a surjection since given $(g_1,g_2)$ in the RHS we can define $\pi_1f(k,1)=g_1(k),\pi_2f(1,h)=g_2(h)$ which defines an endomorphism of the product. Am I missing something here?
At any rate, it now suffices to show this bijection preserves and reflects injectivity, since the groups are finite, and this follows by routine calculation.
Finally, some more calculations seem to prove $\mathsf{End}(K\times H)\cong \mathsf{End}(K)\times \mathsf{End}(H)$ is really an isomorphism of monoids, which implies the desired result.
Have I made some mistake? I ask because it seems much more natural to ask to prove $\mathsf{End}(K\times H)\cong \mathsf{End}(K)\times \mathsf{End}(H)$.
