# Commutative Algebra/Modules, submodules and homomorphisms
## Basics

Definition 5.1 (modules):
Let $R$ be a ring. A left $R$-module is an Abelian group $M$ together with a function
    $R\times M\to M,(r,m)\mapsto rm$
such that
* $\forall m\in M:1_{R}m=m$,
* $\forall m,n\in M,r\in R:r(m+n)=rm+rn$,
* $\forall m\in M,r,s\in R:(r+s)m=rm+sm$ and
* $\forall m\in M,r,s\in R:r(sm)=(rs)m$.
Analogously, one can define right $R$-modules with an operation $R\times M\to M,(r,m)\mapsto mr$; the difference is only formal, but it will later help us define bimodules in a user-friendly way.
For the sake of brevity, we will often write module instead of left $R$-module.
* Exercise 5.1.1: Prove that every Abelian monoid $(M,+)$ together with an operation as specified in 1.) - 4.) of definition 5.1 is already a module.

## Submodules

Definition 5.2 (submodules):
A subgroup $N\leq M$ which is closed under the module function (i.e. the left multiplication operation defined above) is called a submodule. In this case we write $N\leq M$.
The following lemma gives a criterion for a subset of a module being a submodule.
Lemma 5.3:
A subset $N\subseteq M$ is a submodule iff
    $\forall r\in R,n,q\in N:rn-q\in N$.
Proof:
Let $N$ be a submodule. Then since $-q\in N$ since we have an Abelian group and further $rn\in N$ due to closedness under the module operation, also $rn+(-q)=:rn-q\in N$.
If $N$ is such that $\forall r\in R,n,q\in N:rn-q\in N$, then for any $n,m\in N$ also $n+m=n+(-1_{R})(-m)\in N$.
Definition and theorem 5.4 (factor modules): If $N$ is a submodule of $N$, the factor module by $N$ is defined as the group $M/N$ together with the module operation
    $r(m+N):=rm+N$.
This operation is well-defined and satisfies 1. - 4. from definition 5.1.
Proof:
Well-definedness: If $m+N=p+N$, then $m-p\in N$, hence $r(m-p)=rm-rp\in N$ and thus $rm+N=rp+N$.
* $1_{R}(m+N)=(1_{r}m)+N=m+N$
* $r(n+N+m+N)=r((m+n)+N)=r(m+n)+N=rm+rn+N=rm+N+rn+N$
* $(r+s)(m+N)=(r+s)m+N=rm+sm+N=rm+N+rn+N$
* analogous to 3. (replace $+$ by $\cdot$)$\Box$

### Sum and intersection of submodules

We shall now ask the question: Given a module $M$ and certain submodules $\{N_{\alpha }\}_{\alpha \in A}$, which module is the smallest module containing all the $N_{\alpha }$? And which module is the largest module that is itself contained within all $N_{\alpha }$? The following definitions and theorems answer those questions.
Definition and theorem 5.5 (sum of submodules):
Let $M$ be a module over a certain ring $R$ and let $\{N_{\alpha }\}_{\alpha \in A}$ be submodules of $M$. The set
    $\sum _{\alpha \in A}N_{\alpha }:=\left\{\sum _{l=1}^{k}r_{l}n_{\alpha _{l}}{\big |}k\in \mathbb {N} ,r_{l}\in R,n_{\alpha _{l}}\in N_{\alpha _{l}}\right\}$
is a submodule of $M$, which is the smallest submodule of $M$ that contains all the $N_{\alpha }$. It is called the sum of $\{N_{\alpha }\}_{\alpha \in A}$.
Proof:
1. $\sum _{\alpha \in A}N_{\alpha }$ is a submodule:
* It is an Abelian subgroup since if $\sum _{l=1}^{k}r_{l}n_{\alpha _{l}},\sum _{j=1}^{m}s_{l}n_{\beta _{j}}\in \sum _{\alpha \in A}N_{\alpha }$, then
       $\sum _{l=1}^{k}r_{l}n_{\alpha _{l}}-\sum _{j=1}^{m}s_{l}n_{\beta _{j}}=\sum _{l=1}^{k}r_{l}n_{\alpha _{l}}+\sum _{j=1}^{m}(-s_{l})n_{\beta _{j}}\in \sum _{\alpha \in A}N_{\alpha }$.
