The quote above pretty much says it all. Have you ever wondered what would happen if you had a vector space $V$, but instead of the scalars coming from a field they came more generally from a ring^{[1]}? If so, you just stumbled upon the definition of a module.

Definition of module

Let $R$ be a ring. A left $R$-module (or left module over $R$) is an abelian group $M$ together with a left action of $R$ on $M$ that satisfies the following compatibility conditions:

$(r+s)m=rm+sm$ for all $r,s\xe2\x88\x88R$ and $m\xe2\x88\x88M$

$(rs)m=r(sm)$ for all $r,s\xe2\x88\x88R$ and $m\xe2\x88\x88M$

$r(m+n)=rm+rn$ for all $r\xe2\x88\x88R$ and $m,n\xe2\x88\x88M$

$1m=m$ for all $m\xe2\x88\x88M$

Analogously, a right $R$-module (or right module over $R$) is an abelian group $M$ together with a right action of $R$ on $M$ that satisfies the following compatibility conditions:

$m(r+s)=mr+ms$ for all $r,s\xe2\x88\x88R$ and $m\xe2\x88\x88M$

$m(rs)=(mr)s$ for all $r,s\xe2\x88\x88R$ and $m\xe2\x88\x88M$

$(m+n)r=mr+nr$ for all $r\xe2\x88\x88R$ and $m,n\xe2\x88\x88M$

$m1=m$ for all $m\xe2\x88\x88M$

You could reasonably complain about the the use of the word "action" in the above definition, since it hasn't been defined here and you possibly only encountered it previously in the context of a group acting on a set. However, it is being used here very much in the same spirit as in group theory, in that it is a set map $R\xc3\x97M\xe2\x86\x92M$ that satisfies the expected compatibility conditions between the algebraic structures on $R$ and $M$ (detailed explicitly above). With a bit more category theory under our belts, we could reasonably consider defining the general notion of an action of an object of one category on an object of another. Something to keep in the back of our minds...

Modules over commutative rings

Consider the case of a commutative ring $R$ and suppose $M$ is a left $R$-module. For clarity, denote the left action of a ring element $r$ on a module element $m$ by $r\xe2\x8b\x85m$. Now define a right action of $R$ on $M$ by setting $m\xe2\x8b\x86r=r\xe2\x8b\x85m$. You can quickly check that this does indeed define a right $R$-action on $M$, giving (the underlying abelian group of $M$) the structure of a right $R$-module. The only property that requires the commutativity of $R$ is the "associativity" of the action. Indeed, on the one hand we have

Thus, we need the original left $R$-action on $M$ to satisfy $(rs)\xe2\x8b\x85m=(sr)\xe2\x8b\x85m$ for every $r,s\xe2\x88\x88R$ and $m\xe2\x88\x88M$. Fortunately this is true when $R$ is assumed to be commutative.^{[2]}

Modules over commutative rings

When $R$ is a commutative ring, there is no real distinction between left and right $R$-modules. So, we simply refer to both as $R$-modules.

For a general (possibly noncommutative) ring, the phrase "$R$-module" is usually meant to mean "left $R$-module."

A small note about the action of zero

It will be occasionally useful to have the following simple result:

Zero acts as zero

If $M$ is an $R$-module, then ${0}_{R}\xe2\x8b\x85m={0}_{M}$ for every $m\xe2\x88\x88M$ and $r\xe2\x8b\x85{0}_{M}={0}_{M}$ for every $r\xe2\x88\x88R$.

Here's a quick proof, directly analogous to the similar statement for vector spaces (a special case of modules!). For any $m\xe2\x88\x88M$ we have ${0}_{R}\xe2\x8b\x85m=({0}_{R}+{0}_{R})m={0}_{R}\xe2\x8b\x85m+{0}_{R}\xe2\x8b\x85m$. By additive cancellation (in the abelian group $M$) we then have ${0}_{M}={0}_{R}\xe2\x8b\x85m$. Similarly, $r\xe2\x8b\x85{0}_{M}=r({0}_{M}+{0}_{M})=r\xe2\x8b\x85{0}_{M}+r\xe2\x8b\x85{0}_{M}$, and additive cancellation once again gives ${0}_{M}=r\xe2\x8b\x85{0}_{M}$.

Examples

Given the common quote about modules, our first example of a module really must be:

Vector Spaces

