Im trying to understand the second isomorphism theorem but I am stuck. So in my textbook the author did the following:
Let G be a group and N<G a normal subgroup and H<G a subgroup. Let $\pi: G\rightarrow G/N$ be the canonical homomorphism given by $g\mapsto gN$. If we limit this map to H, then we have homomorphism $H\mapsto G/N$ with kernel $H\cap N $ and image HN/N. I understand why the kernel is equal to $H\cap N$, but why is the image equal to HN/N?. What I think is the following: The homomorphism $H\rightarrow G/N$ is defined as $h\mapsto hN$ which means the image for the whole subgroup H is $H/N=\{hN|h\in H\}$. Now the problem is that N can not be a subgroup of H so H/N does not make sense. Is that the reason why we have HN/N instead, because they are the same set $HN/N=\{hnN|h\in H\}=\{hN|h\in H\}=H/N$ or are they not? If not what is the difference between them?
You are of course correct that the image of ${\left.\pi\right|_H}$ is ${\{hN: h \in H\}}$, which is a subgroup of ${G/N}$ with group structure given by ${(hN)(h'N) = (hh')N}$. You could refer to this as ${H/N}$ if you like, but we tend to strictly reserve the notation of "${A/B}$" when $B$ is a sub-structure of $A$, which, as you point out, is not necessarily the case in this context.
If instead you consider the product group ${HN}$, then $N$ really is then a normal subgroup of ${HN}$, and so the notation ${(HN)/N}$ follows the standard convention mentioned above. Furthermore, ${(HN)/N}$ as a group is clearly the same as ${\{hN: h \in H\}}$ with the above mentioned product.
To summarise: we use ${(HN)/N}$ instead of ${H/N}$ to keep up with standard notation conventions.