Ring homomorphism with $\phi(1_R) \neq1_S$

Let $R$ and $S$ be rings with unity $1_R$ and $1_S$ respectively. Let $\phi\colon R\to S$ be a ring homomorphism. Give an example of a non-zero $\phi$ such that $\phi(1_R)\neq 1_S$

In trying to find a non-zero $\phi$ I've done the following observation:
Since for $\forall r\in R$ $\phi(r) = \phi(r\times1_R) = \phi(r)\times\phi(1_R)$ we must have that $\phi(1_R)$ is an identity of $\phi(R)$ but not an identity of $S$. We must therefor construct a $\phi$ that is not onto and which have this property. I can't come up with any explicit example though, please help me.

2 Answers

Let $R$ be any ring and $S=R\times R$. Then the inclusion map $r\mapsto (r,0)$ gives you such a homomorphism. (Note that some authors require that $\phi(1_r)=1_S$ for $\phi$ to be a homomorphism).

Since for any homomorphism $\phi$, $$\phi(1_R) = \phi(1_R \cdot 1_R) = \phi(1_R)\phi(1_R),$$ any homomorphism must map $1_R$ to an idempotent element of $S$. If you map to an idempotent element other than $1_S$, the image of $\phi$ will be a subring $S'$ of $S$ and you will find that whatever element you mapped $\phi(1_R)$ to will end up being $1_{S'}$.

Note that not every idempotent element of $S$ is a valid candidate. Some concrete examples:

Valid:

Let $R = \mathbb{Z}/6\mathbb{Z}$ and $S = \mathbb{Z}/15\mathbb{Z}$. If we defined $\phi(1_R) = 10_S$, which is idempotent in $S$, we have defined a valid homomorphism.

Invalid:

Let $R = \mathbb{Z}/6\mathbb{Z}$ and $S = \mathbb{Z}/15\mathbb{Z}$. If we define $\phi(1_R) = 6_S$, both idempotent in $S$, the mapping is not well defined. For example, $$\phi(0_R) = \phi(6_R)$$ since $R \cong Z_6$, but $$\phi(6_R) = 6_S \neq 0_S = \phi(0_R).$$ Thus, such a mapping is not well defined.

A similar problem occurs if we define $\phi(1_R) = 1_S$. Thus when we only consider homomorphisms which map the identity of the domain to the identity of the codomain, we find the following theorem.

Theorem: A homomorphism $\phi: \mathbb{Z}/m\mathbb{Z} \rightarrow \mathbb{Z}/n\mathbb{Z}$ exists only if $n$ divides $m$.