\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 Monday, Week 2}
\bigskip

\centerline{Algebraic numbers}
\bigskip

\begin{defn}
  The set of \emph{algebraic numbers} is
  \[
    \mathbb{A}:=\{\alpha\in \C: \text{$\alpha$ is algebraic over $\Q$}\}.
  \]
\end{defn}

\begin{eg}
  Note that if $a\in\Q$, then~$a$ is a zero of the polynomial $x-a\in\Q[x]$.
  Hence, $\Q\subset \mathbb{A}$.  Other algebraic numbers in
  include~$\sqrt{2}$,~$\sqrt[3]{5}$, and the complex $n$-roots of unity, $e^{2k\pi
  i/n}$ for $n\geq1$ and $k=0,\ldots,n$.  These are the solutions to $x^{n}-1$.
  Non-algebraic numbers are called \emph{transcendental} numbers and include $e$
  and $\pi$, for example.
\end{eg}

\begin{prop}
  $\mathbb{A}$ is a field.
\end{prop}
\begin{proof}
  It suffices to show that $\mathbb{A}$ is closed under addition and
  multiplication and that every nonzero element of $\mathbb{A}$ has a
  multiplicative inverse.  

  Let $\alpha,\beta\in \mathbb{A}$.  Since~$\alpha$ is algebraic over~$\Q$, we
  saw in the last lecture that $[\Q(\alpha)\mathbin{:}\Q]$ is finite.  Further,
  since~$\beta$ is algebraic over $\Q$, there is a polynomial $p$ with
  coefficients in $\Q$ such that~$p(\beta)=0$.  Regarding $p$ as an element of
  $\Q(\alpha)[x]$, shows that $\beta$ is algebraic over $\Q(\alpha)$.
  Therefore, $[\Q(\alpha,\beta)\mathbin{:}\Q(\alpha)]$ is finite.  It follows
  that
  \[
    [\Q(\alpha,\beta)\mathbin{:}\Q]=[\Q(\alpha,\beta)\mathbin{:}\Q(\alpha)][\Q(\alpha),\Q]<\infty.
  \]
  Since $[\Q(\alpha,\beta)\mathbin{:}\Q]<\infty$, every element of
  $\Q(\alpha,\beta)$ is in $\mathbb{A}$.  In particular, $\alpha+\beta$ and
  $\alpha \beta$ are algebraic numbers, and if $\alpha\neq0$, then $\alpha^{-1}$
  is an algebraic number.
\end{proof}

\begin{defn}
  A \emph{number field} is a subfield $K\subseteq\C$ such that
  $[K\mathbin{:}\Q]<\infty$.
\end{defn}

\begin{thm} (Primitive element theorem)
  If $K$ is a number field, then there exists an algebraic number $\theta$ such 
  that $K=\Q(\theta)$.
\end{thm}
\begin{proof}
  See our text, Theorem~2.2.
\end{proof}

Our next goal is to fill in the box in the following diagram:
\begin{center}
  \begin{tikzpicture}
    \node at (0,0) (q) {$\Q$};
    \node at (1,0) (z) {$\Z$};
    \node at (0,1) (k) {$K$};
    \draw (0.75,0.75) rectangle (1.25,1.25);
    \draw (q)--(k);
    \draw (q)--(z);
    \draw (z)--(1,0.65);
    \draw (k)--(0.65,1);
    \node at (1.4,-0.1) {.};
  \end{tikzpicture}
\end{center}
In other words, we want to find a ring inside of $K$ that plays the role of the
ring of integers inside $\Q$.  It will help to first discuss
an algebraic structure called a \emph{module}.
\bigskip

\textbf{Modules.} Roughly, a module is a vector space except that the scalars
are elements of a ring rather than a field.

\begin{defn}
 Let $R$ be a ring.  An \emph{$R$-module} or \emph{module over~$R$} is an
 abelian group~$M$ and an operation
 \begin{align*}
   R\times M&\to M\\
   (r,m)&\mapsto rm
 \end{align*}
\end{defn}
such that for all~$r,s\in R$ and $m,n\in M$
\begin{itemize}
  \item \ $(r+s)m=rm+sm$,
  \item \ $r(m+n)=rm+rn$,
  \item \ $r(sm)=(rs)m$, and
  \item \ $1\cdot m=m$.
\end{itemize}

