Let ${\rm Hom}(\mathbb{Z}_n,\mathbb{Z}_m)$ be the set of all ring homomorphisms. I am not assuming $f(1) = 1$. My question is,
Is it possible to give an abelian group structure in this set?
I know this is true for group homomorphism as the co-domain is an abelian group. But, in the case of ring homomorphisms, $f+g$ need not satisfy the ring homomorphism conditions. What is the natural operation that makes ${\rm Hom}(\mathbb{Z}_n,\mathbb{Z}_m)$ into an abelian group?
I am trying to prove the following equation on pg no. 259 in this paper: https://fada.birzeit.edu/bitstream/20.500.11889/4045/1/homo-monthly.pdf
Kindly share your thoughts. Thank you.

To give a (not necessarily unital) ring homomorphism from $\mathbb{Z}_n$ to $\mathbb{Z}_m$ is the same as giving an idempotent in $\mathbb{Z}_m$ whose order divides $n$. Now, it is well known that the idempotents in any unital commutative ring form a Boolean ring, with the same multiplication and the "sum" of $e$ and $f$ being $e+f-2ef$. Also, it is easily seen that if $e$ and $f$ have order diving $n$, then so does $e+f-2ef$. Finally, with this addition, the identity element is still zero and every element is its own inverse. Hence, there is an isomorphic abelian group structure on the set of ring homomorphisms from $\mathbb{Z}_n$ to $\mathbb{Z}_m$ with $(f +' g)(k)=k[f(1)+g(1)-2f(1)g(1)]$ (using the prime mark to avoid confusion with the pointwise sum).