How many distinct ring homomorphisms are there from Z to Z? From Z x Z to Z? How many distinct ring homomorphisms are there from Z to Z? From Z x Z to Z?


I'm a little lost as to what this question is asking. So far I'm guessing all ring homomorphisms from Z to Z would be of form $$x\rightarrow ax$$ But I'm kind of lost conceptually on how to think about this.  Any help greatly appreciated.
For homomorphisms $f:\mathbb{Z}\rightarrow\mathbb{Z}$, note that $f$ is determined by $f(1)$, since $f(n)=n\cdot f(1)$. Since the homomorphism is required to be unital, $f(1)=1$, so $f=\operatorname{id}_\mathbb{Z}$.



For homomorphisms $f:\mathbb{Z}\times\mathbb{Z}\rightarrow\mathbb{Z}$, note again that such a homomorphism is completely determined by $f(1,0)$ and $f(0,1)$. Furthermore, since $(1,1)$ is the multiplicative identity of the ring $\mathbb{Z}\times\mathbb{Z}$, we have $$f(1,0)+f(0,1)=f((1,0)+(0,1))=f(1,1)=1$$ Since the homomorphism must preserve multiplication, $$0=f(0,0)=f((1,0)\cdot(0,1))=f(1,0)\cdot f(0,1)$$ Thus, one of $f(1,0)$ and $f(0,1)$ should be zero, and another should by $1$.

We conclude that there are only two homomorphisms $\mathbb{Z}\times\mathbb{Z}\rightarrow\mathbb{Z}$: the projections on the first and second coordinate.
For see all rings homomorphism $f:\Bbb Z\rightarrow \Bbb Z$ you can remember that $f$ is also a abelian group homomorphism and $\Bbb Z$ is a cyclic group. Then there exists only two homomorphism, the identity and $f(x)=-x$ and they are also ring homomorphism.

On other hand, if $f:\Bbb Z\times \Bbb Z\rightarrow \Bbb Z$ is a ring homomorphism such that $f(a,b)=1$. And considered $f(1,0)=m$, $f(0,1)=n$. I assume that you definition of ring homomorphism consider that $f(1)=1$. So how many different values or a and b you have?