Recall that if $A, B$ are rings with unity then a ring homomorphism $f: A \to B$ is a map satisfying

$f(x+y)=f(x)+f(y)$

$f(xy)=f(x)f(y)$

$f(1_A)=1_B$

for all $x, y \in A$ and $1_A, 1_B$ are unity elements of $A$ and $B$, respectively.

Proof.

We claim that there is one and only one ring homomorphism from $\Z$ to $R$.

Let us first remark that there is at least one ring homomorphism $\Z \to R$.
Define the map $f_0:\Z\to R$ by
\[f(n)=n.\]
(To be more precise, this means $f(n) = n \cdot 1_R$, where $1_R$ is the unit element in $R$.)
Then it is clear that $f_0$ is a ring homomorphism from $\Z$ to $R$.
We want to prove that this is the only ring homomorphism.

Suppose that $f:\Z\to R$ is a ring homomorphism.
By definition, we must have
\[f(1)=1_R.\]
Using property (1) with $x=y=0$, we see that
\[f(0)=f(0)+f(0).\]
Thus, we have $f(0)=0$.
Next, we apply (1) with $x=1, y=-1$ and obtain
\[0=f(0)=f(1+(-1))=f(1)+f(-1).\]
Thus we have
\[f(-1)=-f(1)=-1_R.\]

We want to determine the value $f(n)$ for any $n\in \Z$.
If $n$ is a positive integer, then we can write it as
\[n= \underbrace{1+\cdots+1}_{n\text{ times}} \]
By property (a) applied repeatedly, we have
\begin{align*}
f(n) &= \underbrace{f(1)+\cdots+f(1)}_{n\text{ times}} \\
&=\underbrace{1_R+\cdots+1_R}_{n\text{ times}}=n.
\end{align*}
If $n$ is a negative integer, we express it as
\[n=\underbrace{(-1)+(-1)+\cdots+(-1)}_{n\text{ times}}\]
and obtain
\begin{align*}
f(n)&=\underbrace{f(-1)+f(-1)+\cdots+f(-1)}_{n\text{ times}}\\
&=\underbrace{(-1_R)+(-1_R)+\cdots+(-1_R)}_{n\text{ times}}=n.
\end{align*}
Therefore, we have proved that
\[f(n)=n\]
for any $n\in \Z$. Hence any ring homomorphism from $\Z$ to $R$ is the ring homomorphism $f_0$ that we saw at the beginning of the proof.

In conclusion, there is exactly one ring homomorphism from $\Z$ to $R$, which is given by
\[f_0(n)=n\]
for any $n\in\Z$.

Comment.

In category theory, we say that the ring of integers $\Z$ is an initial object in the category of rings with unity.

Three Equivalent Conditions for a Ring to be a Field
Let $R$ be a ring with $1$. Prove that the following three statements are equivalent.
The ring $R$ is a field.
The only ideals of $R$ are $(0)$ and $R$.
Let $S$ be any ring with $1$. Then any ring homomorphism $f:R \to S$ is injective.
Proof. […]

Characteristic of an Integral Domain is 0 or a Prime Number
Let $R$ be a commutative ring with $1$. Show that if $R$ is an integral domain, then the characteristic of $R$ is either $0$ or a prime number $p$.
Definition of the characteristic of a ring.
The characteristic of a commutative ring $R$ with $1$ is defined as […]

Generators of the Augmentation Ideal in a Group Ring
Let $R$ be a commutative ring with $1$ and let $G$ be a finite group with identity element $e$. Let $RG$ be the group ring. Then the map $\epsilon: RG \to R$ defined by
\[\epsilon(\sum_{i=1}^na_i g_i)=\sum_{i=1}^na_i,\]
where $a_i\in R$ and $G=\{g_i\}_{i=1}^n$, is a ring […]

A Maximal Ideal in the Ring of Continuous Functions and a Quotient Ring
Let $R$ be the ring of all continuous functions on the interval $[0, 2]$.
Let $I$ be the subset of $R$ defined by
\[I:=\{ f(x) \in R \mid f(1)=0\}.\]
Then prove that $I$ is an ideal of the ring $R$.
Moreover, show that $I$ is maximal and determine […]

Rings $2\Z$ and $3\Z$ are Not Isomorphic
Prove that the rings $2\Z$ and $3\Z$ are not isomorphic.
Definition of a ring homomorphism.
Let $R$ and $S$ be rings.
A homomorphism is a map $f:R\to S$ satisfying
$f(a+b)=f(a)+f(b)$ for all $a, b \in R$, and
$f(ab)=f(a)f(b)$ for all $a, b \in R$.
A […]

$(x^3-y^2)$ is a Prime Ideal in the Ring $R[x, y]$, $R$ is an Integral Domain.
Let $R$ be an integral domain. Then prove that the ideal $(x^3-y^2)$ is a prime ideal in the ring $R[x, y]$.
Proof.
Consider the ring $R[t]$, where $t$ is a variable. Since $R$ is an integral domain, so is $R[t]$.
Define the function $\Psi:R[x,y] \to R[t]$ sending […]

The Inverse Image of an Ideal by a Ring Homomorphism is an Ideal
Let $f:R\to R'$ be a ring homomorphism. Let $I'$ be an ideal of $R'$ and let $I=f^{-1}(I)$ be the preimage of $I$ by $f$. Prove that $I$ is an ideal of the ring $R$.
Proof.
To prove $I=f^{-1}(I')$ is an ideal of $R$, we need to check the following two […]

n is not defined in R, how can you say f(n)=n?

Dear SANJAY SINGHA,

Thank you for your comment. Here, $n$ actually means $n\cdot 1_R$, where $1_R$ is the unit element in $R$. I wasn’t clear so I added a comment.