Why is $\operatorname{Hom}(M,N)$ not necessarily an $R$ module?

Let $R$ be a ring, and $M,N$ be left $R$-modules. Then is it not true that $\operatorname{Hom}_R(M,N)$ has the structure of an $R$-module?

I was reading the preface of the Homological Algebra book by Rotman and was quite surprised to learn that this is not the case. I think all the axioms for being a module are satisfied by $\operatorname{Hom}_R(M,N)$, but Rotman is very unlikely to make a mistake. What is it that I am missing?

Under what circumstances is this true?


This is true if $R$ is commutative.

Otherwise, say that you are dealing with left $R$-modules, for instance. If you attempt to define multiplication by $r$ by $(rh)(m) = rh(m)$ for any homomorphism $h \colon M \to N$, then you run into the problem that the mapping $rh$ may not be $R$-linear.

For example, let $h \colon R \to R$ be the identity map. Then $k(s) = (rh)(s)$ would be $rs$. But in general, $k(s1) = rs \neq sr = sk(1)$.


Presumably, you'll want to define $\psi=r.\phi$ by $$\psi(m)=r.\phi(m)$$ (where $r\in R, \phi\in\mathrm{Hom}_R(M,N)$ and $m\in M$.) However, this map, which is a morphism of abelian groups, need not be $R$-linear when $R$ isn't commutative : $R$-linearity would imply that for all $r'\in R$ (and all $m\in M$) $\psi(r'.m)=r'.\psi(m)$, i.e., by $R$-linearity of $\phi$, $$rr'.\phi(m)=r'r.\phi(m)$$ Since $rr'\neq r'r$ in general, there is no reason the above identity should hold.