Show that End(M) for cyclic R-module M is a commutative ring where R is a PID.
So I know the module M is an abelian group so by a previous result, End(M) is a ring under pointwise addition and function composition.
What remains to show is that the function composition is commutative. To that end, let $\phi, \alpha \in End(M)$. We want to show the ring End(M) is commutative so we must show $\phi(\alpha(m)) = \alpha(\phi(m)), \forall m \in M$.
We are given M is a cyclic R-module (R is a PID) so $M = Rx$ for some $x \in M$. Then for any $m \in M$ we have that $ m = rx$ for some $r \in R$.
Then, $\phi(\alpha(m)) = \phi(\alpha(rx)) = \phi(r\alpha(x)) = r\phi(\alpha(x))$
Likewise, $\alpha(\phi(m)) = r\alpha(\phi(x))$
So, we just need to show $\alpha(\phi(x)) = \phi(\alpha(x))$ but I'm not sure what to do from here? Any hints?
Notice $\phi(x)=r_\phi x$ for some $r_\phi\in R$, since $\phi(x)\in M=Rx$; similarly $\alpha(x)=r_\alpha x$ for some $r_\alpha\in R$. Then we can calculate $$\alpha(\phi(x))=\alpha(r_\phi x)=r_\phi\,\alpha(x)=r_\phi(r_\alpha x)=r_\alpha(r_\phi x)=r_\alpha\,\phi(x)=\phi(r_\alpha x)=\phi(\alpha(x))$$