I've recently seen the following problem:
How many unitary ring homomorfisms $(f(1)=1)$ are there between $\mathbb{Q}$ and $\mathbb{Q}$?
Before even starting to explain my process I want to clarify that I'm more interested on a solution or some help with the reasoning I've followed more than help with the problem itself. I'm sure there's easier ways to solve this but my question is more related to my particular solution than to the problem. As as the only reason I mention the problem is to give some context for my thought process.
On the same problem I've solved this for cases where origin or image rings are $\mathbb{Z}$ or $\mathbb{Z}\times \mathbb{Z}$ so it seemed natural to me to think about a way to relate $\mathbb{Q}$ to this other rings.
The way I thought of doing this is something intuitively similar to the first theorem of isomorphism. My intuition about this theorem is that you have the classes of $kerf$ that all go to one single element in $imf$. Therefore you look for a group where this classes are all the same element in order to build the isomorphism. This group ends up being $G/kerf$.
Now my idea for this problem is similar to this. You have the elements in $\mathbb{Q}$ of the form $\frac{p}{q}$ irreducibles. Now, I've thought of the following mapping:
$\varphi : \mathbb{Z}\times \mathbb{Z} \setminus \{0\} \rightarrow \mathbb{Q}$
$(a,b)\rightarrow \frac{a}{b}$
However this rises the problem with elements such as $(1,2)$ and $(2,4)$ that are different in the origin ring but have the same immage. I was wondering if there was a way to take just the classes needed for this mapping to be inyective.