\begin{eg}\ 
  \begin{enumerate}[label=(\alph*)]
    \item If $R$ is a field, then $R$-modules are exactly vector spaces
      over~$R$.
    \item $\Z/n\Z$ is a $\Z$ module (if $a\in \Z$ and $\overline{b}\in \Z/n\Z$,
      then $a\overline{b}:=\overline{ab}\in \Z/n\Z$).
    \item Let $R$ be a ring, and let $n$ be a positive integer.  Define 
      \[
	R^{n}:=\{(r_{1},\ldots,r_{n}):r_{i}\in R\},
      \]
      the Cartesian product of $R$ with itself $n$ times.  Then~$R^{n}$ is an
      $R$-module via
      \begin{align*}
	r(r_{1},\ldots,r_{n})&:= (r r_{1},\ldots,r r_{n})\\
	(r_{1},\ldots,r_{n})+(s_{1},\ldots,s_{n})&:=(r_{1}+s_{1},\ldots,r_{n}+s_{n})
      \end{align*}
      for all $r\in R$ and $(r_{1},\ldots,r_{n}), (s_{1},\ldots,s_{n})\in R^{n}$.
      Letting $n=1$, we see that $R$ is, itself, and $R$-module.  Finally,
      define~$R^{0}=\{0\}$, the \emph{trivial} $R$-module.
    \item If~$R$ is a ring, then the ring of polynomials $R[x]$ is an
      $R$-module.  For example, $\Z[x]$ is a $\Z$-module.  Similarly, any
      polynomial ring in several variables over $R$ is an $R$-module.  For
      example, $\Z[x,y,z]$ is a $\Z$-module.
    \item If $G$ is an abelian group, then $G$ is a $\Z$-module as follows: If
      $g\in G$ and $n\in\Z_{>0}$, define
      \[
	ng=\underbrace{g+\cdots+g}_{n-\mathrm{times}}.
      \]
      It $n\in\Z_{<0}$, define $ng=(-n)(-g)$, and finally, for $0\in\Z$,
      define~$0g=0$, where the second~$0$ is the additive identity for~$G$.
    \item (\textbf{Important}) If $R$ is a ring, then an $R$-ideal is exactly a
      subset~$I$ of~$R$ such that~$I$ is an $R$-module with the natural
      operation: if $r\in R$ and $i\in I$, then $ri$ is just multiplication in
      $R$.  We could have defined the notion of an ideal in this way if we had
      the language of modules earlier.
  \end{enumerate}
\end{eg}

\begin{defn}
 An $R$-module~$M$ is \emph{generated by}  $X\subseteq M$ if each $m\in M$ is a
 finite $R$-linear combination of elements of $X$, i.e., if for all $m\in M$,
 we can write
 \[
   m = \sum_{x\in X} r_{x}x
 \]
 where each $r_{x}$ is an element of~$R$ and $r_{x}=0$ for all but finitely
 many~$x$. If $M$ is generated by $X$, we write
 \[
   M =\sum_{x\in X}Rx.
 \]
 We say~$M$ is \emph{finitely generated} if it is generated by a finite set.
\end{defn}

\begin{defn}
 A \emph{basis} for an $R$-module~$M$ is a subset $B\subseteq M$ such that every
 element of $M$ can be written \emph{uniquely} as a finite $R$-linear combination of
 $B$.  (Equivalently, $B$ is $R$-linearly independent and spans $M$.)
 A \emph{free} $R$-module is an $R$-module with a basis.
\end{defn}

\begin{eg}
  Unlike vector spaces, modules do not necessarily have bases.  For example, 
  $\Z$-module $\Z/5\Z$ has no basis. To see this, let $B$ be any subset of $\Z/5\Z$.
  If~$B=\emptyset$ or $B=\{0\}$, then~$\Span_{\Z}B=\{\overline{0}\}$, and hence $B$ does not
  span.  Otherwise, let~$x\in B$ with~$x\neq0$.  Since~$5$ is a nonzero element of~$\Z$, we
  have the nontrivial $\Z$-linear relation~$5\cdot x=\overline{0}$.  So $B$ is
  not linearly independent.
\end{eg}

\begin{defn}
 A \emph{homomorphism} of $R$-modules $M$ and $N$ is a mapping $\phi\colon M\to
 N$ that preserves addition and scalar multiplication, i.e., for all $u,v\in M$
 and $r\in R$:
 \begin{align*}
   \phi(u+v)&=\phi(u)+\phi(v)\\
   \phi(ru)&=r\phi(u).
 \end{align*}
A homomorphism is an \emph{isomorphism} if it is bijective (in which case, the
inverse is a homomorphism (exercise!)).  The \emph{kernel} of a
homomorphism~$\phi$ is
\[
  \ker(\phi):=\phi^{-1}(0):=\{m\in M: \phi(m)=0\},
\]
and the \emph{image} is 
\[
  \im(\phi):=\phi(M):=\{\phi(m):m\in M\}.
\]
\end{defn}

