Homomorphisms from a unital ring to a ring with no zero divisors preserve unity?

I'm having a bit of trouble with a problem from Hungerford's Algebra concerning ring homomorphisms.

Let $f\colon 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)$.

I've worked out a bit of an argument. Take $r$ to be as in the problem, so $$ f(r)=f(1_R)f(r)=f(r)f(1_R)\implies f(r)-f(1_R)f(r)=0_S. $$ This shows that $f(1_R)$ is the identity of $f(R)$, but I'm not sure if that's much use. However, if $1_S$ exists, then from $f(r)-f(1_R)f(r)=1_Sf(r)-f(1_R)f(r)=0_S$ and the distributive law, I would have $$ \bigl(1_S-f(1_R)\bigr)f(r)=0_S\implies 1_S=f(1_R) $$ since $S$ has no zero divisors, and $f(r)\neq 0_S$. But I don't see a way to prove $1_S$ exists, so if it's no bother, I'm hoping to get a hint on how to show that, or perhaps a prod in the right direction if I'm off track. Thank you.


Solution 1:

Hint: If $s$ is in $S$, then $f(1_R)s=f(1_R)^2s$.


I left the above brief hint based on the request at the end of your question, not wanting to "give too much away," but now I'm happy to elaborate a bit.

You want to show that $f(1_R)$ is an identity for $S$. As you mentioned in a comment, it follows from the fact that $f$ is a homomorphism that $f(1_R)=f(1_R)^2$. You also know that $f(1_R)\neq 0$, because $f(1_R)f(r)=f(r)\neq 0$, and thus it is tempting to want to "cancel" $f(1_R)$ in the equation of the previous sentence to obtain $1_S=f(1_R)$. But of course, we still have to show that $1_S$ exists. In order to cancel $f(1_R)$, we have to be multiplying it with something, and this motivates multiplying both sides of the equation by some $s\in S$ to obtain the equation at the top of this answer. Now you can do some cancelling.

Solution 2:

Since the answer was not obvious to me immediately, I just want to post an answer so that the question has a full answer.

Putting it together, $f(1_R)s=f(1_R)^2s\implies f(1_R)[s-f(1_R)s]=0_S$. But $f(1_R)\neq 0$ since $f(1_R)f(r)=f(r)\neq 0$, so $s=f(1_R)s$ since $S$ has no zero divisors. Since $sf(1_R)=sf(1_R)^2$ as well, the same argument shows $s=sf(1_R)$, so $f(1_R)=1_S$.

Solution 3:

Consider $x \in S$ and consider $$x \cdot \Bigl[ f(1_{R}) - f(1_{R})^{2}\Bigr]$$