# Abstract Algebra/Modules
## Motivation

Let G be an abelian group under addition. We can define a sort of multiplication on G by elements of $\mathbb {Z}$ by writing $ng=\underbrace {g+g+\cdots +g} _{n}$ for $n\in \mathbb {Z} ^{+}$ and $g\in G$. We can extend this to the case where n is negative by writing $(-n)g=\underbrace {-g-g-\cdots -g} _{n}$. We would, however, like to be able to define a sort of multiplication of a group by an arbitrary ring.

## Definition
### Definition 1 (Module)

    Let R be a ring and M an abelian group. We call M a left R-module if there is a function $R\times M\to M\,:\,(r,m)\mapsto rm$, called a scalar multiplication, satisfying
   * $(r+s)m=rm+sm$,
   * $r(m+n)=rm+rn$, and
   * $(rs)m=r(sm)$
    for all $r,s\in R,\ m,n\in G$.
    We call R the ring of scalars of M.
Note: We can also define a right R-module analogously by using a function $M\times R\to M\,:\,(m,r)\mapsto mr$. In particular the third property then reads:
    $m(rs)=(mr)s$
Note that the two notions coincide if R is a commutative ring, and in this case we can simply say that M is an R-module.
Definition 2: Given any ring R, we can define it's opposite ring, $R^{\mathrm {op} }$, having the same elements and addition operation as R, but opposite multiplication. Their multiplication rules are related by $r\cdot s=sr$. In contrast to group theory, there is no reason in general for a ring to be isomorphic to its opposite ring.
The observant reader will have noticed that the scalar multiplication in a left R-module M is simply a ring homomorphism $\phi \,:\,R\to \mathrm {End} (M)$ such that $rm=\phi (r)(m)$ for all $r\in R\,,\,m\in M$. We leave it as an exercise to verify that the scalar multiplication in a right R-module is a ring homomorphism $\phi ^{\prime }\,:\,R^{\mathrm {op} }\to \mathrm {End} (M)$. Thus a right R-module is simply a left R$^{op}$-module. As a consequence of this, all the results we will formulate for left R-modules are automatically true for right R-modules as well. There are no assumptions that the module is unital, namely that 1m = m for all m in M.

## Examples of Modules

* Any ring R is trivially an R-module over itself. More interestingly, any left ideal I of R is also a left R-module with the obvious scalar multiplication. In addition, if I is a two-sided ideal of R, then the quotient ring $R/I$ is an R-module with the induced scalar multiplication $r(s+I)=rs+I\,,\,(s+I)r=sr+I$.
* If R is a ring, then the set $M_{n,m}(R)$ of $n\times m$ matrices with entries in R is an R-module under componentwise addition and scalar multiplication. More generally, for any set X, the set $R^{X}$ of function from X to R, with or without finite support, is an R-module in an obvious way.
* The k-modules over a field k are simply the k-vector spaces.
* As was shown in the introduction of this chapter, any abelian group is a $\mathbb {Z}$-module in a natural way. ("Natural" here has a rigorous mathematical meaning which will be explained later.
* Let S be a subring of a ring R. Then R is an S-module in a natural way. We can extend this as follows. Let S,R be rings and $\phi \,:\,S\to R$ a ring homomorphism. Then R is an S-module with scalar multiplication $sr=\phi (s)r$ and $rs=r\phi (s)$ for all $s\in S\,,\,r\in R$.
* Any matrix ring of a ring R is a R-module under componentwise scalar multiplication.
* If S is a subring of a ring R, then any left R-module is also a left S-module with the restricted scalar multiplication. We will treat this more generally later.

## Submodules

Definition 3: (Submodule)
    Given a left $R$-module $M$ a submodule of $M$ is a subset $N\subseteq M$ satisfying
   * N is a subgroup of M, and
   * for all $r\in R$ and all $n\in N$ we have $rn\in N$.
The second condition above states that submodules are closed under left multiplication by elements of $R$; it is implicit that they inherit their multiplication from their containing module; $R\times N\to N$ must be the restriction of $R\times M\to M$.
Example 4: Any module M is a submodule of itself, called the improper submodule, and the zero submodule consisting only of the additive identity of M, called the trivial submodule.
Example 5: A left ideal I is a submodule of R viewed as an S-module, where S is any (not necessarily proper) subring of R.
Lemma 6: Let M be a left R-module. Then the following are equivalent.
    i) N is a submodule of M
    ii) If $r_{i}\in R$ and $n_{i}\in N$ for all $i\in I=\{1,\dots ,k\}\,,\,k\in \mathbb {N}$, then $\sum _{i\in I}r_{i}n_{i}\in N$.
    iii) If $r_{1},r_{2}\in R$ and $n_{1},n_{2}\in N$, then $r_{1}n_{1}+r_{2}n_{2}\in N$.
