Is the endomorphism ring of a module over a non-commutative ring always non-commutative?

So, am I correct to think that in this case $End M$ is a noncommutative ring because $A$ is not commutative?

No, not necessarily. There isn’t a connection.

You can have $End(M)$ noncommutative and $A$ commutative ($A=\mathbb Z$ and $M=C_2\times C_2$)

You can also have $A$ noncommutative and $End(M)$ commutative (for this you can take a ring $A$ which isn’t commutative, but which has a unique maximal right ideal $I$ such that $A/I$ is commutative, and let $M=A/I$.)


It is true that $f \mapsto \mu_f$ defines a ring homomorphism $$\begin{align*}\mu : A &\to \operatorname{End}_{\mathbb Z}(M) \\ f & \mapsto \mu_f \end{align*}$$ Thus when $A$ is noncommutative and $\mu$ is injective, $\operatorname{End}_{\mathbb Z}(M)$ is noncommutative. The point is that $\mu$ is not necessarily injective.

The module $M$ is called "faithful" when $\mu$ is injective. So, a priori, there could exist examples of non-faithful modules over noncommutative rings with commutative endomorphism ring.

A silly example is the following: take any ring $A'$ and an $A'$-module $M'$ with commutative endomorphism ring. Take any noncommutative ring $B$. Define $A = A' \times B$ and define the $A$-module structure on $M$ by restricting scalars through the projection $A' \times B \to A'$. Then $A$ is noncommutative, even though $\operatorname{End}_{\mathbb Z}(M)$ is commutative.

Concretely, take e.g. $A = \mathbb Z \times M_2(\mathbb Z)$ and $M = \mathbb Z$, where $(a, b) \in A$ acts on $n \in M$ by $(a, b)n = an$. Then $\operatorname{End}_{\mathbb Z}(M) \cong \mathbb Z$ is commutative.


Conversely, for modules with noncommutative endomorphism rings over commutative rings: There are examples which you've certainly encountered before: let $k$ be a field, and $M$ an $n$-dimensional $k$-vector space. The endomorphism ring $\operatorname{End}_{\mathbb Z}(M)$ contains the ring $\operatorname{End}_{k}(M) \cong M_n(k)$. So if $\operatorname{End}_{\mathbb Z}(M)$ is commutative, so is the subring $M_n(k)$. However, the latter is not commutative for $n > 1$.

Thus $\operatorname{End}_{\mathbb Z}(M)$ is not commutative for $n > 1$, even though $k$ is commutative.