Why does the homomorphism for a semi-direct product need to be mapped to a subgroup of the automorphism group? I just started learning about semi-direct products, we have a group $H$ and a group $K$, as well as a homomorphism $\varphi:K\rightarrow\;$Aut$(H)$. This is to ensure that the multiplication 
$$(h_1,k_1)(h_2,k_2)=(h_1\;k_1\cdot h_2)(k_1k_2)$$
forms a group. However, it seems like all we need is for $k_1\cdot h_2\in H$. In this case, why can't $k_1$ map to any element of $S_H$, i.e. why is the homomorphism not $\varphi:K\rightarrow S_H$?
It seems like we could still have an inverse since $k^{-1}\cdot k\cdot h_1=h_1$ and the group would still be closed under multiplication. Furthermore, there would still be an identity. Is there something I am missing?
 A: This confused me as well.

Let $H$ and $K$ be groups and let $\varphi\colon K\to S_H$ be an action of $K$ on $H$ (considered here as just a set). Suppose $G=H\times K$ is a group under the operation
  $$(h,k)(h',k')=(h\varphi_k(h'),kk').$$
  Then $\varphi_k$ is an automorphism of $H$ for all $k$, and $\varphi\colon K\to \operatorname{Aut}(K)$ is a homomorphism.

Proof: since $\varphi_k$ is a permutation of $H$, we only need to show it is a group homomorphism. Since $\varphi_1$ is the identity, we see
$$(1,k)(h,1)(h',1)=(1,k)(hh',1)=(\varphi_k(hh'),k),$$
and on the other hand,
$$(1,k)(h,1)(h',1)=(\varphi_k(h),k)(h',1)=(\varphi_k(h)\varphi_k(h'),k).$$
Since $G$ is associative, $(\varphi_k(hh'),k)=(\varphi_k(h)\varphi_k(h'),k)$, and so $\varphi_k(hh')=\varphi_k(h)\varphi_k(h')$.
.
.
.
.
.
.

Here is some more material I had on hand that you didn't ask for.

Theorem: Suppose $G=H\rtimes_\varphi K$ is a group, where $\varphi\colon K\to S_H$ is an action of $K$ on $H$, and multiplication is given by $(h,k)\cdot(h',k')=(h
\varphi_k(h'),kk')$. Then under the obvious identifications, $H$ is normal in $G$, $K$ is a subgroup of $G$, $HK=G$, and $N\cap H=\{1\}$.

Proof: To see $K\le G$, note that $$(1,k_1)(1,k_2)=(1,k_1k_2)\qquad\text{and}\qquad (1,k)(1,k^{-1})=(1,1).$$
To see $H\le G$, notice
$$(h_1,1)(h_2,1)=(h_1\varphi_1(h_2),1)=(h_1h_2,1)$$
and
$$(h,1)(h^{-1},1)=(h,\varphi_1(h^{-1}),1)=(hh^{-1},1)=(1,1).$$
Now for any $h\in H$, $k\in K$, we have
$$(1,k)(h,1)(1,k^{-1})=(\varphi_k(h),k)(1,k^{-1})=(\varphi_k(h),1)\in H,$$
so $H$ is normal in $G$. Next, for any $(h,k)\in G$, we have $(h,1)(1,k)=(h,k)$, so $N\times H=G$. Finally, it's clear that $N\cap G$ contains only $(1,1)$.
