We now define an analogue of vector spaces over a ring.

Definition 4.2.1

Fix a commutative ring $R$. A module over $R$, or an $R$-module is a set $M$ with the choice of an element $0 \in M$ and two maps $+ : M \times M \to M$ and $\cdot : R \times M \to M$ satisfying the following conditions:

  1. (M1)

    For all $x \in M$ we have $x + 0 = 0 + x = x$.

  2. (M2)

    For all $x, y \in M$ we have $x + y = y + x$.

  3. (M3)

    For all $x, y, z \in M$ we have $(x + y) + z = x + (y + z)$.

  4. (M4)

    For all $x \in M$ there exists an $(-x) \in M$ such that $x + (-x) = (-x) + x = 0$.

  5. (M5)

    For all $x \in M$ we have $0 \cdot x = 0$ and $1 \cdot x = x$.

  6. (M6)

    For all $x \in M$ and $a, b \in R$ we have $(a \cdot b) \cdot x = a \cdot (b \cdot x)$.

  7. (M7)

    For all $x \in M$ and $a, b \in R$ we have $(a + b) \cdot x = a \cdot x + b \cdot x$.

  8. (M8)

    For all $x, y \in M$ and $a \in R$ we have $a \cdot (x + y) = a \cdot x + a \cdot y$.

Note that the axioms for modules look exactly the same as the axioms for vector spaces. The only difference is that we are working over a commutative ring $R$ instead of a field $k$. Because a field $k$ is also a ring, we may call a $k$-vector space a $k$-module instead.

Example 4.2.2

Take $R = \mathbb{Z}$. What are $\mathbb{Z}$-modules? If $M$ has a structure of addition $+ : M \times M \to M$ satisfying (M1)–(M4), this is already a $\mathbb{Z}$-module. This is because for $x \in M$ and $n > 0$ an integer, we can recover multiplication as

$$ n x = \overbrace{x + x + \cdots + x}^{n}. $$

Then we can define $(-n) x = - (nx)$.

So anything with addition is a $\mathbb{Z}$-module.

  • $\mathbb{Z}^n$ is a $\mathbb{Z}$-module under the usual addition

    $$ (a_1, \ldots, a_n) + (b_1, \ldots, b_n) = (a_1 + b_1, \ldots, a_n + b_n). $$

    Then scalar multiplication will be

    $$ m (a_1, \ldots, a_n) = (m a_1, \ldots, m a_n). $$

  • $\mathbb{Z}/n\mathbb{Z}$ is also a $\mathbb{Z}$-module, with addition modulo $n$. Scalar multiplication will then be described as

    $$ a \cdot b = (ab \text{ modulo } n) \in \mathbb{Z}/n\mathbb{Z} $$

    for $a \in \mathbb{Z}$ and $b \in \mathbb{Z}/n\mathbb{Z}$.

In a module, it is not unusual that $ax = 0$ for $a \neq 0$ and $x \neq 0$. For $M = \mathbb{Z}/n\mathbb{Z}$ over $R = \mathbb{Z}$, we have

$$ n \cdot 1 = 0 \in \mathbb{Z}/n\mathbb{Z} $$

while both $n \in \mathbb{Z}$ and $1 \in \mathbb{Z}/n\mathbb{Z}$ are nonzero. Here is one more example.

  • Take $R = \mathbb{Z}[i]$, and take $M = \mathbb{Z}/13\mathbb{Z}$. If we define addition on $M$ normally, and scalar multiplication as

    $$ (a + bi) x = (ax + 5bx \bmod{13}), $$

    then $M$ is an $R$-module. This is because $5^2 \equiv -1 \bmod{13}$. Here, we have $(5-i) \cdot 1 = 0$.

Definition 4.2.3

Let $M$ and $N$ be $R$-modules. A map $f : M \to N$ is called $R$-linear or a $R$-module homomorphism if it satisfies

  1. (L0)

    $f(0) = 0$,

  2. (L1)

    $f(x + y) = f(x) + f(y)$ for all $x, y \in M$,

  3. (L2)

    $f(ax) = a f(x)$ for all $a \in R$ and $x \in M$.

Exercise 4.2.A

Check that the identity map $\id_M : M \to M$ is always $R$-linear. Also, check that the composition $g \circ f$ of two $R$-linear maps $f : M_1 \to M_2$ and $g : M_2 \to M_3$ is $R$-linear.

When we work with modules, we always need to be careful about multiplying nonzero elements to get zero. But other than this, most of the construction we have discussed in Chapter 2 works fine.

