\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=True]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{bbding}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Thursday, August 17, 2023 02:12:19}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{calc}
\newcounter{exer}
\newcounter{exera}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{convention}[1][Convention]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\setlength\textheight{22.5cm}
\setlength\textwidth{14.8cm}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\defn}[1]{{\color{darkred}\emph{#1}}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\arinj}{\ar@{_{(}->}}
\newcommand{\arinjrev}{\ar@{^{(}->}}
\newcommand{\arsurj}{\ar@{->>}}
\newcommand{\arelem}{\ar@{|->}}
\newcommand{\arback}{\ar@{<-}}
\newcommand{\are}{\ar@{-}}
\newcommand{\arebi}[1][]{\ar@{<-}@/_/[#1] \ar@/^/[#1]}
\newcommand{\of}{\text{ of }}
\definecolor{darkgreen}{rgb}{0,.5,0}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Lecture 21, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 332 Winter 2023, Lecture 21: Modules}

\textbf{website:}
\texttt{\href{https://www.cip.ifi.lmu.de/~grinberg/t/23wa}{\texttt{https://www.cip.ifi.lmu.de/\symbol{126}%
grinberg/t/23wa}}}

\setcounter{section}{1}

\section{Modules}

\setcounter{subsection}{4}

\subsection{Spanning, linear independence, bases and free modules (cont'd)}

\setcounter{subsubsection}{3}

\setcounter{theo}{6}

\subsubsection{Free modules (cont'd)}

Last time, we defined bases of an $R$-module, and we called an $R$-module free
if it has one. Note that free $R$-modules of rank $n$ are a natural
generalization of vector spaces of dimension $n$, but not the only possible
generalization\footnote{In linear algebra, the dimension of a vector space can
be characterized in different ways: e.g., as the size of a basis; as the
smallest size of a spanning set; as the largest size of a linearly independent
set. If we generalize these three characterizations to an arbitrary ring, they
no longer remain equivalent.}.

Now, let us discuss examples. We begin with examples that make sense for any
ring $R$. We fix an arbitrary ring $R$.

\begin{itemize}
\item Consider the left $R$-module%
\[
R^{2}=\left\{  \left(  a,b\right)  \ \mid\ a,b\in R\right\}  .
\]
This $R$-module $R^{2}$ is free of rank $2$, since the list
\[
\left(  \left(  1,0\right)  ,\ \ \left(  0,1\right)  \right)
\]
is a basis of $R^{2}$. Indeed:

\begin{itemize}
\item The vectors $\left(  1,0\right)  $ and $\left(  0,1\right)  $ span
$R^{2}$, because any vector $\left(  a,b\right)  \in R^{2}$ can be written as
$a\left(  1,0\right)  +b\left(  0,1\right)  $ and thus is a linear combination
of $\left(  1,0\right)  $ and $\left(  0,1\right)  $.

\item The vectors $\left(  1,0\right)  $ and $\left(  0,1\right)  $ are
linearly independent, since a linear combination $a\left(  1,0\right)
+b\left(  0,1\right)  =\left(  a,b\right)  $ can only equal $0$ if $a=b=0$.
\end{itemize}

\item Likewise, the left $R$-module $R^{3}$ has basis%
\[
\left(  \left(  1,0,0\right)  ,\ \ \left(  0,1,0\right)  ,\ \ \left(
0,0,1\right)  \right)  .
\]


\item More generally: For any $n\in\mathbb{N}$, the left $R$-module $R^{n}$
has basis%
\begin{align*}
&  (\ \left(  1,0,0,0,\ldots,0\right)  ,\\
&  \ \ \ \left(  0,1,0,0,\ldots,0\right)  ,\\
&  \ \ \ \left(  0,0,1,0,\ldots,0\right)  ,\\
&  \ \ \ \ldots,\\
&  \ \ \ \left(  0,0,0,0,\ldots,1\right)  \ ).
\end{align*}
This basis is called the \textbf{standard basis} of $R^{n}$, and its $n$
vectors are called $e_{1},e_{2},\ldots,e_{n}$ (in this order). To make this
more rigorous: For each $i\in\left\{  1,2,\ldots,n\right\}  $, we define
$e_{i}$ to be the vector in $R^{n}$ whose $i$-th entry is $1$ and whose all
other entries are $0$. Then, the list $\left(  e_{1},e_{2},\ldots
,e_{n}\right)  $ is a basis of the left $R$-module $R^{n}$. So this $R$-module
is free of rank $n$.

\item In particular, $R^{1}$ is free of rank $1$. Since $R^{1}\cong R$ as left
$R$-modules (because there is an $R$-module isomorphism $R\rightarrow R^{1}$
that sends each $r\in R$ to the $1$-tuple $\left(  r\right)  $), this entails
that $R$ itself is a free $R$-module of rank $1$, with basis $\left(
1\right)  $.

Also, the $R$-module $R^{0}$ is free of rank $0$; here, the empty list serves
as a basis (and the only vector in $R^{0}$ is also the empty list, by coincidence).

\item More generally: If $I$ is a set, then the set
\[
R^{I}=\prod_{i\in I}R=\left\{  \left(  r_{i}\right)  _{i\in I}\ \mid
\ \text{all }r_{i}\text{ belong to }R\right\}
\]
is a left $R$-module (with entrywise addition and action). If $I$ is finite,
this $R$-module is free (indeed, if $I$ is an $n$-element set, then $R^{I}$ is
essentially just $R^{n}$, except that the vectors are indexed by the elements
of $I$ instead of by the numbers $1,2,\ldots,n$). If $I$ is infinite, the
$R$-module $R^{I}$ is usually not free. For instance, the $\mathbb{Z}$-module
\[
\mathbb{Z}^{\mathbb{N}}=\left\{  \text{all infinite sequences of
integers}\right\}
\]
is not free. (This is fairly tricky to prove! However, you can easily convince
yourself that the most obvious candidate for a basis -- i.e., the family
\begin{align*}
&  (\ \left(  1,0,0,0,\ldots\right)  ,\\
&  \ \ \ \left(  0,1,0,0,\ldots\right)  ,\\
&  \ \ \ \left(  0,0,1,0,\ldots\right)  ,\\
&  \ \ \ \left(  0,0,0,1,\ldots\right)  ,\\
&  \ \ \ \ldots\ )
\end{align*}
-- is not a basis, because $\left(  1,1,1,\ldots\right)  $ is not a linear
combination of it.\footnote{If this surprises you, recall that linear
combinations are not allowed to have infinitely many nonzero coefficients.})
In general, whether $R^{\mathbb{N}}$ is free or not depends on $R$; in
particular, it is free when $R$ is a field (by Theorem 2.5.6 in Lecture 20),
but this is not a basis you can construct (or would want to use).

However, the left $R$-module $R^{I}$ has a very important submodule that is
free. Namely, let us define a subset $R^{\left(  I\right)  }$ of $R^{I}$ by%
\begin{align*}
R^{\left(  I\right)  }  &  =\left\{  \left(  r_{i}\right)  _{i\in I}\in
R^{I}\ \mid\ \text{all but finitely many }i\in I\text{ satisfy }%
r_{i}=0\right\} \\
&  =\left\{  \left(  r_{i}\right)  _{i\in I}\in R^{I}\ \mid\ \text{only
finitely many }i\in I\text{ satisfy }r_{i}\neq0\right\}  .
\end{align*}
For instance,%
\begin{align*}
\left(  1,0,3,\underbrace{0,0,0,\ldots}_{\text{only zeroes here}}\right)   &
\in R^{\left(  I\right)  }\ \ \ \ \ \ \ \ \ \ \text{but}\\
\left(  1,1,1,1,\ldots\right)   &  \notin R^{\left(  I\right)  }\text{ (unless
}R\text{ is trivial).}%
\end{align*}


This subset $R^{\left(  I\right)  }$ is a left $R$-submodule of $R^{I}$ (this
is not hard to check)\footnote{Note that $R^{\left(  I\right)  }$ is a
straightforward generalization of the $R$-submodule $R^{\left(  \mathbb{N}%
\right)  }$ constructed in \S 2.1.3 (Lecture 18).}. As a left $R$-module, this
$R^{\left(  I\right)  }$ is free; a basis for it is the family $\left(
e_{i}\right)  _{i\in I}$, where each vector $e_{i}\in R^{\left(  I\right)  }$
is the vector (i.e., a family indexed by $I$) whose $i$-th entry is $1$ and
whose all other entries are $0$. This basis, again, is called the
\textbf{standard basis} of $R^{\left(  I\right)  }$, and generalizes the
standard basis of $R^{n}$ (because if $I=\left\{  1,2,\ldots,n\right\}  $,
then $R^{\left(  I\right)  }=R^{I}=R^{n}$).

\item Let $R$ be a ring. Let $n,m\in\mathbb{N}$. Then, the left $R$-module
$R^{n\times m}$ of all $n\times m$-matrices (as defined in \S 2.1.3 in Lecture
18) is free. It has a basis $\left(  E_{i,j}\right)  _{\left(  i,j\right)
\in\left\{  1,2,\ldots,n\right\}  \times\left\{  1,2,\ldots,m\right\}  }$
consisting of the \textbf{elementary matrices} $E_{i,j}$. Each elementary
matrix $E_{i,j}$ has a $1$ in its $\left(  i,j\right)  $-th cell and $0$s in
all other cells. For instance, for $n=2$ and $m=3$, this basis consists of the
six elementary matrices%
\begin{align*}
E_{1,1}  &  =\left(
\begin{array}
[c]{ccc}%
1 & 0 & 0\\
0 & 0 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{1,2}=\left(
\begin{array}
[c]{ccc}%
0 & 1 & 0\\
0 & 0 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{1,3}=\left(
\begin{array}
[c]{ccc}%
0 & 0 & 1\\
0 & 0 & 0
\end{array}
\right)  ,\\
E_{2,1}  &  =\left(
\begin{array}
[c]{ccc}%
0 & 0 & 0\\
1 & 0 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{2,2}=\left(
\begin{array}
[c]{ccc}%
0 & 0 & 0\\
0 & 1 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{2,3}=\left(
\begin{array}
[c]{ccc}%
0 & 0 & 0\\
0 & 0 & 1
\end{array}
\right)  .
\end{align*}
There are many other bases of $R^{n\times m}$ as well.

\item Let $n\in\mathbb{N}$. The set of all symmetric $n\times n$-matrices
forms a left $R$-submodule $R_{\operatorname*{symm}}^{n\times n}$ of the left
$R$-module $R^{n\times n}$. It, too, is free. For example, for $n=2$, it has a
basis consisting of the three matrices%
\[
E_{1,1}=\left(
\begin{array}
[c]{cc}%
1 & 0\\
0 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{1,2}+E_{2,1}=\left(
\begin{array}
[c]{cc}%
0 & 1\\
1 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ E_{2,2}=\left(
\begin{array}
[c]{cc}%
0 & 0\\
0 & 1
\end{array}
\right)  .
\]

\end{itemize}

Let us now look at $\mathbb{Z}$-modules. As we know from \S 2.3 (in Lecture
19), these are just abelian groups in fancy clothes, but let us see which of
them are free (as $\mathbb{Z}$-modules).

\begin{itemize}
\item Consider the $\mathbb{Z}$-submodule%
\[
U:=\left\{  \left(  a,b,c\right)  \in\mathbb{Z}^{3}\ \mid\ a+b+c=0\right\}
\text{ of }\mathbb{Z}^{3}.
\]
Is $U$ free? Can we find a basis for $U$ ?

If $\mathbb{Z}$ was a field (like $\mathbb{Q}$ or $\mathbb{R}$), then this
would be an instance of a standard problem in linear algebra: You have a
homogeneous linear equation (in our case, $a+b+c=0$), and you want to find a
basis for its solution space (which is $U$). There is a standard way to solve
such a problem (see, e.g., \cite[\S A.3.2]{LaNaSc16}) Use Gaussian elimination
to bring the matrix of the equations into row echelon form, and use the latter
to write down a basis (using free and bound variables). However, Gaussian
elimination relies crucially on the possibility of dividing by a nonzero
scalar. We can do this over a field, but not over $\mathbb{Z}$.

The good news is that in the specific case of $U$, no division is needed
(since our matrix $\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1
\end{array}
\right)  $ has only one row, and this row starts with a $1$). Thus, Gaussian
elimination does work here, and produces the basis%
\[
\left(  \left(  -1,0,1\right)  ,\ \ \left(  0,-1,1\right)  \right)  .
\]
You can check directly that this is a basis\footnote{Here is the
straightforward verification:
\par
\begin{itemize}
\item Each vector in $U$ has the form $\left(  a,b,c\right)  \in\mathbb{Z}%
^{3}$ with $a+b+c=0$, and thus can be rewritten as
\begin{align*}
\left(  a,b,c\right)   &  =\left(  a,b,-a-b\right)
\ \ \ \ \ \ \ \ \ \ \left(  \text{since }a+b+c=0\text{ entails }c=-a-b\right)
\\
&  =a\left(  1,0,-1\right)  +b\left(  0,1,-1\right) \\
&  =\left(  -a\right)  \left(  -1,0,1\right)  +\left(  -b\right)  \left(
0,-1,1\right)  ,
\end{align*}
which is visibly a $\mathbb{Z}$-linear combination of $\left(  -1,0,1\right)
$ and $\left(  0,-1,1\right)  $. Thus, the vectors $\left(  -1,0,1\right)  $
and $\left(  0,-1,1\right)  $ span $U$.
\par
\item These two vectors are furthermore $\mathbb{Z}$-linearly independent,
because if a linear combination $a\left(  -1,0,1\right)  +b\left(
0,-1,1\right)  $ is $0$, then%
\begin{align*}
a\left(  -1,0,1\right)  +b\left(  0,-1,1\right)   &  =0=\left(  0,0,0\right)
,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
\left(  -a,-b,a+b\right)   &  =\left(  0,0,0\right)
,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
-a  &  =-b=a+b=0,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
a  &  =b=0.
\end{align*}
\end{itemize}
}.

Alternatively, there are many other bases, such as%
\[
\left(  \left(  1,-1,0\right)  ,\ \ \left(  0,1,-1\right)  \right)  .
\]


Either way, you find that $U$ is free of rank $2$.

What happens for $\mathbb{Z}$-submodules of $\mathbb{Z}^{n}$ given by more
complicated systems of linear equations? Are they still free? Yes, but this
requires a more sophisticated algorithm than Gaussian elimination. See \S 7.1
in the text for this.

\item The $\mathbb{Z}$-module $\mathbb{Z}/2$ is not free. More generally: Any
free $\mathbb{Z}$-module is either trivial or infinite; thus, a nontrivial
finite abelian group can never be free as a $\mathbb{Z}$-module.

\item The $\mathbb{Z}$-module $\mathbb{Q}$ is not free. In a nutshell, this is
because $1$ vector is not enough to span $\mathbb{Q}$, but $2$ vectors already
fail to be linearly independent. (See \S 3.7.3 in the text for details.)

\item Now, consider the $\mathbb{Z}$-submodule%
\[
V:=\left\{  \left(  a,b\right)  \in\mathbb{Z}^{2}\ \mid\ a\equiv
b\operatorname{mod}2\right\}  \text{ of }\mathbb{Z}^{2}.
\]


This $\mathbb{Z}$-submodule $V$ contains the vectors $\left(  0,2\right)  $
and $\left(  1,1\right)  $ and $\left(  1,-1\right)  $ and $\left(
4,-2\right)  $ and many others. Is $V$ free? Can we find a basis for it?

We can start with the list $\left(  \left(  2,0\right)  ,\ \left(  0,2\right)
\right)  $. This list is linearly independent (why?), but does not span $V$
(why not?), so is not a basis.

How can we fix this? We can try inserting a new vector into our list, say
$\left(  1,1\right)  $. Thus, we get a list $\left(  \left(  2,0\right)
,\ \left(  0,2\right)  ,\ \left(  1,1\right)  \right)  $, which spans $V$
(why?), but is no longer linearly independent (why not?), so again is not a basis.

But let us now remove the vector $\left(  0,2\right)  $ from our list. So we
end up with the list $\left(  \left(  2,0\right)  ,\ \left(  1,1\right)
\right)  $. This list is linearly independent, because if a linear combination
$a\left(  2,0\right)  +b\left(  1,1\right)  $ is $0$, then we find%
\begin{align*}
&  a\left(  2,0\right)  +b\left(  1,1\right)
=0,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
&  \left(  2a+b,\ b\right)  =0,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
&  2a+b=0\text{ and }b=0,\ \ \ \ \ \ \ \ \ \ \text{thus}\\
&  a=b=0.
\end{align*}
Furthermore, this list $\left(  \left(  2,0\right)  ,\ \left(  1,1\right)
\right)  $ spans $V$, because if $\left(  a,b\right)  $ is any vector in $V$
(that is, any vector in $\mathbb{Z}^{2}$ that satisfies $a\equiv
b\operatorname{mod}2$), then%
\[
\left(  a,b\right)  =\underbrace{\dfrac{a-b}{2}}_{\substack{\in\mathbb{Z}%
\\\text{(since }a\equiv b\operatorname{mod}2\text{)}}}\left(  2,0\right)
+b\left(  1,1\right)  .
\]
Thus, this list $\left(  \left(  2,0\right)  ,\ \left(  1,1\right)  \right)  $
is a basis of the $\mathbb{Z}$-module $V$, so that $V$ is free of rank $2$.
Other bases of $V$ can easily be found (for example, $\left(  \left(
1,1\right)  ,\ \left(  1,-1\right)  \right)  $).

\item More examples can be found in \S 3.7.3 in the text.
\end{itemize}

\bigskip

Now, let us return to the general case to state a few theorems:

\begin{theorem}
Let $M$ be a left $R$-module. Let $n\in\mathbb{N}$. The left $R$-module $M$ is
free of rank $n$ if and only if $M\cong R^{n}$ (as left $R$-modules).
\end{theorem}

More concretely, a basis of $M$ that consists of $n$ vectors will always
produce an isomorphism from $R^{n}$ to $M$ according to the following method:

\begin{theorem}
Let $M$ be a left $R$-module. Let $m_{1},m_{2},\ldots,m_{n}$ be $n$ vectors in
$M$. Consider the map%
\begin{align*}
f:R^{n}  &  \rightarrow M,\\
\left(  r_{1},r_{2},\ldots,r_{n}\right)   &  \mapsto r_{1}m_{1}+r_{2}%
m_{2}+\cdots+r_{n}m_{n}.
\end{align*}
Then:

\textbf{(a)} This map $f$ is always a left $R$-module morphism.

\textbf{(b)} This map $f$ is injective if and only if $m_{1},m_{2}%
,\ldots,m_{n}$ are linearly independent.

\textbf{(c)} This map $f$ is surjective if and only if $m_{1},m_{2}%
,\ldots,m_{n}$ span $M$.

\textbf{(d)} This map $f$ is an isomorphism (of left $R$-modules) if and only
if $\left(  m_{1},m_{2},\ldots,m_{n}\right)  $ is a basis of $M$.
\end{theorem}

This can be generalized from $R^{n}$ to $R^{\left(  I\right)  }$ for arbitrary
sets $I$:

\begin{theorem}
Let $M$ be a left $R$-module. Let $\left(  m_{i}\right)  _{i\in I}$ be a
family of vectors in $M$. Consider the map%
\begin{align*}
f:R^{\left(  I\right)  }  &  \rightarrow M,\\
\left(  r_{i}\right)  _{i\in I}  &  \mapsto\sum_{i\in I}r_{i}m_{i}.
\end{align*}
(This is well-defined, because $\left(  r_{i}\right)  _{i\in I}\in R^{\left(
I\right)  }$ ensures that the sum $\sum_{i\in I}r_{i}m_{i}$ has only finitely
many nonzero addends.)

Then:

\textbf{(a)} This map $f$ is always a left $R$-module morphism.

\textbf{(b)} This map $f$ is injective if and only if $\left(  m_{i}\right)
_{i\in I}$ is linearly independent.

\textbf{(c)} This map $f$ is surjective if and only if $\left(  m_{i}\right)
_{i\in I}$ spans $M$.

\textbf{(d)} This map $f$ is an isomorphism (of left $R$-modules) if and only
if $\left(  m_{i}\right)  _{i\in I}$ is a basis of $M$.
\end{theorem}

Proofs of these three theorems can be found in \S 3.7.3 of the text. None of
them is hard.

\begin{remark}
Can a left $R$-module be free of two different ranks at the same time? In
other words, can $R^{n}$ be isomorphic to $R^{m}$ as left $R$-modules for two
different integers $n$ and $m$?

The answer is \textquotedblleft yes\textquotedblright\ for a stupid reason: If
$R$ is a trivial ring, then any $R$-module is free of any rank (and is
trivial), and we have $R^{0}\cong R^{1}\cong R^{2}\cong\cdots$.

If we ignore trivial rings for a moment, the answer is still \textquotedblleft
yes\textquotedblright: For instance, \cite[\S 10.3, exercise 27]{DumFoo04}
constructs a ring $R$ over which $R^{n}\cong R$ as left $R$-modules for each
$n\in\left\{  1,2,3,\ldots\right\}  $ (so that $R$ itself is a free $R$-module
of rank $n$ for each $n\in\left\{  1,2,3,\ldots\right\}  $).

However, if $R$ is a \textbf{nontrivial commutative} ring, then the answer is
\textquotedblleft no\textquotedblright. In this case, the $R$-modules
$R^{0},R^{1},R^{2},\ldots$ are mutually non-isomorphic, so that a free
$R$-module can never have two different ranks at the same time. This is not
obvious at all (see \cite[\S 10.3, exercise 2]{DumFoo04}). We can actually say
more: If $R$ is a nontrivial commutative ring, then an $R$-module morphism
$R^{m}\rightarrow R^{n}$ cannot be injective unless $m\leq n$ (see, e.g.,
\url{https://math.stackexchange.com/questions/106786} ), and cannot be
surjective unless $m\geq n$ (see, e.g.,
\url{https://math.stackexchange.com/questions/20178} ). These facts are in
line with the intuition you should have from linear algebra (injective maps
cannot quash dimensions; surjective maps cannot create dimensions) and also
with the Pigeonhole Principles from combinatorics (a map between two finite
sets $M$ and $N$ cannot be injective unless $\left\vert M\right\vert
\leq\left\vert N\right\vert $, and cannot be surjective unless $\left\vert
M\right\vert \geq\left\vert N\right\vert $). But actually proving them takes
real work.
\end{remark}

\subsection{The universal property of a free module}

As before, fix a ring $R$.

Recall that $R$-linear maps (that is, $R$-module morphisms) respect addition,
scaling and zero. Thus, they also respect linear combinations (in the sense
that if you apply a linear map to a linear combination of some vectors, then
you get the analogous linear combination of their images):

\begin{proposition}
\label{prop.mods.lin-map-pres-lc}Let $M$ and $P$ be two left $R$-modules. Let
$f:M\rightarrow P$ be an $R$-linear map. Let $\left(  m_{i}\right)  _{i\in I}$
be a family of vectors in $M$, and let $\left(  r_{i}\right)  _{i\in I}\in
R^{\left(  I\right)  }$ be a family of scalars. Then,%
\[
f\left(  \sum_{i\in I}r_{i}m_{i}\right)  =\sum_{i\in I}r_{i}f\left(
m_{i}\right)  .
\]

\end{proposition}

\begin{proof}
This is easy if the set $I$ is finite. For example, if $I=\left\{
1,2,3\right\}  $, then this is saying that
\[
f\left(  r_{1}m_{1}+r_{2}m_{2}+r_{3}m_{3}\right)  =r_{1}f\left(  m_{1}\right)
+r_{2}f\left(  m_{2}\right)  +r_{3}f\left(  m_{3}\right)  ,
\]
and this can be proved as follows:%
\begin{align*}
&  f\left(  r_{1}m_{1}+r_{2}m_{2}+r_{3}m_{3}\right) \\
&  =f\left(  r_{1}m_{1}\right)  +f\left(  r_{2}m_{2}+r_{3}m_{3}\right)
\ \ \ \ \ \ \ \ \ \ \left(  \text{since }f\text{ respects addition}\right) \\
&  =f\left(  r_{1}m_{1}\right)  +f\left(  r_{2}m_{2}\right)  +f\left(
r_{3}m_{3}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }f\text{ respects
addition}\right) \\
&  =r_{1}f\left(  m_{1}\right)  +r_{2}f\left(  m_{2}\right)  +r_{3}f\left(
m_{3}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }f\text{ respects
scaling}\right)  .
\end{align*}
The case of an arbitrary finite set $I$ is similar (for a rigorous proof,
induct on $\left\vert I\right\vert $).

The general case (i.e., when $I$ is not necessarily finite) can be reduced to
the finite case by observing that only finitely many $i\in I$ satisfy
$r_{i}\neq0$ (since $\left(  r_{i}\right)  _{i\in I}\in R^{\left(  I\right)
}$). See the proof of Proposition 3.8.1 in the text for details.
\end{proof}

Now we shall state the \textbf{universal property of free modules}. This
property provides an easy way to construct linear maps out of free modules
(just like the universal property of quotient rings provides an easy way to
construct ring morphisms out of quotient rings). Indeed, if $M$ is a module
with a basis $\left(  m_{i}\right)  _{i\in I}$, and you want to define a
linear map $f$ out of $M$, then it suffices to specify the values $f\left(
m_{i}\right)  $ of the map on each vector of the basis. These values can be
specified arbitrarily; each possible specification yields a unique linear map
$f$. The universal property of free modules is just putting this in formal words:

\begin{theorem}
[Universal property of free modules]\label{thm.mods.uniprop-free-1}Let $M$ be
a free left $R$-module with basis $\left(  m_{i}\right)  _{i\in I}$. Let $P$
be a further left $R$-module (free or not). Let $p_{i}\in P$ be a vector for
each $i\in I$. Then, there exists a \textbf{unique} $R$-linear map
$f:M\rightarrow P$ such that%
\begin{equation}
\text{each }i\in I\text{ satisfies }f\left(  m_{i}\right)  =p_{i}.
\label{eq.thm.mods.uniprop-free-1.fmi}%
\end{equation}
Explicitly, this map is given by%
\begin{equation}
f\left(  \sum_{i\in I}r_{i}m_{i}\right)  =\sum_{i\in I}r_{i}p_{i}%
\ \ \ \ \ \ \ \ \ \ \text{for all }\left(  r_{i}\right)  _{i\in I}\in
R^{\left(  I\right)  }. \label{eq.thm.mods.uniprop-free-1.expl}%
\end{equation}

\end{theorem}

This theorem says that if you want to construct a linear map $f$ out of a free
$R$-module $M$ with a given basis $\left(  m_{i}\right)  _{i\in I}$, you only
need to specify the images $f\left(  m_{i}\right)  $ of the basis vectors
$m_{i}$. Once you have specified those images, the linearity of $f$ will
automatically determine all other values of $f$, thus defining the map uniquely.

For instance, recall that the $R$-module $R^{3}$ has standard basis $\left(
e_{1},e_{2},e_{3}\right)  $. Thus, if you want to construct a linear map $f$
from $R^{3}$ to another $R$-module $P$, you only need to specify $f\left(
e_{1}\right)  ,\ f\left(  e_{2}\right)  ,\ f\left(  e_{3}\right)  $. Once you
have done this, the linearity of $f$ will ensure that%
\[
f\left(  r_{1}e_{1}+r_{2}e_{2}+r_{3}e_{3}\right)  =r_{1}f\left(  e_{1}\right)
+r_{2}f\left(  e_{2}\right)  +r_{3}f\left(  e_{3}\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }r_{1},r_{2},r_{3}\in R,
\]
and this uniquely determines $f$ because any vector in $R^{3}$ can be uniquely
written as a linear combination $r_{1}e_{1}+r_{2}e_{2}+r_{3}e_{3}$ of
$e_{1},e_{2},e_{3}$.

\begin{proof}
[Proof of Theorem \ref{thm.mods.uniprop-free-1}.]The family $\left(
m_{i}\right)  _{i\in I}$ is a basis of $M$. Thus, by Proposition 2.5.4
\textbf{(c)} in Lecture 20, we know that each vector $v\in M$ can be written
as an $R$-linear combination of $\left(  m_{i}\right)  _{i\in I}$ in
\textbf{exactly one} way. In other words, each $v\in M$ can be written in the
form $v=\sum_{i\in I}r_{i}m_{i}$ for a \textbf{unique} family $\left(
r_{i}\right)  _{i\in I}\in R^{\left(  I\right)  }$ of scalars. Thus, the
equality (\ref{eq.thm.mods.uniprop-free-1.expl}) uniquely defines a map
$f:M\rightarrow P$. Furthermore, the map $f$ defined by this equality is
easily seen to be $R$-linear and to satisfy $f\left(  m_{i}\right)  =p_{i}$
for each $i\in I$. Thus, we have proved that there exists an $R$-linear map
$f:M\rightarrow P$ that satisfies (\ref{eq.thm.mods.uniprop-free-1.fmi}), and
that this map is explicitly given by (\ref{eq.thm.mods.uniprop-free-1.expl}).

It remains to show that this map is the \textbf{only} $R$-linear map
$f:M\rightarrow P$ that satisfies (\ref{eq.thm.mods.uniprop-free-1.fmi}). But
this is again easy: If $f:M\rightarrow P$ is any $R$-linear map satisfying
(\ref{eq.thm.mods.uniprop-free-1.fmi}), then Proposition
\ref{prop.mods.lin-map-pres-lc} yields%
\[
f\left(  \sum_{i\in I}r_{i}m_{i}\right)  =\sum_{i\in I}r_{i}%
\underbrace{f\left(  m_{i}\right)  }_{\substack{=p_{i}\\\text{(by
(\ref{eq.thm.mods.uniprop-free-1.fmi}))}}}=\sum_{i\in I}r_{i}p_{i}%
\ \ \ \ \ \ \ \ \ \ \text{for all }\left(  r_{i}\right)  _{i\in I}\in
R^{\left(  I\right)  },
\]
and thus our map $f$ must be identical to the map $f$ defined by
(\ref{eq.thm.mods.uniprop-free-1.expl}). Thus, uniqueness follows. This
completes the proof of Theorem \ref{thm.mods.uniprop-free-1}.
\end{proof}

We note that the uniqueness part of Theorem \ref{thm.mods.uniprop-free-1}
(i.e., the part claiming that $f$ is unique) is true under a weaker
assumption: It suffices to require that the family $\left(  m_{i}\right)
_{i\in I}$ spans $M$ (as opposed to being a basis of $M$). This is a useful
(if easy) fact, so we state it as a theorem:

\begin{theorem}
[Linear maps are determined on a spanning set]\label{thm.mods.linmap-unidef-1}%
Let $M$ be a left $R$-module. Let $\left(  m_{i}\right)  _{i\in I}$ be a
family of vectors in $M$ that spans $M$. Let $P$ be a further left $R$-module.
Let $f,g:M\rightarrow P$ be two $R$-linear maps such that
\[
\text{each }i\in I\text{ satisfies }f\left(  m_{i}\right)  =g\left(
m_{i}\right)  .
\]
Then, $f=g$.
\end{theorem}

This theorem is often used to prove that two linear maps are equal.

\begin{proof}
[Proof of Theorem \ref{thm.mods.linmap-unidef-1}.]Let $v\in M$. Then, $v$ can
be written as an $R$-linear combination of $\left(  m_{i}\right)  _{i\in I}$
(since the family $\left(  m_{i}\right)  _{i\in I}$ spans $M$). In other
words, $v=\sum_{i\in I}r_{i}m_{i}$ for some family $\left(  r_{i}\right)
_{i\in I}\in R^{\left(  I\right)  }$ of scalars. Consider this family. Now,
from $v=\sum_{i\in I}r_{i}m_{i}$, we obtain%
\[
f\left(  v\right)  =f\left(  \sum_{i\in I}r_{i}m_{i}\right)  =\sum_{i\in
I}r_{i}f\left(  m_{i}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{by Proposition
\ref{prop.mods.lin-map-pres-lc}}\right)
\]
and similarly%
\[
g\left(  v\right)  =\sum_{i\in I}r_{i}g\left(  m_{i}\right)  .
\]
The right hand sides of these two equalities are equal (since we assumed that
each $i\in I$ satisfies $f\left(  m_{i}\right)  =g\left(  m_{i}\right)  $).
Hence, their left hand sides must be equal as well. In other words, $f\left(
v\right)  =g\left(  v\right)  $. Since we have proved this for every $v\in M$,
we thus conclude that $f=g$.
\end{proof}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[DumFoo04]{DumFoo04}David S. Dummit, Richard M. Foote,
\textit{Abstract Algebra}, 3rd edition, Wiley 2004.\newline See
\url{https://site.uvm.edu/rfoote/files/2022/06/errata_3rd_edition.pdf} for errata.

\bibitem[LaNaSc16]{LaNaSc16}Isaiah Lankham, Bruno Nachtergaele, Anne
Schilling, \textit{Linear Algebra As an Introduction to Abstract Mathematics},
2016.\newline\url{https://www.math.ucdavis.edu/~anne/linear_algebra/mat67_course_notes.pdf}
\end{thebibliography}


\end{document}