I'm working on the following problem:
Prove that $\mathbb{Z}$ and $\mathbb{Q}$ are not isomorphic as groups.
Here is my attempt at a solution:
If $\mathbb{Z} \cong \mathbb{Q}$, then there must exist a bijective homomorphism $\varphi: \mathbb{Z} \to \mathbb{Q}$. Consider $\varphi(x) = x$. Clearly, this is a homomorphism as it is the identity map. Moreover, it is also clearly injective. However, it fails to be surjective since there exist elements of $\mathbb{Q}$ that are not mapped to by $\varphi$ (like $3/2$ or $1/4$). Hence, since $\varphi$ is an injective homomorphism, but not surjective, we see that there cannot exist a bijection between $\mathbb{Z}$ and $\mathbb{Q}$. Thus, $\mathbb{Z} \not \cong \mathbb{Q}$.
Could anyone critique this solution? Am I on the right path?
Your solution is incorrect. You have shown that one particular homomorphism is not an isomorphism.
To show that they are not isomorphic you need to show that there is no possible isomorphism whatsoever.
HINT: One of these groups is cyclic.