TITLE: Describe all ring homomorphisms from $\mathbb Z\times\mathbb Z$ to $\mathbb Z\times\mathbb Z$
QUESTION [9 upvotes]: Note: In this class, a ring homomorphism must map multiplicative and additive identities to multiplicative and additive identities. This is different from our textbook's requirement, and often means there are fewer situations to consider.
I always have a pretty hard time answering these types of questions: 
Let $\phi: \mathbb{Z~ \times ~Z} \rightarrow \mathbb{Z~ \times ~Z}$  be a ring homomorphism. We know, then, by definition of a ring homomorphism, that $\phi(1,1) = (1,1)$ (because $(1,1)$ is the multiplicative identity of $\mathbb{Z~ \times ~Z}$). Any ring homomorphism must then have the form $\phi(a,b) = (a,b)$ or $\phi(a,b) = (b,a)$. Any addition/multiplication to elements would cease to send $(1,1)$ to $(1,1)$. 
Is... this correct? It seems too simple, but I'm pretty sure it covers the possibilities.

REPLY [3 votes]: I have a manual that goes through the solutions to this problem. Although Quimey is on track, there is actually 9 possibilities, and they all describe a ring homomorphism. 
Think of it this way. Let $f\colon  \mathbb Z\times\mathbb Z \to \mathbb Z\times\mathbb Z$ be the function. Then suppose that $f(1,0) = (m,n)$.
Well, $f(1,0) = f( (1,0)(1,0) ) = f(1,0)f(1,0) = (m,n)(m,n) = (m^2,n^2)$. So when is it true in $\mathbb Z$ for $m^2 = m$ and $n^2 = n$? only when $m$ and $n$ are $1$ or $0$. 
This means that $f(1,0) = (1,0) , (0,1) , (1,1) , (0,0)$
Notice though, that they have to be in certain combinations with each other because of the reason Quimey stated.