\documentclass[11pt]{article}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{xcolor}

%\usepackage{systeme}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}


\theoremstyle{definition}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{eg}[thm]{Example}
\newtheorem{ex}[thm]{Exercise}
\newtheorem{defn}[thm]{Definition}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{remark}[thm]{Remark}
\newtheorem{question}[thm]{Question}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\usepackage{tikz-cd}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{miniball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=0.5pt]
\tikzstyle{mminiball} = [circle,shading=ball, ball color=black,
    minimum size=0.6mm,inner sep=0.1pt]
\usetikzlibrary{arrows.meta}
\tikzset{>={Latex[length=2mm,width=1.5mm]}}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\usetikzlibrary{decorations.pathmorphing}    
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{arrows.meta,calc}
\usetikzlibrary{bending}
\usetikzlibrary{decorations.markings,shapes.geometric}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\tikzset{-|-/.style={decoration={markings, mark=at position #1 with
  {\arrow{stealth}}},postaction={decorate}}}
\tikzset{movearrow/.style 2 args ={
        decoration={markings,
	  mark= at position {#1} with {\arrow{#2}} ,
        },
        postaction={decorate}
    }
}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
%\setlist[enumerate]{leftmargin=*}
\setlist[enumerate]{itemsep=1pt}

%\allowdisplaybreaks

\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

%\usepackage{algorithm}
%\usepackage[noend]{algpseudocode}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\W}{\mathbb{W}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\newcommand{\incid}{\mathcal{I}(P)}
\newcommand{\tL}{\widetilde{L}}
\newcommand{\tV}{\widetilde{V}}
\newcommand{\F}{\mathcal{F}}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\wt}{\mathrm{wt}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}
\DeclareMathOperator{\Div}{\mathrm{Div}}
\DeclareMathOperator{\Pic}{\mathrm{Pic}}
\DeclareMathOperator{\Jac}{\mathrm{Jac}}
\DeclareMathOperator{\cok}{\mathrm{cok}}
\DeclareMathOperator{\sgn}{\mathrm{sgn}}
\DeclareMathOperator{\outdeg}{\mathrm{outdeg}}
\DeclareMathOperator{\supp}{\mathrm{supp}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 361 lecture for Friday, Week 8}
\bigskip

\centerline{Structure theorem for finitely generated abelian groups}
\bigskip

Fix a ring~$R$.  Is it possible to identify all finitely generated~$R$-modules
up to isomorphism? The easiest and most familiar case example is when~$R$ is a
field.  In that case, $M$ is a vector space over~$R$. Being finitely generated
then means that~$M$ is spanned by a finite number of elements.  There will be a
subset $B=\{b_{1},\ldots,b_{n}\}$ of that spanning set that forms a basis
for~$M$.  We use $B$ to get an isomorphism
\begin{align*}
  M &\to R^{n}\\
  b_{i}&\mapsto e_{i}.
\end{align*}
(We have defined the mapping above by showing where the basis vectors are set.
Given that we want the mapping to be $R$-linear, that determines the mapping
completely: $\sum_{i=1}^{n} a_{i}b_{i}\mapsto (a_{1},\ldots,a_{n})$.)
Thus, if~$R$ is a field, then up to isomorphism, every finitely generated vector space has the form
$R^{n}$ for some uniquely determined $n$ (the dimension of the vector space).
This is the \emph{structure theorem} for finitely generated modules over a
field.

If~$R=\Z$, there is a structure theorem that is almost as simple as in the case of
vector spaces. Recall that a module over $\Z$ is the same thing as an
\emph{abelian group}.  Some examples of finitely generate~$\Z$-modules appear
below.

\begin{eg}\ 
  \begin{itemize}[leftmargin=*]
    \item A {\em cyclic group} is by definition generated by a single element, and every
      cyclic group is abelian.  Every cyclic group is isomorphic
      to~$\Z/n\Z$ for some nonnegative integer~$n$.  The case $n=0$ yields the
      infinite cyclic group $\Z=\Z/0\Z$, and the case~$n=1$ yields the zero group
      $\Z/1\Z=0$.
    \item Every finite abelian group is generated by the finite set consisting of all of its
      elements.  For instance, $\Z/4\Z=\Span_{\Z} \{0,1,2,3\}$.  Of course, we also
      have $\Z/4\Z=\Span_{\Z}\{1\}=\Span_{\Z}\{3\}$.  We do not require the set of
      generators to be minimal with respect to inclusion.
    \item  A finite product of cyclic groups is a finitely generated abelian group.  A typical
      instance is $\Z/4\Z\times\Z/6\Z\times \Z^{2}$.  Recall that addition is defined
      component-wise, e.g., $(2,5,-2,8)+(3,3,2,7)=(1,2,0,15)$ in this group.
  \end{itemize}
