An exercise from Hungerford's Algebra.
Let $\mathbb Q$ be the field of rational numbers and $R$ any ring. If $f,g:\mathbb Q\rightarrow R$ are homomorphims of rings such that $f=g$ on $\mathbb Z$, then $f=g$ on $\mathbb Q$.
The hint given by author asks me to show $f(1/n)g(n)=g(1)$, which is easy to check, and hence $f(1/n)=g(1/n)$, where I get stuck because I think $nf(1/n)=ng(1/n)$ may not imply $f(1/n)=g(1/n)$ since $R$ can have character $\neq0$.
Can anyone help me to figure it out?