# $Aut(G\times H)$ is isomorphic to the direct product $Aut(G)\times Aut(H)$.

Suppose $G$ and $H$ are finite groups of relatively prime orders. Prove that $Aut(G\times H)$ is isomorphic to the direct product $Aut(G)\times Aut(H)$.

My attempt: I can imagine that given some automorphism of $G\times H$, $\phi(g,h)\rightarrow(g_2,h_2)$ where $g,g_2\in G$ and $h,h_2\in H$, we can create two automorphisms for $G$ and $H$ where $\tilde{\phi}(g)=g_2$ and $\hat{\phi}(h)=h_2$. Basically we can "build" an automorphism of $G\times H$ out of any two automorphisms of $G$ and $H$, and hence $Aut(G\times H)$ will be all possible combinations of automorphisms of $G$ and $H$.

I know this is a very imprecise method, but I'm looking for a step in the right direction.

Any help appreciated!

You're on the right track. Your argument about "building an automorphism" shows that $\operatorname{Aut} G \times \operatorname{Aut} H$ is contained in $\operatorname{Aut} (G\times H)$.
Note that your argument does not make use of the assumption that $G$ and $H$ have relatively prime orders. Thus it shows that $\operatorname{Aut} G \times \operatorname{Aut} H$ is always contained in $\operatorname{Aut} (G\times H)$, regardless of the group orders.
What's missing is an argument that $\operatorname{Aut} (G\times H)$ doesn't have anything in it besides the things coming from $\operatorname{Aut} G\times\operatorname{Aut} H$. This is the part of the claim that depends on the assumption that $G$ and $H$ have relatively prime orders. Indeed, without this assumption, it's not true: for example if $G$ and $H$ are both cyclic of prime order $p$, then $\operatorname{Aut} (G\times H)$ is actually $GL(2,\mathbb{F}_p)$, which is significantly bigger than $\operatorname{Aut} G \times \operatorname{Aut} H = \mathbb{F}_p^\times \times\mathbb{F}_p^\times$. This is because there exist automorphisms that "mix up" $G$ and $H$. For example if $G=H=(\mathbb{F}_p,+)$, then there is an automorphism that fixes $(1,0)$ (so $G\times\{0\}$ stays inside $G\times\{0\}$), but sends $(0,1)$ to $(1,1)$ (so $\{0\}\times H$ is moved by the automorphism to somewhere else).
G. Sassatelli's hint is aimed at showing how you can rule out the possibility that $G\times H$ has any automorphisms that "mix up" the $G$ part (which is $G\times\{\text{identity in$H$}\}$) and the $H$ part (i.e. $\{\text{identity in$G$}\}\times H$). Use the fact that $G,H$ have prime orders.
Hint: The thing that makes your idea work is that, since $\operatorname{gcd}(\lvert G\rvert,\lvert H\rvert)=1$, the subgroups $G\times\{e_H\}$ and $\{e_G\}\times H$ are characteristic subgroups of $G\times H$.