\end{eg}

The last example is about as complicated as a finitely generated abelian group can get:
it turns out that every finitely generated abelian group is a product of a finite number
of cyclic groups, i.e., has the form~$\prod_{i=1}^k\Z/n_i\Z$ for
suitable~$n_i$ (where~$n_i$ might be~$0$). The {\em structure} of the group 
is then
given by the list of the~$n_i$. Different choices for the~$n_i$ may produce
isomorphic
groups, but it turns out that the ambiguity is accounted for by the following
well-known result:
\medskip

{\bf Theorem.} (Chinese remainder theorem.) Let~$m,n\in\Z$. Then
\[
\Z/mn\Z\simeq\Z/m\Z\times\Z/n\Z
\]
if and only if~$m$ and~$n$ are relatively prime. If~$\gcd(m, n)=1$, then an
isomorphism is provided by $a\mapsto  (a \bmod m, a \bmod n)$.
\medskip

Thus,~$\Z/24\Z\simeq\Z/8\Z\times\Z/3\Z$, but~$\Z/4\Z\not\simeq\Z/2\Z\times\Z/2\Z$.
\medskip

{\bf Theorem.} (Structure theorem for finitely generated abelian groups)  A group is a
finitely generated abelian group if and only if it is isomorphic to
  \[
    \Z/{n_1}\Z\times\dots\times\Z/{n_k}\Z\times\Z^r
  \]
  for some list (possibly empty) of integers $n_1,\dots,n_k$ with  $n_i>1$ for
  all~$i$ and some integer $r\geq0$. These integers may be required to satisfy
  either of the following two conditions, and in either case they are uniquely
  determined by the isomorphism class of the group.
  
  \noindent{\bf Condition 1:} $n_i|n_{i+1}$ (\,$n_i$ evenly divides $n_{i+1}$) for
  all $i$.  In this case, the~$n_i$ are the {\em invariant factors} of the
  group.

  \noindent{\bf Condition 2:}  There exist primes $p_1\leq\dots\leq p_k$ and
  positive integers $m_i$ such that $n_i=p_i^{m_i}$ for all $i$.  
  In this case, the~$n_i$ are the {\em elementary divisors} and the $\Z/{n_i}\Z$
  are the {\em primary factors} of the group.  
  
  The number $r$ is the {\em rank} of the group.
  \medskip

How does one go about computing the rank and invariant factors of a finitely
generated abelian group $A$?  Let $\{a_1,\dots,a_m\}$ be generators, and define
the group homomorphism determined by
\begin{align*}
  \Z^m&\stackrel{\pi}{\longrightarrow} A\\
  e_i&\mapsto a_i
\end{align*}
where $e_i$ is the $i$-th standard basis vector.  Saying that the $a_i$
generate~$A$ is the same as saying that $\pi$ is surjective.  Next,
since~$\Z^{m}$ is Noetherian, every subgroup of $\Z^m$
  is finitely generated.  In particular, there exists a finite set of generators
  $\{b_1,\dots,b_n\}$ for the kernel of~$\pi$.  Define  
\[
  \Z^n\stackrel{M}{\longrightarrow}\Z^m
\]
where $M$ is the $m\times n$ integer matrix with $i$-th column $b_i$.  
Combining these two mappings yields a {\em presentation} of $A$:
\[
\begin{tikzcd}
  \Z^n \ar[r,"M"]&\Z^m\ar[r,"\pi"twoheadrightarrow] &A
\end{tikzcd}
\]
The sequence is exact: the image of~$M$ is the kernel of~$\pi$ and~$\pi$ is
surjective.
Recall that the \emph{cokernel} of the matrix~$M$ is
$\cok(M):=\Z^m/\textrm{im}(M)$.
Then $\pi$ induces an isomorphism
\begin{align*}
\cok(M)&\simeq A\\
\overline{e}_i\quad&\mapsto a_i.
\end{align*}
Here, $\overline{e}_{i}$ is the~$i$-th standard basis vector modulo the image
of~$M$.
In this way, $A$ is encoded in the matrix~$M$.

We have just seen that each finitely generated abelian group is the cokernel of
an integer matrix.  Conversely, each integer matrix determines a finitely
generated abelian group.  However, the correspondence is not bijective.  The
construction of~$M$, above, depended on arbitrary choices for generators of $A$
and of the kernel of $\pi$.  Making different choices creates a different
matrix representing~$A$.  This is especially obvious if we choose a different
number of generators for~$A$ or $\ker{\pi}$.  However, there can be a difference
even if the number of generators is kept constant.  In that case, changing the
choice of generators corresponds to integer changes of coordinates for the
codomain and domain of $M$, or equivalently, to performing integer row and
column operations on $M$.   