Proof: i) => iii): $r_{1}n_{1}$ and $r_{2}n_{2}$ are in $N$ by the second property, then $r_{1}n_{1}+r_{2}n_{2}\in N$ by the first property of Definition 3.
iii) => ii): Follows by induction on $k$.
ii) => i): Let $k=2$, $r_{1}=1\,,\,r_{2}=-1$, then for arbitrary $n_{1},n_{2}\in N$ be have $n_{1}-n_{2}\in N$, proving $N$ is a subgroup. Now let $k=1$, then for arbitrary $r_{1},n_{1}\in N$, $r_{1}n_{1}\in N$, proving property 2 in Definition 3. ∎
The lemma gives an alternative characterisation of submodules, and those sets closed under linear combinations of elements.
Analogously to the case of vector spaces, we have ways of creating new subspaces from old ones. The rest of this subsection will be concerned with this.
Lemma 7: Let M be a left R-module, and let N and L be submodules of M. Then $N\cap L$ is a submodule in M, and it is the largest submodule contained in both N in L.
Proof: Let $a,b\in N\cap L$ and $r,s\in R$. Then $ra+sb\in N$ and $ra+sb\in L$ since N and L are submodules, so $ra+sb\in N\cap L$ and $N\cap L$ is a submodule of M. Now, assume that S is a submodule of M contained in N and L. Then any $a\in S$ must be in both N and L and therefore in $N\cap L$ such that $S\subseteq N\cap L$, proving the lemma. ∎
Now, as the reader should expect at this point, given submodules N and L of M, the union $N\cup L$ is in general not a submodule. In fact, we have the following lemma:
Lemma 8: Let M be a left R-module and let N and L be submodules. Then $N\cup L$ is a submodule if and only if $L\subseteq N$ or $N\subseteq L$.
Proof: The left implication is obvious. For the right implication, assume $N\cup L$ is a submodule of M. Then if $n\in N$ and $l\in L$, then $n+l\in N\cup L$, which implies that $n+l\in M$ or $n+l\in L$. Assume without loss of generality that $n+l\in N$. Then, since N is a submodule, we must have $(n+l)-n=l\in N$, proving $L\subseteq N$. ∎
Definition 9: Let M be a left R-module, and let $N_{i}$ be submodules for $1\leq i\leq k\in \mathbb {N}$. Then define their sum, $\sum _{i=1}^{k}N_{i}=\left\{\sum _{j=1}^{k}n_{j}\,:\,n_{j}\in N_{j}\right\}$.
Definition 9 has a straightforward extension to sums over arbitrary index sets. This definition is left for the reader to state. We will only need the finite case in this chapter.
Lemma 10: Let M be a left R-module and let N and L be submodules. Then $N+L$ is a submodule of M, and it is the smallest submodule containing both N and L.
Proof: It is straightforward to see that $N+L$ is a submodule. To see that it is the smallest submodule containing both N and L, let S be a submodule containing both N and L. Then for any $n\in N\subseteq S$ and $l\in L\subseteq S$, we must have $n+l\in S$. But this is the same as saying that $N+L\subseteq S$, proving the lemma. ∎
With Lemma 7 and Lemma 10 established, we can state the main result of this subsection.
Definition 11: Let M be a left R-module. Then let ${\mathcal {S}}(M)$ be the set of submodules ordered by set inclusion.
Lemma 12: Let M be a left R-module. Then ${\mathcal {S}}(M)$ forms a lattice, the join of $N,L\in {\mathcal {S}}(M)$ being given by $N\vee L=N+L$ and their meet by $N\wedge L=N\cap L$.
Proof: Most of the work is already done. All that remains is to check assosiativity, the absorption axioms and the idempotency axioms. The associativity is trivially satisfied, $A\cap (B\cap C)=(A\cap B)\cap C$ and $(A+B)+C=A+(B+C)$ for all $A,B,C\in {\mathcal {S}}(M)$. As for absorption, We have to check $A+(B\cap A)=A$ and $A\cap (A+B)=A$ for all $A,B\in {\mathcal {S}}(M)$, but this is also trivially true. Lastly, we obviously have $A+A=A$ and $A\cap A=A$ for all ${\mathcal {S}}(M)$, so we are done. ∎
Corollary 13: Let M be a left R-module. Then ${\mathcal {S}}(M)$ is a modular lattice.
Note: Recall that ${\mathcal {S}}(M)$ is modular if and only if whenever $A,B,C\in {\mathcal {S}}(M)$ such that $A\subseteq C$, we have $A+(B\cap C)=(A+B)\cap C$.
Proof: Let $a\in A\,,\,b\in B\,,\,c\in C$ such that $a+b=c$. Since $A\subseteq C$, we have $a=c^{\prime }$ for some $c^{\prime }\in C$, such that $b\in C$. Thus $b\in B\cap C$ and $a+b\in A+(B\cap C)$. On the other hand, we have $a+b\in A+B$ and $a+b=c\in C$, so $a+b\in (A+B)\cap C$. ∎
Definition 14: Let M be a left R-module. A submodule N is called maximal if whenever L is a submodule satisfying $N\subseteq L\subseteq M$, then $L=N$ or $L=M$.
Theorem 15: Every submodule of a finitely generated left R-module is contained in a maximal submodule.
Proof: Let N be a submodule, and let $S=\{L\in {\mathcal {S}}(M)\,|\,N\subseteq L\subset M\}$. Then S is a poset under set inclusion. Let $\{U_{1},U_{2},\dots \}$ be a chain in S, and note that $U=U_{1}+U_{2}+\cdots$ is a submodule containing each $U_{i}$, such that U is an upper bound for the chain. Then, since each chain in S has an upper bound, by Zorn's Lemma S has a maximal element, P, say. P is obviously an ideal containing N. By the definition of S, P is also a maximal submodule of M, proving the theorem. ∎

