TITLE: Why is $\operatorname{Hom}(M,N)$ not necessarily an $R$ module?
QUESTION [22 upvotes]: 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?

REPLY [4 votes]: What action of the ring $R$ do you expect on $\operatorname{Hom}_R(M, N)$?  The left action of $R$ on $M$ and $N$ is "used up" when you consider $R$-linear homomorphisms
$$
\operatorname{Hom}_R(M, N) \subseteq \operatorname{Hom}_{\Bbb{Z}}(M, N).
$$
If $M$ is in fact an $(R, R)$-bimodule (this is automatic if $R$ is commutative), then the right action of $R$ on $M$ yields a left action of $R$ on $\operatorname{Hom}_R(M, N)$ via
$$
(rf)(m) = f(mr).
$$
On the other hand, if $N$ is an $(R, R)$-bimodule, then the right action of $R$ on $N$ yields a right action of $R$ on $\operatorname{Hom}_R(M, N)$ via
$$
(fr)(m) = f(m)r.
$$
Of course, if both $M$ and $N$ are bimodules, then $\operatorname{Hom}_R(M, N) $ is a bimodule, as well.