Write $M\sim N$ for integer matrices $M$ and $N$ if one may be obtained from the
other through a sequence of integer row and column operations.  Since the
operations are reversible, $\sim$ is an equivalence relation. 

Suppose $M$ is an $m\times n$ integer matrix and $M\sim N$. Start with
identity matrices $P=I_m$ and $Q=I_n$, and consider the sequence of integer row
and column operations transforming $M$ into~$N$.  Whenever a row operation is
performed in this sequence, apply the same row operation to $P$.  Similarly,
whenever a column operation is made, apply the same column operation to $Q$.
\medskip

{\bf Exercise.}
  Explain why the resulting matrices $P$ and $Q$ are invertible over the integers and
  why $PMQ=N$.  The converse of this statement is also true: given any matrices $P$ and $Q$,
  invertible over the integers and such that $PMQ=N$, it follows that $M\sim N$.
\medskip

The relation $PMQ=N$ can be expressed in terms of a commutative diagram with
exact rows:
\begin{equation}\label{cd: induced map}
  \begin{tikzcd}
    \Z^n \ar[r,"M"] \ar[d,"{Q^{-1}}"',"{\rotatebox{270}{$\approx$}}"]
    &\Z^m \ar[r] \ar[d,"{\rotatebox{90}{$\approx$}}"',"P"]
  &\cok{M} \ar[r] \ar[d,dashed]&0\\
  \Z^n \ar[r,"N"] &\Z^m \ar[r] &\cok{N} \ar[r] &0.
  \end{tikzcd}
\end{equation}
\noindent The mapping $\cok(M)\to\cok(N)$ is induced by $P$ as follows:
$\overline{v}\mapsto\overline{Pv}$.
\medskip

{\bf Proposition.}
  Let $M$ and $N$ be $m\times n$ integer matrices.  Then if $M\sim N$, it
  follows that $\cok(M)\simeq\cok(N)$.
\smallskip

{\bf Proof.} Since $P$ and $Q$ in the commutative diagram are isomorphisms the
mapping of cokernels induced by $P$ is an isomorphism.  \hfill$\Box$
\medskip

{\bf Exercise.}
  Suppose $M\sim N$ where $N=\mathrm{diag}(m_1,\dots,m_{\ell})$, a diagonal
  integer matrix with nonnegative entries.  Show that
  \[
    \cok(M)\simeq \prod_{i=1}^{\ell}\Z/m_i\Z.
  \]
\medskip


The previous exercise shows that to determine the structure of $\cok(M)$, we
should seek to transform~$M$ through integer row and column operations into a
diagonal matrix of a particularly nice form.  That is exactly the role of the
Smith normal form from the last lecture.  Recall that an $m\times n$ integer
matrix $M$ is in {\em Smith normal form} if 
\[ 
  M=\diag(s_1,\dots,s_k,0,\dots,0),
\] 
a diagonal matrix, where $s_1,\dots,s_k$ are positive integers such that
$s_i|s_{i+1}$ for all $i$.  
\bigskip


\begin{proof}[Sketch of proof of the structure theorem for finitely generated
  abelian groups.]
  Given a finitely generated abelian group~$A$, let
\[
\begin{tikzcd}
  \Z^n \ar[r,"M"]&\Z^m\ar[r,"\pi"twoheadrightarrow] &A
\end{tikzcd}
\]
be a presentation.
Let
\[
  D=\diag(n_{1},n_{2},\ldots,n_{k},\underbrace{0,\ldots,0}_{\ell})
\]
be the Smith normal form for $M$.  Then
\[
  A\simeq\cok(M)\simeq\cok(D)=\Z/n_{1}\Z\times \cdots\times \Z/n_{k}\Z\times \Z^{\ell+c}.
\]
where $c=\max\{0,m-n\}$ (see the example below). We may then remove any factors
for which $n_{i}=1$.
\end{proof}

\begin{eg}
  Let
  \[
    D:=
    \left(
      \begin{array}{cccc}
	1&0&0&0\\
	0&2&0&0\\
	0&0&6&0\\
	0&0&0&0\\
	0&0&0&0\\
	0&0&0&0
      \end{array}
    \right).
  \]
Then~$D$ is in Smith normal form, and
\[
  \cok(D) \simeq \Z/1\Z\times\Z/2\Z\times \Z/6\Z\times \Z/0\Z\times \Z^{2}.
\]
The factor of~$\Z^{2}$ at the end comes from the fact that~$D$ is an~$m\times n$
matrix with~$m=6$ and~$n=4$, so~$\max\{0,m-n\}=2$. Noting that~$\Z/1\Z=0$
and~$\Z/0\Z=\Z$, we have
\[
  \cok(D) \simeq  \Z/2\Z\times \Z/6\Z\times\Z^{3}.
\]
\end{eg}

\textbf{Corollary.} Let~$M$ be a finitely generated $\Z$-module, and let~$N\subseteq M$
be a $\Z$-submodule.    
\begin{enumerate}
  \item If~$M$ is free, then so is~$N$.
  \item If $M$ is free and the quotient module~$M/N$ is finite, then $M$ and $N$
    have the same rank. 
  \item Suppose that~$M$ and $N$ are free, both of rank~$n$. Fix isomorphisms
    $M\simeq \Z^{n}$ and $N\simeq\Z^{n}$ and consider the resulting commutative
    diagram with exact rows
\begin{center}
  \begin{tikzcd}
    0\ar[r]&  N\ar[r] \ar[d,"{\rotatebox{270}{$\approx$}}"]
    &M\ar[r] \ar[d,"{\rotatebox{90}{$\approx$}}"]
  &M/N \ar[r] \ar[d,dashed]&0\\
  0\ar[r]&\Z^n \ar[r,"W"] &\Z^n \ar[r] &\cok{W} \ar[r] &0
  \end{tikzcd}
\end{center}
where~$W$ is an $n\times n$ integer matrix.  Then
\[
  |M/N|=|\det(W)|.
\]
\end{enumerate}
\begin{proof}\
 \begin{enumerate}
   \item Since~$M$ is a finitely generated $\Z$-module, it is Noetherian.
     Hence,~$N$ is finitely generated.  Hence, by the structure theorem for finitely generated abelian groups, we have
     \[
       N\simeq C\times \Z^{r}
     \]
     where~$C$ is finite (a finite product of cyclic groups).  However,
     since~$N\subseteq M\simeq\Z^{n}$, no nonzero element of~$N$ can have
     finite order.  It follows that~$C=0$, and~$N$ is free.
   \item Choosing bases for~$M$ and $N$, we get the commutative diagram
     \begin{center}
       \begin{tikzcd}
	 0\ar[r]&  N\ar[r] \ar[d,"{\rotatebox{270}{$\approx$}}"]
		&M\ar[r] \ar[d,"{\rotatebox{90}{$\approx$}}"]
		&M/N \ar[r] \ar[d,dashed]&0\\
	 0\ar[r]&\Z^n \ar[r,"W"] &\Z^m \ar[r] &\cok{W} \ar[r] &0
       \end{tikzcd}
     \end{center}
     where~$m\geq n$.  
     Let~$D=\diag(n_{1},n_{2},\ldots,n_{k},\underbrace{0,\ldots,0}_{n-k})$ be the Smith normal form for
     $W$.  Since,~$m\geq n$ the shape of $D$ will be something like this
     \begin{center}
       \begin{tikzpicture}
         \node at (0,0) {
	     $
	     \left(
	       \begin{array}{cccccc}
		 n_{1}&&&&&\\
		 &\ddots&&&&\\
		 &&n_{k}&&&\\
		 &&&0&&\\
		 &&&&\ddots&\\
		 &&&&&0\\
		 &&&&&\\
		 &&&&&\\
		 &&&&&\\
		 &&&&&
	       \end{array}
	     \right)
	     $
	     };
	   \draw (-2,-0.8)--(2,-0.8);
	   \node at (0,-1.8) {{\Huge 0}};
	   \node at (-1,0.2) {{\huge 0}};
	   \node at (1,1.7) {{\huge 0}};
       \end{tikzpicture}
     \end{center}
     with bottom rows of zeros in the case~$m>n$.
     Then
     \[
       M/N\simeq\cok(W)\simeq\cok(D)\simeq\Z/n_{1}\Z\times \cdots\times
       \Z/n_{k}\Z\times \Z^{n-k}\times \Z^{m-n}.
     \]
     It follows that~$M/N$ is finite if and only if $k=m=n$.
     So~$M$ and~$N$ have the same rank~$n$.
   \item The Smith normal form for~$W$ is $D=\diag(s_{1},\ldots,s_{n})$ where
     each~$s_{i}$ is a positive integers.  We have square integer matrices~$P$
     and~$Q$ that are invertible over~$\Z$ and such that~$PWQ=D$.  It follows
     that 
     \[
       |M/N|=|\cok(D)|=\prod_{i=1}^{n} s_{i}=\det(D),
     \]
     and
     \[
       \det(D)=\det(PWQ)=\det(P)\det(W)\det(Q)=\pm\det(W).
     \]
     The result follows.
 \end{enumerate}
\end{proof}
\end{document}
