TITLE: Does a homomorphism from a unital ring to an integral domain force a multiplicative identity?
QUESTION [10 upvotes]: This is a question in Herstein's Topics in Algebra ("unit element" refers to multiplicative identity):
If $R$ is a ring with unit element $1$, and $\phi$ is a homomorphism of $R$ into an integral domain $R'$ such that $\ker\phi\ne R$, prove that $\phi(1)$ is the unit element of $R'$.
Now, Herstein does not require that integral domains have a unit element. It seems like the question is suggesting that the existence of such a homomorphism forces $R'$ to have a unit element. Of course, if $R'$ is assumed to have a unit element then the proof is trivial.
I am having trouble finding a proof or a counterxample for the first interpretation. I'm even having trouble thinking of integral domains without unit elements.

REPLY [10 votes]: This solution is based on the hint given by Johannes Kloos in the comments above.

Let $R$ be a unital ring, with unit element $1_R$, and let $R'$ be an integral domain (which is not a priori assumed to be unital). Suppose we have a nonzero homomorphism of (nonunital) rings $\phi:R\to R'$. We want to prove that $R'$ is actually unital, with unit element $\phi(1_R)$.
First, we have the following equality:
$$\phi(1_R)=\phi(1_R1_R)=\phi(1_R)\phi(1_R).$$
Hence, we see that $\phi(1_R)$ is an idempotent of $R'$. Now, since $\phi$ is nonzero, $\phi(1_R)\neq 0$. Therefore, for any element $x\in R'$, we have
$$\phi(1_R)x=(\phi(1_R))^2x \Longrightarrow x=\phi(1_R)x,$$
and similarly, we have $x=x\phi(1_R)$. Therefore, we conclude that $\phi(1_R)$ is a unit element of the ring $R'$.

REPLY [3 votes]: Now here is my go:
Let $r' \in R$ be a fixed but arbitrary element of $R'$. Let $r \in R \setminus \ker \phi$. 
$$\begin{align}\phi(r)r'&=\phi(r)\phi(1)r'\\r'&\overset{\dagger}{=}\phi(1)r' \tag{1}\end{align}$$
Note that $\dagger$  follows from the fact that $\phi(r) \neq 0$ and that $R'$ is an integral domain. Note that, cancellation law holds for non-zero elements in an integral domain. Further, since by definition, an integral domain is a commutative ring, $(1)$ gives us that, $$r'=r'\phi(1) \tag{2}$$  
Now $(1)$ and $(2)$ force that $\phi(1)$ is the unit element in $R'$ from the definition of unit element.

Thanks are due to Prof. Marc van  Leeuwen whose relevant observations made the solution nicer and shorter. (See Comments below.)