If $R$ has unity $1$, $R'$ has no zero divisors, and $\phi : R \to R'$ is non-zero, is $\phi(1)$ unity for $R'$? Let $R$ and $R^\prime$ be rings such that $R$ has unity $1$ and $R^\prime$ has no zero divisors; let $\phi \colon R \to R^\prime$ be a homomorphism such that $\phi [ R ] \neq \{ 0^\prime\}$, where $0^\prime$ denotes the additive identity of $R^\prime$. How to determine whether $\phi(1)$ is unity for $R^\prime$? Of course, $\phi(1)$ is unity for $\phi[R]$. 
If we assume that $R^\prime$ has unity $1^\prime$, then since $$ \phi(1) \  \phi(1) = \phi(1)$$ and since $$ \phi(1) 1^\prime = \phi(1),$$ we can write $$\phi(1) \  \phi(1) - \phi(1) \ 1^\prime = \phi(1) - \phi(1) = 0^\prime,$$ which we can write as $$\phi(1) \  (\phi(1) - 1^\prime ) = 0^\prime.$$ Since $R^\prime$ is assumed to have no divisors of $0$, we conclude that either $\phi(1) = 0^\prime$ or $\phi(1) = 1^\prime.$ 
Now if $\phi(1)$ were to be equal to $0^\prime$, then we would have $$\phi(r) = \phi(r1) = \phi(r) \ \phi(1) = \phi(r) \ 0^\prime = 0^\prime$$ for all $r$ in $R$, contradicting our hypothesis that $\phi[R] \neq \{ 0^\prime\}$. Hence $\phi(1) = 1^\prime$. 
However, in reaching this proof we have assumed the existence of unity $1^\prime$ for $R^\prime$. This assumption is of course valid for the case of $\phi$ being surjective. 
What if that is not the case? I mean can we show that $R^\prime$ must have unity under the given hypotheses irrespective of whtehre or not $\phi$ is surjective? 
If not, then how to establish the truth or falsity of our original assertion in the general case? 
 A: Suppose $\phi(1)$ is not the multiplicative identity in $R'$. Then there is some $s \in R'$ such that $\phi(1)s \neq s$; set $t = \phi(1)s$. Note that $$\phi(1)t = \phi(1)\phi(1)s = \phi(1\cdot 1)s = \phi(1)s = t.$$ Therefore $\phi(1)t = t = \phi(1)s$, so $\phi(1)(t - s) = 0'$. As $t \neq s$, either $\phi(1) = 0'$ or $R'$ has zero divisors.
Therefore, if $R$ is a ring with multiplicative identity $1$, $R'$ is a ring with no zero divisors, and there is a non-zero ring homomorphism $\phi : R \to R'$, then $R'$ actually has a multiplicative identity, namely $\phi(1)$.
A: This is a corollary of a lemma proven elsewhere on the site that a nonzero idempotent in a ring without non-zero  zero divisors is an identity for the ring.
This follows from the equations $e(er-r)=0$ and $(re-r)e=0$ where r is any element of the ring and e is the nonzero idempotent.
The condition that the map be nonzero guarantees the image of the identity is a nonzero idempotent.
A: Here is my friend DinDin's solution. 
In this answer, zero divisors means two-sided zero divisors.
The original question appears in Hungerford's Algebra (Exercise III.1.16).

Let $f:R\to S$ be a homomorphism of rings such that $f(r)\neq 0$ for some nonzero $r\in R$.
  If $R$ has an identity and $S$ has no zero divisors, 
  then $S$ is a ring with identity $f(1_R)$.

It uses a surprising result:
A ring has a left (or right) zero-divisor if and only if it has a zero divisor.
See Is it true that a ring has no zero divisors iff the right and left cancellation laws hold?
Note that $f(1_R)=f(1_R 1_R)=f(1_R)f(1_R)$
and $f(1_R)\neq 0$.
(For if $f(1_R)=0$,
then $f(r)=f(r1_R)=f(r)f(1_R)=f(r)0=0$,
contrary to the hypothesis.)
Then
\begin{eqnarray*}
f(1_R)s=f(1_R)f(1_R)s &\Rightarrow& f(1_R)(s-f(1_R)s)=0, \\
sf(1_R)=sf(1_R)f(1_R) &\Rightarrow& (s-sf(1_R))f(1_R)=0.
\end{eqnarray*}
By the lemma and the hypothesis, 
$S$ has no left zero divisor and has no right zero divisors, 
it follows that $s-f(1_R)s=0=s-sf(1_R)$
and $s=f(1_R)s=sf(1_R)$.
That is,
$f(1_R)=1_S$.