## Generating Modules

Given a subset $A$ of a left $R$-module $M$, we define the left submodule generated by $A$ to be the smallest submodule (w.r.t. set containment) of $M$ that contains $A$. It is denoted by $RA$ for a reason which will become clear in a moment.
The existence of such a submodule comes from the fact that an intersection of $R$-modules is again an $R$-module: Consider the set $S$ of all submodules of $M$ containing $A$. Since $M$ contains $A$, we see that $S$ is non-empty. The intersection of the modules in $S$ clearly contains $A$ and is a submodule of $M$. Further, any submodule of $M$ containing $A$ also contains the intersection. Thus $RA=\cap S$.
Assuming that $M$ is unitary, the elements of $RA$ have a simple description;
    $RA=\left\{\sum _{i=1}^{n}r_{i}a_{i}\mid n\in \mathbb {N} ,r_{i}\in R,a_{i}\in A\right\}$.
That is, every element of $RA$ can be written as a finite left linear combination of elements of $A$. This equality can be justified by double inclusion: First, any submodule containing $A$ must contain all left $R$-linear combinations of elements of $A$ since modules are closed under addition and left multiplication by elements of $R$. Thus, $RA\supseteq \{\sum _{i=1}^{n}r_{i}a_{i}\mid n\in \mathbb {N} ,r_{i}\in R,a_{i}\in A\}$. Secondly, the set of all such linear combinations forms a submodule of $M$ containing $A$ (use $n=1$ and $r_{1}=1_{R}$) and hence it contains $RA$.

