So we have $$\mathcal{Q}_8:=\{1,-1,i,-i,j,-j,k,-k\},$$ and I know all of its subgroups are $$\{\{1\},\{-1,1\},\{1,i,-i,-1\},\{1,j,-1,-j\},\{1,k,-1,-k\},\mathcal{Q}_8\}.$$ However, I am a bit puzzled on how to approach this question. All the homomorphisms will just be functions that map subgroups to subgroups right? Then, the isomorphisms are the functions that are homomorphisms from one subgroup to the other of the same order? So we just exclude those and get the final answer? Or am I barking up the wrong tree here?
OK, so let $\phi:\ \mathcal{Q}_8 \rightarrow \mathcal{Q}_8$ be a homomorphism. Then, by the first isomorphism theorem, we have that ker$(\phi)$ is a normal subgroup of $\mathcal{Q}_8$. We have that $\{-1,1\}$ is the centre of the group, so this is normal. The trivial group is also in the normal group and the indexes of the other subgroups are $2$, so they also are normal. Thus the kernel is just all of the subgroups of $\mathcal{Q}_8$.
The image is a subgroup of $\mathcal{Q}_8$ and so, the possible candidates for $im(\phi)$ is precisely the same as the list of candidates for the kernel.
But now I'm stumped and would appreciate a hint here.