Functions sending subgroups to subgroups I have a silly doubt: if $f: G \longrightarrow G'$ is a function between groups sending subgroups $G$ in subgroups of $G'$, it is true that $f$ is a homomorphism between $G$ and $G'$? I'm convicted that this is false, but I have no clue on how to construct a counterexample. Can you help me, please?
 A: The place to start is to look at the requirements for $f$ to be a homomorphism: we must have $f(ab)=f(a)f(b)$. So for a counterexample, we need $G,G',f, a, b$ such that $f(ab) \neq f(a)f(b)$. If we have $G=\mathbb Z_p$ for some prime $p$, there are no proper subgroups, so the condition of subgroups being sent to subgroups becomes irrelevant as long as $f$ is  $1$-$1$ and $f(1_G)=1_{G'}$. So we just have to pick $a,b,f(a),f(b)$ to not satisfy the multiplication relation. For instance, $f:\mathbb Z_5 \rightarrow \mathbb Z_5$ where $f(2) = 2$, $f(3)=4$. ($\mathbb Z_3$ doesn't work because any bijection between $1$ and $2$ is the same as a bijection between $1$ and $-1$, and $f(x) = -x$ is a homomorphism).
A: An example: define $f: G \longrightarrow G$, with $f(g)=g^{-1}$. This (bijection) sends subgroups to subgroups, but is not necessarily a homomorphism (try a non-abelian group).
A: Another example: take $G = C_p$ and let $f : G \to G$ be any bijection such that $f(1) = 1$. There are $(p-1)!$ of these but only $p-1$ of them are homomorphisms.