Definition 4.2.4

For as set $S$, we define the free module as

$$ R^{\oplus S} = \lbrace (f : S \to R) : f(s) \neq 0 \text{ only for finitely many } s \rbrace . $$

(Compare with Definition 2.4.2.)

Exercise 4.2.B

There is a natural inclusion map $\iota : S \to R^{\oplus S}$ of sets. Prove the universal property for free modules. That is, if $f : S \to M$ is any set map, show that there exists a unique $R$-linear map $\tilde{f} : R^{\oplus S} \to M$ that extends $f$, i.e., satisfies $f = \tilde{f} \circ \iota$.

Factorization diagram expressing the universal property of a quotient module.

M maps to P by f and projects to M modulo N by pi. A unique dashed map g from the quotient to P makes the triangle commute.

(Compare with Proposition 2.4.3.)

Definition 4.2.5

Let $\lbrace M_i\rbrace _{i \in I}$ be a set of vector spaces, where $I$ is an indexing set. Define their product as

$$ \prod_{i \in I}^{} M_i = \lbrace (x_i)_{i \in I} : x_i \in M_i \rbrace . $$

Similarly, define their direct sum as

$$ \bigoplus_{i \in I} M_i = \lbrace (x_i)_{i \in I} : x_i \in M_i, x_i \neq 0 \text{ only for finitely many } i \in I \rbrace . $$

Exercise 4.2.C

Verify the universal properties for products and for direct sums. (See Proposition 2.4.3 and Proposition 2.4.8.)

Definition 4.2.6

Let $M$ be an $R$-module. Suppose that a subset $N \subseteq M$ satisfies

  1. (SM1)

    $0 \in N$,

  2. (SM2)

    $x_1, x_2 \in N$ implies $x_1 + x_2 \in N$,

  3. (SM3)

    $x \in N$ and $a \in R$ implies $ax \in N$.

In this case, $N$ inherits an $R$-module structure from $M$, and we call $N$ a submodule of $M$.

Exercise 4.2.D

Check that a submodule of $R$ (considered as an $R$-module) is the same thing as an ideal of $R$.

Definition 4.2.7

For $N \subseteq M$ a submodule, we define the quotient as

$$ M / N = M / (x \sim x + y \text{ for } y \in N). $$

The module structure here is defined as $[x] + [y] = [x+y]$ and $a[x] = [ax]$.

Exercise 4.2.E

Check that the quotient module is well-defined, and is indeed a module.

So for instance, if $\mathfrak{a} \subseteq R$ is an ideal, the quotient $R / \mathfrak{a}$ is an $R$-module while it is also a commutative ring itself.

Exercise 4.2.F

State and prove the universal property for quotients, which is going to be the direct analogue of Exercise 2.5.H.

Definition 4.2.8

For an $R$-linear map $f : M \to N$, we define their kernel, image, cokernel as

$$ \begin{aligned} \ker(f) &= \lbrace x \in M : f(x) = 0 \rbrace \subseteq M, \\ \im(f) &= \lbrace f(x) \in N : x \in M \rbrace \subseteq N, \\ \coker(f) &= N / \im(f). \end{aligned} $$

Exercise 4.2.G

Prove the first isomorphism theorem for modules: if $f : M \to N$ is an $R$-linear map, there exists a canonical isomorphism $M / \ker(f) \cong \im(f)$.

Exercise 4.2.H

State and prove the universal properties of the kernel and the cokernel. (See Exercise 2.6.E and Exercise 2.6.F.)

Definition 4.2.9

For $M$ and $N$ two $R$-modules, define

$$ \Hom_R(M, N) = \lbrace R\text{-linear maps } f : M \to N \rbrace $$

as an $R$-module, with addition and scalar multiplication defined as

$$ (f + g)(x) = f(x) + g(x), \quad (af)(x) = a f(x). $$

Exercise 4.2.I

Show that $\Hom_R(R, M) \cong M$ canonically, for all $R$-modules $M$.

Exercise 4.2.J

Show that an $R$-linear map $f : M_1 \to M_2$ naturally induces $R$-linear maps $f_\ast : \Hom_R(N, M_1) \to \Hom_R(N, M_2)$ and $f^\ast : \Hom_R(M_2, N) \to \Hom_R(M_1, N)$.

In fact, everything in Sections 2.4, 2.5, and 2.6 can be done in the context of modules. If you are bored, you can always pick an arbitrary exercise in these three sections and redo it in the context of modules.