Is semidirect product unique? This is about semi direct product on Dummit and Foote algebra text book.
Why is this statement true?

Theorem 12. Suppose $G$ is a group with subgroups $H$ and $K$ such that
  
  
*
  
*$H\trianglelefteq G$, and
  
*$H\cap K=1$
  
  
  Let $\varphi:K\to\operatorname{Aut}(H)$ be the homomorphism defined by mappinf $k\in K$ to the automorphism of left conjugation by $k$ on $H$. Then $HK\cong H\rtimes K$. In particular, if $G=HK$ with $H$ and $K$ satisfying $(1)$ and $(2)$, then $G$ is the semidirect product of $H$ and $K$.

I think semidirect product of $H,K$ depends on the choice of homomorphism $\varphi$.
But once $H,K$ is determined, $HK$ is unique, I think.
For example, if $H =\mathbb{Z}/3\mathbb{Z}$ and $K=\mathbb{Z}/4\mathbb{Z}$ then $Aut(H)=\mathbb{Z}/2\mathbb{Z}$. 
Then homomorphism from $K$ to $Aut(H)$ is not unique.
(Namely, there are two cases.)
So semidirect product of $H,K$ is not unique.
So how can I understand this situation?
Maybe, $HK$ is not unique, and there is a theorem such that $HK$ is isomorphic to the semidirect product of $H,K$ for some homomorphism $\varphi$?
Thanks!
 A: I find it helpful to distinguish between the inner semidirect product and the outer semidirect product. (Similiar to the distinction between the inner direct sum and the outer direct sum of vector (sub)spaces.)
Given a group $G$ and two subgroups $H$ and $N$ of $G$, the group $G$ is called the inner semidirect product of $H$ and $N$ with $N$ normal, if we have $NH = G$ and $H \cap N = 1$, and $N$ is normal in $G$. We then write
$$
  G = N \rtimes H \,.
$$
(This notion of an inner semidirect product does not depend on any homomorphism.)
Given on the other hand any two groups $N$ and $H$ and a group homomorphism $\theta \colon H \to \operatorname{Aut}(N)$, the corresponding outer semidirect product $N \rtimes_\theta H$ is defined as the set $N \times H$ together with the multiplication
$$
 (n_1, h_1) \cdot (n_2, h_2) := (n_1 \theta(h_1)(n_2), h_1 h_2) \,.
$$
Note that this group $N \rtimes_\theta H$ very much depends on $\theta$.
Now what is the connection between these two?
If $G$ is a group and $H$ and $N$ are two subgroups of $G$ such that $G = N \rtimes H$, then $N$ is normal in $G$. The conjugation action of $H$ on $G$ does therefore restrict to an action of $H$ on $N$. From this we get a group homomorphism
$$
  \theta \colon H \to \mathrm{Aut}(N)
  \quad\text{given by}\quad
  \theta(h)(n) = hnh^{-1} \,.
$$
It can then be checked that the map
$$
 N \rtimes_\theta H \to G = N \rtimes H, \quad (n,h) \mapsto n \cdot h
$$
is a group isomorphism. So every inner semidirect product can be seen as an outer semidirect product via the conjugation action of $H$ on $N$.
If on the other hand $N$ and $H$ are two groups and $\theta \colon H \to \operatorname{Aut}(N)$ a group homomorphism, then we can regard both $N$ and $H$ as subgroups $\widehat{N}$ and $\widehat{H}$ of the outer semidirect product $N \rtimes_\theta H$ via the inclusions
\begin{alignat*}{2}
  N &\to N \rtimes_\theta H \,, &\quad n &\mapsto (n,1) \,,
  \\
  H &\to N \rtimes_\theta H \,, &\quad h &\mapsto (1,h) \,.
\end{alignat*}
It then follows for those subgroup $\widehat{N}$ and $\widehat{H}$ that both $\widehat{N} \cdot \widehat{H} = \widehat{N} \rtimes_\theta \widehat{H}$ and $\widehat{N} \cap \widehat{H} = 1$, and that the subgroup $\widehat{N}$ is normal in $N \rtimes_\theta H$. The group $N \rtimes_\theta H$ is therefore the inner semidirect product of its subgroups $\widehat{N}$ and $\widehat{H}$, with $\widehat{N}$ normal.
PS: So given any two groups $H$ and $N$ there may exist multiple outer semidirect products $N \rtimes_\theta H$ because we can choose different group homomorphisms $\theta \colon H \to \operatorname{Aut}(N)$. But if we are given an inner semidirect product $G = N \rtimes H$ (i.e. we are given the group $G$ and its subgroups $H$ and $N$ such that $G = N \rtimes H$) then we are also implicitely given a group homomorphism $\theta \colon H \to \operatorname{Aut}(N)$ with $G \cong N \rtimes_\theta H$: The homomorphism $\theta$ is hidden in the group structure of $G$ and can be retrieved via the conjugation action of $H$ on $N$.
A: (A)
You are right: semi-direct product of $H$ by $K$ depends on choice of homomorphism $\varphi\colon K\rightarrow Aut(H)$. 
(B) When we start with group $G$, and subgroups $H,K$ with 
(1) $H\trianglelefteq G$, 
(2) $HK=G$,
(3) $H\cap K=1$,
then (the known group) $G$ is called as internal semi-direct product of $H$ by $K$. Here, we already know that $H$ is normal in $G$, hence every element $k\in K$ determines an automorphism of $H$: $h\mapsto khk^{-1}$. This gives a homomorphism $\varphi\colon K\rightarrow Aut(H)$.
(C) Suppose we don't know $G$, but we start with groups $H$ and $K$ (not subgroups), with a homomorphism $\varphi\colon K\rightarrow Aut(H)$ [like, in your question, see after ..for example...].
Then we can construct a group $G$ such that (roughly) $H$ and $K$ satisfy (1), (2) and (3) above. In this case, the constructed group $G$ is called as external semi-direct product of $H$ by $K$.
A: Definition: A semidirect product of two abstract groups $H$ and $K$ is a group $G$ containing (isomorphic copies of) $H$ and $K$ as subgroups, with $H$ normal inside $G$, and such that $G$ factors uniquely as $G = HK$ (the uniqueness is equivalent to asking that $H \cap K = 1$).
Fact: Any semidirect product of $H$ and $K$ induces a homomorphism $K \to \operatorname{Aut}H$ by conjugation (this works since $H$ is normal).
Theorem (existence and uniqueness): Given abstract groups $H$, $K$ and a homomorphism $\phi:K \to \operatorname{Aut}H$, there exists a semidirect product of $H$ and $K$ ("outer semidirect product") $G = H \rtimes_\phi K$ inducing $\phi$. Moreover, any semidirect product of $H$ and $K$ inducing $\phi$ is isomorphic to $H \rtimes_\phi K$.
Note: Two different homomorphisms $K \to \operatorname{Aut}H$ can induce the same semidirect product. For example, let $K = \mathbb{Z}$, let $H$ be any nonabelian group, say with $h \in H \setminus Z(H)$, and consider the conjugation homomorphism $\phi:\mathbb{Z} \to \operatorname{Aut}H$ defined by $\phi_1(h') = hh'h^{-1}$. By our choice of $h$, $\phi$ is a nontrivial homomorphism, but both $\phi$ and the trivial homomorphism $\mathbb{Z} \to \operatorname{Aut}H$ yield the direct product $H \times \mathbb{Z}$.