If $R=F$ is a field then $F$-modules are exactly the same as $F$-vector spaces. What do we really mean when we say "are exactly the same as"? In this case we mean "literally the same, up to naming conventions". An $F$-vector space is usually defined to be a set $V$ together with a binary operation $V\xc3\x97V\xe2\x86\x92V$ and a map $F\xc3\x97V\xe2\x86\x92V$ satisfying a list of conditions. The first of those conditions are exactly the conditions for $V$ to be an abelian group; the rest are the same as our conditions for $V$ to be an $F$-module. So the only differences are that we call $V$ an $F$-vector space (instead of an $F$-module) and call $F$ the field of scalars (instead of simply the ring acting on $V$).

Summary

Modules over fields are vector spaces

Rings as modules

Every ring $R$ is a left $R$-module, using the action of left multiplication on itself. In this context, the submodules of $R$ (when considered as a left $R$-module) are exactly the left ideals of $R$ (when considered as a ring).

Once again, we should ask what we mean when we say "are exactly the left ideals." Here we mean that there is a bijection between the set of left ideals of the ring $R$ and the set of submodules of $R$.

In theory, one could consider $R$-module structures on $R$ defined by other (left) actions of $R$ on itself, but in practice I have never seen that done. Perhaps it is because of the notational issues, as you would need to be very careful to distinguish between when the operation is the internal multiplication of the ring, as opposed to the ring action; perhaps one could write $rs$ for the former and $r\xe2\x88\x99s$ for the latter? If I come across a discussion or example of this in action (pun intended), I'll be sure to link it here.

Summary

Rings are modules over themselves.

Abelian groups are $\mathbf{Z}$-modules

It is simple to show that $\mathbf{Z}$-modules are "exactly the same" as abelian groups.

Summary

Abelian groups are the same as $\mathbf{Z}$-modules.

Same group, different modules

For example, the field $\mathbf{R}$ can be viewed as $\mathbf{R}$-module, a $\mathbf{Q}$-module, or a $\mathbf{Z}$-module. (As usual, what we really mean is that the abelian group consisting of the real numbers under addition can have the structure of a module over various rings.)

A given abelian group can even have different module structures for the same ring, $R$. Being specific about the type of module (i.e., the ring doing the acting) can be important when talking about module morphisms.

Summary

A given abelian group $M$ can have many different module structures.

Vector spaces with linear endomorphisms

Suppose $F$ is a field. If $V$ is an $F$-vector space and $T:V\xe2\x86\x92V$ is a linear transformation, then we can define an $F[x]$-module structure on $V$ by $p(x)v=p(T)v$ for every $p(x)\xe2\x88\x88F[x]$ and $v\xe2\x88\x88V$. It is straightforward to show the converse is also true, and that we have a bijection between the collection of $F[x]$-modules and pairs $(V,T)$ of $F$-vector spaces with linear endomorphisms. One can then also show that under this bijection the $F[x]$-submodules correspond to $T$-stable subspaces. We'll explore this more fully later.

Summary

$F[x]$-modules are $F$-vector spaces together with a fixed linear endomorphism.

Passing to quotient rings

Suppose $M$ is an $R$-module and $I\xe2\x8a\x86R$ is a two-sided ideal of $R$. Suppose $I$annihilates$M$, i.e., $im=0$ for all $i\xe2\x88\x88I$ and $m\xe2\x88\x88M$. Then we can define an $R/I$-module structure on $M$ in the obvious way: $(r+I)m=rm$ for $r\xe2\x88\x88R$ and $m\xe2\x88\x88M$.

For example, if $M$ is a finite abelian group of order $n$, then $nm=0$ for every $m\xe2\x88\x88M$, i.e., the ideal $(n)\xe2\x8a\x86\mathbf{Z}$annihilates$M$. We can therefore also view $M$ as a $\mathbf{Z}/n\mathbf{Z}$-module.

The zero module

For every ring $R$, the trivial group $\{0\}$ is also an $R$-module (with trivial action of $R$). This module is often denoted simply $0$. It is the zero object in the category of left $R$-modules, i.e., it is both an initial and a terminal object in the category. For each $R$-module $M$, there is both a unique module morphism $0\xe2\x86\x92M$ (sending the element $0$ to ${0}_{M}$) and a unique module morphism $M\xe2\x86\x920$ (sending every element $m\xe2\x88\x88M$ to $0$). A module morphism $f:M\xe2\x86\x92N$ is trivial (i.e., $f(m)={0}_{N}$ for all $m\xe2\x88\x88M$) exactly when it factors through the 0 module.