* It is closed under the module operation, since
       $s\left(\sum _{l=1}^{k}r_{l}n_{\alpha _{l}}\right)=\sum _{l=1}^{k}(sr_{l})n_{\alpha _{l}}\in \sum _{\alpha \in A}N_{\alpha }$.
2. Each $N_{\alpha }$ is contained in $\sum _{\alpha \in A}N_{\alpha }$:
This follows since $1_{r}n_{\alpha }\in \sum _{\alpha \in A}N_{\alpha }$ for each $\alpha \in A$ and each $n_{\alpha }\in N_{\alpha }$.
3. $\sum _{\alpha \in A}N_{\alpha }$ is the smallest submodule containing all the $N_{\alpha }$: If $K\leq M$ is another such submodule, then $K$ must contain all the elements
    $\sum _{l=1}^{k}r_{l}n_{\alpha _{l}},k\in \mathbb {N} ,r_{l}\in R,n_{\alpha _{l}}\in N_{\alpha _{l}}$
due to closedness under addition and submodule operation.$\Box$
Definition and theorem 5.6 (intersection of submodules):
Let $M$ be a module over a ring $R$, and let $\{N_{\alpha }\}_{\alpha \in A}$ be submodules of $M$. Then the set
    $\bigcap _{\alpha \in A}N_{\alpha }$
is a submodule of $M$, which is the largest submodule of $M$ containing all the $N_{\alpha }$. It is called the intersection of the $N_{\alpha }$.
Proof:
1. It's a submodule: Indeed, if $r\in R,n,p\in \bigcap _{\alpha \in A}N_{\alpha }$, then $n,p\in N_{\alpha }$ for each $\alpha$ and thus $n-rp\in N_{\alpha }$ for each $\alpha$, hence $n-rp\in \bigcap _{\alpha \in A}N_{\alpha }$.
2. It is contained in all $N_{\alpha }$ by definition of the intersection.
3. Any set that contains all elements from each of the $N_{\alpha }$ is contained within the intersection.$\Box$
We have the following rule for computing with intersections and sums:
Theorem 5.7 (modular law; Dedekind):
Let $M$ be a module and $K,L,N\leq M$ such that $L\subseteq K$. Then
    $K\cap (L+N)=L+(K\cap N)$.
Proof:
$\subseteq$: Let $l+n\in (L+N)\cap K$. Since $L\subseteq K$, $l\in K$ and hence $n\in K$. Since also $n\in N$ by assumption, $l+n\in L+K\cap N$.
$\supseteq$: Let $l+m\in L+(K\cap N)$. Since $L\subseteq K$, $l\in K$ and since further $m\in K$, $l+m\in K$. Hence, $l+m\in K\cap (L+N)$.$\Box$
More abstractly, the properties of the sum and intersection of submodules may be theoretically captured in the following way:

### Lattices

