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.