Let $R,R'$ be unital rings. Let $\phi:R\rightarrow R'$ be a homomorphism such that $1_{R'}\in{\sf im}\phi$. Does this suffice to say $\phi(1_R)=1_{R'}$? Or does there exist any counterexample?
PS: Here by a ring homomorphism I mean a map $\phi:R\rightarrow R'$ that preserves addition and multiplication, that is,
- $\phi(a+b)=\phi(a)+\phi(b)\quad\forall a,b\in R$
- $\phi(ab)=\phi(a)\phi(b)\quad\forall a,b\in R$
Yes: if $1_{R'}=\phi(r)$, just observe that $$1_{R'}=\phi(r)=\phi(r1_R)=\phi(r)\phi(1_R)=1_{R'}\phi(1_R)=\phi(1_R).$$
More conceptually, what is going on here is that $\phi(1_R)$ and $1_{R'}$ both must be identity elements for the image of $\phi$, but the identity element of a ring is unique (if it exists).