Definition 5.8:
A lattice is a set $L$ together with two operations $\vee :L\times L\to L$ (called the join or least upper bound) and $\wedge :L\times L\to L$ (called the meet or greatest lower bound) such that the following laws hold:
* Commutative laws: $a\Box b=b\Box a$, $\Box \in \{\vee ,\wedge \}$
* Idempotency laws: $a\Box a=a$, $\Box \in \{\vee ,\wedge \}$
* Absorption laws: $a\Box (a\triangledown b)=a$, $\{\Box ,\triangledown \}=\{\vee ,\wedge \}$
* Associative laws: $a\Box (b\Box c)=(a\Box b)\Box c$, $\Box \in \{\vee ,\wedge \}$
There are some special types of lattices:
Definition 5.9:
A modular lattice $L$ is a lattice such that the identity
holds.
Theorem 5.10 (ordered sets as lattices):
Let $\leq$ be a partial order on the set $L$ such that
* every set $S\subseteq L$ has a least upper bound (where a least upper bound $u$ of $S$ satisfies $u\geq s$ for all $s\in S$ (i.e. it is an upper bound) and $u\leq x$ for every other upper bound $x$ of $S$) and
* every set $S\subseteq L$ has a greatest lower bound (defined analogously to least upper bound with inequality reversed).
Then $L$, together with the joint operation sending $\{a,b\}$ to the least upper bound of that set and the meet operation analogously, is a lattice.
In fact, it suffices to require conditions 1. and 2. only for sets $S$ with two elements. But as we have shown, in the case that $L$ is the set of all submodules of a given module, we have the "original" conditions satisfied.
Proof:
First, we note that least upper bound and greatest lower bound are unique, since if for example $u,u'$ are least upper bounds of $S$, then $u\leq u'$ and $u'\leq u$ and hence $u=u'$. Thus, the joint and meet operation are well-defined.
The commutative laws follow from $\{a,b\}=\{b,a\}$.
The idempotency laws from clearly $a$ being the least upper bound, as well as the greatest lower bound, of the set $\{a,a\}$.
The first absorption law follows as follows: Let $u$ be the least upper bound of $\{a,b\}$. Then in particular, $u\geq a$. Hence, $a$ is a lower bound of $\{a,u\}$, and any lower bound $l$ satisfies $l\leq a$, which is why $a$ is the greatest lower bound of $\{a,u\}$. The second absorption law is proven analogously.
The first associative law follows since if $u$ is the least upper bound of $\{a,b,c\}$ and $v$ is the upper bound of $\{a,b\}$, then $u\geq v$ (as $u$ is an upper bound for $\{a,b\}$) and if $w$ is the least upper bound of $\{v,c\}$, then $w=u$ since $u$ is an upper bound and further, $w\geq v\geq a$ and $w\geq b$. The same argument (with $a$ and $c$ swapped) proves that $u$ is also the least upper bound of the l.u.b. of $\{b,c\}$ and $a$. Again, the second associative law is proven similarly.$\Box$
From theorems 5.5-5.7 and 5.10 we note that the submodules of a module form a modular lattice, where the order is given by set inclusion.

### Exercises

* Exercise 5.2.1: Let $R$ be a ring. Find a suitable module operation such that $R$ together with its own addition and this module operation is an $R$-module. Make sure you define this operation in the simplest possible way. Prove further, that with respect to this module operation, the submodules of $R$ are exactly the ideals of $R$.

## Homomorphisms

We shall now get to know the morphisms within the category of modules over a fixed ring $R$.
Definition 5.11 (homomorphisms):
Let $M,N$ be two modules over a ring $R$. A homomorphism from $M$ to $N$, also called an $R$-linear function from $M$ to $N$, is a function
    $f:M\to N$
such that
* $\forall m,p\in M:f(m+p)=f(m)+f(p)$ and
* $\forall r\in R,m\in M:f(rm)=rf(m)$.
The kernel and image of homomorphisms of modules are defined analogously to group homomorphisms.
Since we are cool, we will often simply write morphisms instead of homomorphisms where it's clear from the context in order to indicate that we have a clue about category theory.
We have the following useful lemma:
Lemma 5.12:
$f:M\to N$ is $R$-linear iff
    $\forall r\in R,m,p\in M:f(rm+p)=rf(m)+f(p)$.
Proof:
Assume first $R$-linearity. Then we have
    $f(rm+p)=f(rm)+f(p)=rf(m)+f(p)$.
Assume now the other condition. Then we have for $m,p\in M$
    $f(m+p)=f(1_{R}m+p)=1_{R}f(m)+f(p)=f(m)+f(p)$
