TITLE: Is there a unique homomorphism of $\mathbf Z $ into $A$?
QUESTION [0 upvotes]: I am reading Atiyah and Macdonalds's Introduction to Commutative Algebra. On pages 30, they say that 

ii) Let $A$ be any ring. Since $A$ has an identity element there is a unique homomorphism of the ring of integers $\mathbf Z$ into $A$, namely $n \mapsto n\cdot 1 $. Thus every ring is automatically a $\mathbf Z$-algebra.   

I wonder whether $1$ shoud maps to the identity element of $A$. Of course we do not consider the trivial map. I find a counter example: $\phi : \mathbf Z \to \mathbf Z \times \mathbf Z$ which maps $1$ to $(1,0)$. I don't know what is the problem.

REPLY [3 votes]: It depends on what you mean by "homomorphism". 
You might think of it as a definition (i.e. that $f(1) = 1$ and that's it), which is fine, but there is something deeper behind. 
You can consider the category of unital commutative rings, and in this category, the morphisms are ring homomorphisms which map $1$ to $1$ (since in some sense, we want the morphisms to respect the structure of the category, that is, that the rings are unital). You can apply the forgetful functor from the category of unital commutative rings to the category of commutative rings (by simply "forgetting that $1$ is there"), e.g. a unital commutative ring is in particular a commutative ring. 
You have seen that this forgetful functor is not full, i.e. between two unital rings, there might be some ring homomorphisms which are not homomorphisms of unital rings. If the codomain ring is a unital integral domain, since 
$$
f(1) = f(1^2) = f(1)^2, 
$$
we see that $f(1) = 1$ or $f(1) = 0$. In the category of commutative rings (not necessarily unital), the option $f(1) = 0$ is a well-defined morphism, and in particular is the only extra morphism we obtain by forgetting that the rings are unital. However, in the more general case, you obtain more and more morphisms (for instance the one you found between $\mathbb Z$ and $\mathbb Z^2$). 
Hope that helps,
{"set_name": "stack_exchange", "score": 0, "question_id": 1345339}