Are there any ring homomorphisms from $\mathbb{Z} \times \mathbb{Z}$ to $\mathbb{Q}$? The operations on $\mathbb{Z} \times \mathbb{Z}$ are $(a,b) + (c,d) = (a + c, b + d)$ and $(a,b)(c,d) = (ac,bd)$ respectively. For context, this is to solve the problem on my homework assignment: "Let $R=\mathbb{Z}\times\mathbb{Z}$, $P$ be the prime ideal $\{0\}\times\mathbb{Z}$ and $S=R-P$. Prove that $S^{-1}R\cong \mathbb{Q}$".
My first impression is to use the uniqueness theorem of fraction rings to construct a homomorphism $\Psi: S^{-1}R \to \mathbb{Q}$ using some homomorphism $\psi: R \to S$ so that $\psi = \Psi \circ \pi$ where $\pi: R \to S^{-1}R$ is the projection. I need a homomorphism $\psi$ for this to work, though. Does such a homomorphism even exist, though? After writing and rewriting this answer a few times, my best guess would be the homomorphism $(m,n) \mapsto m$ but I'm not sure if such a homomorphism would work. Do any of you have any ideas? Thank you!
 A: The map you propose is certainly a homomorphism: it is the composition of the projection $\mathbb{Z}\times\mathbb{Z}\to (\mathbb{Z}\times\mathbb{Z})/(\{0\}\times\mathbb{Z})$, and the embedding 
$$\frac{\mathbb{Z}\times\mathbb{Z}}{\{0\}\times\mathbb{Z}} \cong\left(\frac{\mathbb{Z}}{\{0\}}\right)\times \left(\frac{\mathbb{Z}}{\mathbb{Z}}\right) \cong\mathbb{Z}\hookrightarrow\mathbb{Q}.$$
Moreover, an element of $S$ is of the form $(r,s)$ with $r\neq 0$, and so maps to $r\neq 0$, which is invertible in $\mathbb{Q}$.
So you have all the ingredients you need. 
A: To answer the question in the title...
Let $\phi: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Q}$ be a ring homomorphism. We don't require that $\phi(1,1)=1$.
Let $e_1=(1,0)$ and $e_2=(0,1)$. Then $\phi$ is determined by the images $q_1=\phi(e_1)$ and $q_2=\phi(e_2)$. Indeed, $\phi(a,b)=aq_1+bq_2$, by additivity.
Now, by multiplicativity, $e_1 e_2=0$ implies $q_1=0$ or $q_2=0$. Also $e_i^2=e_i$ implies $q_i \in \{0,1\}$.
Therefore, there are only three possibilities:


*

*$\phi(a,b)=0$ for all $(a,b)$

*$\phi(a,b)=a$ for all $(a,b)$

*$\phi(a,b)=b$ for all $(a,b)$