and
    $f(rm)=f(rm+0)=rf(m)+f(0)=rf(m)$
since $f(0)=0$ due to $f(0)=f(0+0)=f(0)+f(0)$; since $M$ is an abelian group, we may add the inverse of $f(0)$ on both sides.$\Box$
Lemma 5.13:
If $f:M\to N$ is $R$-linear, then $\forall m\in M:f(-m)=-f(m)$.
Proof:
This follows from the respective theorem for group homomorphisms, since each morphism of modules is also a morphism of Abelian groups.$\Box$
Definition 5.8 (isomorphisms):
An isomorphism $f:M\to N$ is a homomorphism which is bijective.
Lemma 5.14:
Let $f:M\to N$ be a morphism. The following are equivalent:
* $f$ is an isomorphism
* $\ker f=\{0\}$
* $f$ has an inverse which is an isomorphism
Proof:
Lemma 5.15:
The kernel and image of morphisms are submodules.
Proof:
1. The kernel:
    $f(rn-q)=rf(n)+f(-q)=rf(n)-f(q)=0$
2. The image:
    $rf(m)\overbrace {-f(p)} ^{=+f(-p)}=f(rm-p)$$\Box$
The following four theorems are in complete analogy to group theory.
Theorem 5.16 (factoring of morphisms):
Let $M,K$ be modules, let $\varphi :M\to K$ be a morphism and let $N\leq \ker \varphi$. Then there exists a unique morphism ${\overline {\varphi }}:M/N\to K$ such that ${\overline {\varphi }}\circ \pi =\varphi$, where $\pi :M\to M/N,\pi (m)=m+N$ is the canonical projection. In this situation, $\ker {\overline {\varphi }}=\ker \varphi /N$.
Proof:
We define ${\overline {\varphi }}(m+N):=\varphi (m)$. This is well-defined since $\ker \varphi \subseteq N$. Furthermore, this definition is already enforced by ${\overline {\varphi }}\circ \pi =\varphi$. Further, ${\overline {\varphi }}(m+N)=0\Leftrightarrow m\in \ker \varphi$.$\Box$
Corollary 5.17 (first isomorphism theorem):
Let $M,K$ be $R$-modules and let $f:M\to K$ be a morphism. Then $M/\ker f\cong K$.
Proof:
We set $N=\ker f$ and obtain a homomorphism ${\overline {f}}:M/\ker f\to K$ with kernel $N/N$ by theorem 5.11. From lemma 5.16 follows the claim.$\Box$
Corollary 5.18 (third isomorphism theorem):
Let $M$ be an $R$-module, let $N\leq M$ and let $L\leq N$. Then
    $M/N\cong (M/L){\big /}(N/L)$.
Proof:
Since $L\leq N$ and $N\leq M$ also $L\leq M$ by definition. We define the function
    $\varphi :M/L\to M/N,m+L\mapsto m+N$.
This is well-defined since
    $m+L=p+L\Leftrightarrow m-p\in L\Rightarrow m-p\in N\Leftrightarrow m+N=p+N$.
Furthermore,
    $m+L\in \ker \varphi \Leftrightarrow m+N=0+N\Leftrightarrow m\in N$
and hence $\ker \varphi =N/L$. Hence, by theorem 5.17 our claim is proven.$\Box$
Theorem 5.19 (second isomorphism theorem):
Let $L,N\leq M$. Then
    $L/(L\cap N)\cong (L+N)/N$.
Proof:
Consider the isomorphism
    $\varphi :L\to (L+N)/N,\varphi (l):=l+N$.