\begin{ex}
  Show that an $R$-module homomorphism $\phi\colon M\to N$ is injective if and
  only if $\ker(\phi)=0$.
\end{ex}

\begin{defn}
 A \emph{submodule} of an $R$-module $M$ is a subset $N\subseteq M$ that is
 itself an $R$-module (under the operations inherited from $M$).
 (Exercise: $N$ is a submodule if and only if it is nonempty and closed under addition and
 scalar multiplication).
\end{defn}

\begin{defn}
 Let $M$ be an $R$-module with submodule $N$.  The \emph{quotient module} $M/N$
 is the set of \emph{cosets}
 \[
   m+N:=\{m+n: n\in N\}
 \]
 with addition and scalar multiplication defined by
 \[
   (m+N)+(m'+N):=(m+m')+N\quad\text{and}\quad r(m+N):=(rm)+N
 \]
 for all $m,m'\in M$ and $r\in R$.  (Exercise: these operations are
 well-defined and under them, $M/N$ is an $R$-module.)
\end{defn}

\begin{remark}
  As usual, we can think of the quotient module~$M/N$ as the module $M$ except
  that elements of $N$ are set equal to $0$.  Also, as usual, we could have
  defined $M/N$ as the set of equivalence classes under the equivalence $m\sim
  m'$ if~$m$ and~$m'$ differ be an element of $N$, i.e., $m-m'\in N$.
\end{remark}

\begin{eg}
  Some examples of $\Z$-modules (all but the first are finitely-generated):
  \begin{align*}
    \Z[x]&\quad\text{generating set:} \{1,x,x^2,\ldots\}\\
    \Z[i]&\quad\text{generating set:} \{1,i\}\\
    \Z&\quad\text{generating set:} \{1\}\\
    \Z[x,y]/(x^{2},y^{2})&\quad\text{generating set:} \{1,x,y,xy\}.
  \end{align*}
  In the final example, $(x^2, y^2)$ is the ideal ($\Z$-submodule) of $\Z[x,y]$
  generated by $x^2$ and~$y^2$:
  \[
    (x^2, y^2)=\{a x^2+ b y^2:a,b\in\Z[x,y]\}.
  \]
  Modding out by this ideal sets $x^2=y^2=0$ in $\Z[x,y]$.  So, for instance, in
  $\Z[x,y]/(x^2,y^2)$, we have 
  \[
    1+2x+3y+4x^2+5xy+6y^2+7x^{3}+8x y^3= 1+2x+3y+5xy.
  \]
  since~$x^2,y^2, x^3$ and~$xy^3$ are in the ideal $(x^2,y^2)$.
\end{eg}

\begin{prop}
  A finitely-generated $R$-module $M$ is free if and only if it is isomorphic to
  $R^{n}$ for some $n\geq 0$.
\end{prop}
\begin{proof}
 Suppose $M$ has basis $B=\{b_{1},\ldots,b_{n}\}$.  Then we get an
 isomorphism $\phi\colon M\to R^{n}$ determined by letting $\phi(b_{i})=e_{i}$
 and extending linearly, i.e.,
 \[
\phi(\textstyle\sum_{i=1}^{n} r_i
b_{i}):=\sum_{i=1}^{n}r_{i}\phi(b_{i})=\sum_{i=1}^{n}r_{i}e_{i}=(r_{1},\ldots,r_{n})\in
R^{n}.
 \]
 Here, $e_{i}$ is the $i$-th standard basis vector of $R^{n}$, i.e.,
 $e_{i}$ is the vector whose components are all~$0$ except its $i$-th component,
 which is~$1$.

 Since $B$ spans~$M$, we have thus defined~$\phi(m)$ for every element $m\in M$.
 Not that $\phi(m)$, as defined, depends upon how we express $m$ as a linear
 combination of $B$.  However, since $B$ is a basis, this linear combination is
 unique.  So $\phi$ is well-defined.

 Conversely, suppose that $\phi\colon M\to R^{n}$ is an isomorphism.  For
 $i=1,\ldots,n$, define~$b_{i}=\phi^{-1}(e_{i})$.  Then it is straightforward to
 check that~$\{b_{1},\ldots,b_{n}\}$ is a basis for~$M$, and hence,~$M$ is free.
\end{proof}

\begin{eg}
  We have the $\Z$-module isomorphism
  \begin{align*}
   \Z[i]&\to \Z^{2}\\
    a+bi&\mapsto (a,b),
  \end{align*}
  determined by $1\mapsto (1,0)$ and $i\mapsto(0,1)$.
\end{eg}
\end{document}