## Generating Submodules by Ideals

Consider any ring $R$, left ideal $I\subseteq R$, and left $R$-module $M$. One can think of $I$ as a subring of $R$ (non-unitary when $I\neq R$) and hence $M$ is an $I$-module using the regular multiplication by elements of $R$.
If we consider the set $IM=\{\sum _{i=1}^{n}r_{i}m_{i}\mid n\in \mathbb {N} ,r_{i}\in I,m_{i}\in M\}$ we obtain a submodule of $M$. This follows from our discussion of generated submodules. However, since $I$ is not unitary, it is not necessary that $IM=M$.
Thus, we may consider the quotient module $M/IM$. Clearly this is an $R$-module but it is also an $R/I$ module under the obvious action.

### Proposition

    Given an $R$-module $M$ and ideal $I$ of $R$, the $R$module $M/IM$ is an $R/I$-module with multiplication $(r+I)(m+IM)=rm+IM$.

### proof.

    To show that this is well defined, we observe that if $r+I=s+I$ then $r-s\in I$ and hence
       $(rm+IM)-(sm+IM)=rm-sm+IM=(r-s)m+IM=0+IM$
    since $(r-s)m\in IM$. Thus,
       $(r+I)(m+IM)=rm+IM=sm+IM=(s+I)(m+IM)$
    which proves that the action of $R/I$ on $M/IM$ is well defined. It follows now that $M/IM$ is an $R/I$-module simply because it is an $R$-module.

## Quotient Modules

Recall that any subgroup $N$ of an abelian group $M$ allows one to construct an equivalence relation; for $m,m^{\prime }\in M$,
    $m\sim m^{\prime }\iff m-m^{\prime }\in N$.
Cosets of $N$, equivalence classes under the relation above, can then be endowed with a group structure, derived from the original group, and is given the name M/N. The sum of two cosets $m+N=[m]$ and $m^{\prime }+N=[m^{\prime }]$ is simply $(m+m^{\prime })+N=[m+m^{\prime }]$.
Lemma 16 Let M be a left R-module and N be a submodule. Then M/N, defined above, is a left R-module.
Proof: M/N is obviously an abelian group, so we just have to check that it has a well-defined R-action. Let $r\in R$ and $m\in M$. Then we define $r(m+N)=rm+N$. The distributivity and associativity properties of the action are inherited from M, so we just need well-definedness. Let $m,m^{\prime }\in M$ with $m-m^{\prime }\in N$. Then $r(m-m^{\prime }+N)=r(m-m^{\prime })+N=N$ since N is a submodule, and we are done. ∎

## Module Homomorphisms

Like all algebraic structures, we can define maps between modules that preserve their algebraic operations.

### Definition (Module Homomorphism)

    An $R$-module homomorphism $\phi :M\to N$ is a function from $M$ to $N$ satisfying
   * $\phi (m+m')=\phi (m)+\phi (m')$ (it is a group homomorphism), and
   * $\phi (rm)=r\phi (m).$
When a map between two algebraic structures satisfies these two properties then it called an $R$-linear map.

### Definition (Kernel, Image)

    Given a module homomorphism $\phi :M\to N$ the kernel of $\phi$ is the set
       $\ker \phi =\{m\in M\mid \phi (m)=0\}$
    and the image of $\phi$ is the set
       $\phi (M)=\{n\in N\mid \exists m\in M,\phi (m)=n\}$.
The kernel of $\phi$ is the set of elements in the domain that are sent to zero by $\phi$. In fact, the kernel of any module homomorphism is a submodule of $M$. It is clearly a subgroup, from group theory, and it is also closed under multiplication by elements of $R$: $\phi (rm)=r\phi (m)=r(0)=0$ for $m\in \ker \phi$.
Similarly, one can show that the image of $\phi$ is a submodule of $N$.