Then $\varphi (l)=0\Leftrightarrow l\in N$, which is why the kernel of that homomorphism is given by $L\cap N$. Hence, the theorem follows by the first isomorphism theorem.$\Box$
And now for something completely different:
Theorem 5.20:
Let $\varphi :M\to N$ be a homomorphism of modules over $R$ and let $L\leq N$. Then $\varphi ^{-1}(L)$ is a submodule of $M$.
Proof:
Let $a,b\in \varphi ^{-1}(L)$. Then $\varphi (a+b)=\varphi (a)+\varphi (b)\in L$ and hence $a+b\in \varphi ^{-1}(L)$. Let further $r\in R$. Then $\varphi (ra)=r\varphi (a)\in L$.$\Box$
Similarly:
Theorem 5.21:
Let $\varphi :M\to N$ be a homomorphism of modules over $R$ and let $K\leq M$. Then $\varphi (K)$ is a submodule of $N$.
Proof: Let $a,b\in \varphi (K)$. Then $a=\varphi (i),b=\varphi (j)$ and $a+b=\varphi (i+j)\in \varphi (K)$. Let further $r\in R$. Then $ra=\varphi (ri)\in \varphi (K)$.$\Box$

### Exercises

* Exercise 5.3.1: Let $R,S$ be rings regarded as modules over themselves as in exercise 5.2.1. Prove that the ring homomorphisms $\varphi :R\to S$ are exactly the module homomorphisms $R\to S$; that is, every ring hom. is a module hom. and vice versa.

## The projection morphism

Definition 5.22:
Let $M$ be a module and $N\leq M$. By the mapping $\pi _{N}:M\to M/N$ we mean the canonical projection mapping $m\in M$ to $m+N$; that is,
    $\pi _{N}:M\to M/N,\pi _{N}(m):=m+N$.
The following two fundamental equations for $\pi _{N}(\pi _{N}^{-1}(S))$ and $\pi _{N}^{-1}(\pi _{N}(K))$ shall gain supreme importance in later chapters, $S\subseteq M/N$, $K\leq M$.
Theorem 5.23:
Let $M$ be a module and $N\leq M$. Then for every set $S\subseteq M/N$, $\pi _{N}(\pi _{N}^{-1}(S))=S$. Furthermore, for every other submodule $K\subseteq M$, $\pi _{N}^{-1}(\pi _{N}(K))=K+N$.
Proof:
Let first $m+N\in S$. Then $m\in \pi ^{-1}(S)$, since $\pi _{N}(m)=m+N$. Hence, $m+N\in \pi _{N}(\pi ^{-1}(S))$. Let then $m+N\in \pi _{N}(\pi _{N}^{-1}(S))$. Then there exists $m'\in \pi _{N}^{-1}(S)$ such that $\pi _{N}(m')=m+N$, that is $m'+N=m+N$. Now $m'\in \pi _{N}^{-1}(S)$ means that $\pi (m')=m'+N\in S$. Hence, $m+N=m'+N\in S$.
Let first $m\in K+N$, that is, $m=k+n$ for suitable $k\in K$, $n\in N$. Then $\pi _{N}(m)=k+n+N=k+N=\pi _{N}(k)\in \pi _{N}(K)$, which is why by definition $m\in \pi _{N}^{-1}(\pi _{N}(K))$. Let then $m\in \pi _{N}^{-1}(\pi _{N}(K))$. Then $\pi _{N}(m)=m+N\in \pi _{N}(K)$, that is $m+N=k+N$ with $k\in K$, that is $m=k+n$ for a suitable $n\in N$, that is $m\in K+N$.$\Box$
The following lemma from elementary set theory have relevance for the projection morphism and we will need it several times:
Lemma 5.24:
Let $f:S\to T$ be a function, where $S,T$ are completely arbitrary sets. Then $f$ induces a function $2^{S}\to 2^{T}$ via $A\mapsto f(A)$, the image of $A$, where $A\subseteq S$. This function preserves inclusion. Further, the function $2^{T}\to 2^{S},B\mapsto f^{-1}(B)$, also preserves inclusion.
Proof:
If $A'\subseteq A$, let $y'\in f(A')$. Then $y'=f(x')$ for an $x'\in A'\subseteq A$. Similarly for $f^{-1}$.$\Box$