# Does an $R$-module structure on $S$ induce a ring homomorphism $f:R\to S$?

Let $R$ and $S$ be commutative unital rings. If there's a ring homomorphism $f:R\to S$, then $S$ has an $R$-module structure with action $r\cdot s=f(r)s$. Now suppose I know that $S$ is an $R$-module. Let $f:R\to S$ be defined by $f(r)=r\cdot 1_S$. Is $f(r)$ a ring homomorphism?

What could go wrong? Well, by definition $$f(1_R)=1_R\cdot 1_S=1_S,$$ $$f(a-b)=(a-b)\cdot 1_S=a\cdot 1_S-b\cdot 1_S=f(a)-f(b),$$ and $$f(0_R)=f(0_R+0_R)=(0_R+0_R)\cdot 1_S=0_R\cdot 1_S+0_R\cdot 1_S=f(0_R)+f(0_R)$$ so $f(0_R)=0_S$. So what can go wrong is if $$f(a)f(b)=(a\cdot 1_S)f(b)\overset{!}{\neq} a\cdot(1_S f(b))=a\cdot f(b)=a\cdot(b\cdot 1_S)=(ab)\cdot 1_S=f(ab)$$

So this all comes down to if $(a\cdot 1_S)y=a\cdot(1_S y)$ with $a\in R$, $y\in f(R)$.

What's an example where $S$ and $R$ are commutative unital rings, $S$ is an $R$-module, but $f$ above is not a ring homomorphism?

• am I wrong, or is it just associativity that you are questioning in your last paragraph? which holds of course in any ring – Simonsays May 14 '18 at 19:37
• $a\cdot 1_S$ is the action of $a\in R$ on $1_S$ and $1_Sy$ is just multiplication in $S$. So these are two different operations. Why is associativity automatic? – user2154420 May 14 '18 at 19:40

The condition you need is precisly that $S$ is an $R$-algebra (and not just an $R$-module) meaning that multiplication in $S$ is $R$-bilinear.
The multiplication of $S$ has a priori nothing to do with the module structure.
For example, take $S = R = \mathbb Z[X]$ as sets. Give $R$ the standard ring structure. Give $S$ the standard addition and let the $R$-module structure be the standard multiplication.
For the multiplication on $S$, we can do something crazy, pull back the standard multiplication on $\mathbb Z[X]$ by a nontrivial group automorphism $\phi$ of $(\mathbb Z[X], +)$ e.g. swapping the constant coefficient with the degree $1$ coefficient. I.e. define $a*b = \phi^{-1}(\phi(a) \phi(b))$.
Then $(S, +, *)$ is a ring (isomorphic to $\mathbb Z[X]$ via $\phi$). The addition has not changed so it is still an $R$-module. But we no longer have $r (s*t) = (rs)*t$ for $r \in R, s,t \in S$! Indeed: $$X(X*X^2) = X^3 \neq X^4 = (XX)*X^2$$ ($X$ is the unity of $S$)