\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage{amsfonts}
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{wasysym}
\usepackage{graphicx}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Thursday, December 05, 2019 09:45:29}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows}
\newcounter{exer}
\newcounter{exera}
\numberwithin{exer}{subsection}
\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{conclusion}[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{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{teachingnote}[1][Teaching note]{\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}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\voffset=0cm
\hoffset=-0.7cm
\setlength\textheight{22.5cm}
\setlength\textwidth{15.5cm}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\newenvironment{teachingnote}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\excludecomment{teachingnote}
\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{\id}{\operatorname{id}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\rev}{\operatorname{rev}}
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
\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{\lf}[2]{#1^{\underline{#2}}}
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\newcommand{\nnn}{\nonumber\\}
\newcommand{\sslash}{\mathbin{/\mkern-6mu/}}
\allowdisplaybreaks
\iffalse
\UNEXPAND{\today}{\today}
\fi
\ihead{Fall 2019 Math 201-003 at Drexel: blackboard notes of 2019-11-18}
\ohead{page \thepage}
\cfoot{}
\begin{document}

\title{Fall 2019 Math 201-003 at Drexel: blackboard notes of 2019-11-18}
\author{Darij Grinberg}
\date{\today}
\maketitle

\section{Vector spaces}

Let us generalize what we have done so far. We have worked with matrices
(including column vectors and row vectors). We have used \textquotedblleft
scalars\textquotedblright\ (i.e., numbers that we could put into a matrix) and
\textquotedblleft vectors\textquotedblright\ (i.e., things formed out of
scalars, but more importantly, things that could be added to each other and
scaled by scalars). We will now extend both of these notions.

\subsection{Fields}

Let us first generalize the notion of a \textquotedblleft
scalar\textquotedblright.

We have mostly been using real numbers as scalars, but later said that complex
numbers also work. In practice, we have been using rational numbers as much as
possible, and algebraic numbers\footnote{What are algebraic numbers?
\textbf{Algebraic numbers} are complex numbers that can be expressed as roots
of nonzero polynomials with rational coefficients. For example,
\par
\begin{itemize}
\item $\sqrt{2}$ is algebraic, since it is a root of $t^{2}-2$;
\par
\item $\sqrt{3}$ is algebraic, since it is a root of $t^{2}-3$;
\par
\item $\sqrt[3]{2}$ is algebraic, since it is a root of $t^{3}-2$;
\par
\item $\sqrt{2}+\sqrt{3}$ is algebraic, since it is a root of $t^{4}%
-10t^{2}+1$;
\par
\item the imaginary unit $i$ is algebraic, since it is a root of $t^{2}+1$;
\par
\item etc.
\end{itemize}
\par
The advantage of algebraic numbers (compared to arbitrary complex numbers) is
that you can calculate with them precisely, whereas true complex numbers can
only be approximated. This is why (almost) all of our examples have used
algebraic numbers only. Computers don't understand real numbers either, so
they also use algebraic numbers or some kind of approximation.} as a last resort.

We also have secretly used matrices whose entries are polynomials. Indeed, our
matrix $A-tI_{n}$ (which we used when defining the characteristic polynomial)
was such a matrix. So we (silently) stretched our notion of \textquotedblleft
scalar\textquotedblright\ so that it also encompassed polynomials. What else
do we want it to encompass?

The short answer is \textquotedblleft too much to list\textquotedblright. We
don't want to restrict ourselves to a list of specific things that we allow as
scalars. Instead, we will formulate some requirements that scalars should
satisfy, and we shall allow any kind of objects that satisfy these
requirements to be considered \textquotedblleft scalars\textquotedblright.
Clearly, some requirements are necessary; for example, there has to be a way
to add and multiply our \textquotedblleft scalars\textquotedblright, because
we want to be able to add and multiply matrices.

Our new, generalized meaning of \textquotedblleft scalar\textquotedblright%
\ (or \textquotedblleft number\textquotedblright, which -- for our purposes --
is a synonym)\ is going to depend on the context. You can come up with your
custom type of scalars, as long as you can guarantee that they satisfy our requirements.

So what exactly do we want to require from our scalars in order to be able to
put them into matrices (and have these matrices behave well)? We want them to
belong to a \textbf{commutative ring}:

\begin{definition}
\label{def.vs.commring}A \textbf{commutative ring} means a set $\mathbb{K}$
equipped with the following additional data:

\begin{itemize}
\item a binary operation called \textquotedblleft$+$\textquotedblright\ (that
is, a function that takes two elements $a\in\mathbb{K}$ and $b\in\mathbb{K}$
as inputs, and outputs a new element of $\mathbb{K}$ which is denoted by $a+b$);

\item a binary operation called \textquotedblleft$\cdot$\textquotedblright%
\ (that is, a function that takes two elements $a\in\mathbb{K}$ and
$b\in\mathbb{K}$ as inputs, and outputs a new element of $\mathbb{K}$ which is
denoted by $a\cdot b$ or $ab$);

\item an element of $\mathbb{K}$ called \textquotedblleft$0$\textquotedblright%
\ (this may or may not be the integer $0$);

\item an element of $\mathbb{K}$ called \textquotedblleft$1$\textquotedblright%
\ (this may or may not be the integer $1$)
\end{itemize}

\noindent satisfying the following axioms (= requirements):

\begin{itemize}
\item \textbf{Commutativity of addition:} We have $a+b=b+a$ for all
$a,b\in\mathbb{K}$.

\item \textbf{Commutativity of multiplication:} We have $ab=ba$ for all
$a,b\in\mathbb{K}$.

\item \textbf{Associativity of addition:} We have $a+\left(  b+c\right)
=\left(  a+b\right)  +c$ for all $a,b,c\in\mathbb{K}$.

\item \textbf{Associativity of multiplication:} We have $a\left(  bc\right)
=\left(  ab\right)  c$ for all $a,b,c\in\mathbb{K}$.

\item \textbf{Neutrality of }$0$\textbf{:} We have $a+0=0+a=a$ for all
$a\in\mathbb{K}$.

\item \textbf{Existence of additive inverses:} For each $a\in\mathbb{K}$,
there exists an element $a^{\prime}\in\mathbb{K}$ such that $a+a^{\prime
}=a^{\prime}+a=0$. This $a^{\prime}$ is commonly denoted by $-a$, and called
the \textbf{negative} (or the \textbf{additive inverse}) of $a$. (It is easy
to check that it is unique.)

\item \textbf{Unitality (a.k.a. neutrality of }$1$\textbf{):} We have
$a\cdot1=1\cdot a=a$ for all $a\in\mathbb{K}$.

\item \textbf{Annihilation:} We have $a\cdot0=0\cdot a=0$ for all
$a\in\mathbb{K}$.

\item \textbf{Distributivity:} We have $a\left(  b+c\right)  =ab+ac$ and
$\left(  a+b\right)  c=ac+bc$ for all $a,b,c\in\mathbb{K}$.
\end{itemize}

\noindent If $\mathbb{K}$ (equipped with $+$, $\cdot$, $0$ and $1$) is a
commutative ring, then we refer to the operation $+$ as the \textbf{addition}
of $\mathbb{K}$; we refer to the operation $\cdot$ as the
\textbf{multiplication} of $\mathbb{K}$; we refer to the element $0$ as the
\textbf{zero} of $\mathbb{K}$; we refer to the element $1$ as the
\textbf{unity} (or, somewhat confusingly, \textbf{one}) of $\mathbb{K}$.
\end{definition}

This definition was a mouthful, but its intention is rather simple: It defines
a commutative ring to be a set equipped with two operations which
\textbf{behave like }addition and mulitplication of numbers, and two elements
which \textbf{behave like} the number $0$ and the number $1$. They don't
\textbf{have} to be addition and multiplication of numbers, but the axioms we
imposed force them to behave similarly enough that we can try to do with them
whatever we can do with numbers.

As a consequence, if $\mathbb{K}$ is a commutative ring, then matrices filled
with elements of $\mathbb{K}$ will behave like matrices filled with numbers,
at least as far as very basic properties are concerned.

Here are some examples of commutative rings:

\begin{itemize}
\item Each of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and
$\mathbb{C}$ (endowed with the usual addition, the usual multiplication, the
usual $0$ and the usual $1$) is a commutative ring.

\item The set of all polynomials in a single variable $x$ with real
coefficients is also a commutative ring.

\item The set of all functions from $\mathbb{R}$ to $\mathbb{R}$ (equipped
with pointwise addition\footnote{\textquotedblleft Pointwise
addition\textquotedblright\ means that the sum $f+g$ of two functions
$f,g:\mathbb{R}\rightarrow\mathbb{R}$ is defined by%
\[
\left(  f+g\right)  \left(  x\right)  =f\left(  x\right)  +g\left(  x\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }x\in\mathbb{R}.
\]
In other words, each value of the function $f+g$ is the sum of the
corresponding values of $f$ and $g$.}, pointwise
multiplication\footnote{\textquotedblleft Pointwise
multiplication\textquotedblright\ means that the product $f\cdot g$ of two
functions $f,g:\mathbb{R}\rightarrow\mathbb{R}$ is defined by%
\[
\left(  f\cdot g\right)  \left(  x\right)  =f\left(  x\right)  \cdot g\left(
x\right)  \ \ \ \ \ \ \ \ \ \ \text{for all }x\in\mathbb{R}.
\]
In other words, each value of the function $f\cdot g$ is the product of the
corresponding values of $f$ and $g$.}, the constant-$0$
function\footnote{i.e., the function%
\[
\mathbb{R}\rightarrow\mathbb{R},\ \ \ \ \ \ \ \ \ \ x\mapsto0
\]
} and the constant-$1$ function\footnote{i.e., the function%
\[
\mathbb{R}\rightarrow\mathbb{R},\ \ \ \ \ \ \ \ \ \ x\mapsto1
\]
}) is a commutative ring.

\item The set $\mathbb{R}^{2\times2}$ of $2\times2$-matrices with real entries
(equipped with matrix addition, matrix multiplication, the zero matrix
$0_{2\times2}$ and the identity matrix $I_{2}$) is \textbf{not} a commutative
ring. In fact, it satisfies all of the axioms \textbf{except for}
commutativity of multiplication (which it fails to satisfy because in general,
$AB\neq BA$ for matrices $A$ and $B$).

\item If you have seen \textquotedblleft integers modulo $n$\textquotedblright%
: they also form a commutative ring (for any given $n\in\mathbb{Z}$).

\item Consider the two-element set $\left\{  \mathbf{0},\mathbf{1}\right\}  $
(consisting of two symbols $\mathbf{0}$ and $\mathbf{1}$, not to be mistaken
for the numbers $0$ and $1$). Equip this set with the following operations and elements:

\begin{itemize}
\item Addition (i.e., the binary operation \textquotedblleft$+$%
\textquotedblright) is given by%
\[
\mathbf{0}+\mathbf{0}=\mathbf{0},\ \ \ \ \ \ \ \ \ \ \mathbf{0}+\mathbf{1}%
=\mathbf{1},\ \ \ \ \ \ \ \ \ \ \mathbf{1}+\mathbf{0}=\mathbf{1}%
,\ \ \ \ \ \ \ \ \ \ \mathbf{1}+\mathbf{1}=\mathbf{0}.
\]
(This is almost like the usual addition of numbers, except that we are setting
$\mathbf{1}+\mathbf{1}=\mathbf{0}$ whereas usual numbers satisfy $1+1=2\neq0$.)

\item Multiplication (i.e., the binary operation \textquotedblleft$\cdot
$\textquotedblright) is given by%
\[
\mathbf{0}\cdot\mathbf{0}=\mathbf{0},\ \ \ \ \ \ \ \ \ \ \mathbf{0}%
\cdot\mathbf{1}=\mathbf{0},\ \ \ \ \ \ \ \ \ \ \mathbf{1}\cdot\mathbf{0}%
=\mathbf{0},\ \ \ \ \ \ \ \ \ \ \mathbf{1}\cdot\mathbf{1}=\mathbf{1}.
\]
(Unlike the addition, this multiplication is indeed the usual multiplication
of numbers, with $0$ and $1$ replaced by $\mathbf{0}$ and $\mathbf{1}$.)

\item The elements $\mathbf{0}$ and $\mathbf{1}$ are playing the roles of $0$
and $1$.
\end{itemize}

It turns out that this set $\left\{  \mathbf{0},\mathbf{1}\right\}  $
(equipped with these operations and elements) is a commutative ring. It just
has two elements!
\end{itemize}

I should say that, despite me using the symbols \textquotedblleft%
$+$\textquotedblright\ and \textquotedblleft$\cdot$\textquotedblright\ for the
two binary operations in Definition \ref{def.vs.commring} and calling them
\textquotedblleft addition\textquotedblright\ and \textquotedblleft
multiplication\textquotedblright, they don't have to have any relation to the
addition and the multiplication of numbers in the usual sense (say, real or
complex numbers). This is partly because the elements of $\mathbb{K}$ are not
necessarily numbers in the usual sense; but even if they are, the operations
\textquotedblleft$+$\textquotedblright\ and \textquotedblleft$\cdot
$\textquotedblright\ may be different from the usual addition and
multiplication. In particular, there are many \textquotedblleft alternative
additions and alternative multiplications\textquotedblright\ that we could
equip $\mathbb{Z}$ with to obtain commutative rings. We shall avoid such
ambiguities, however. If we really need to define an \textquotedblleft
alternative addition\textquotedblright\ on a set that already has an addition
defined on it, then we will instead create a \textquotedblleft
fresh\textquotedblright\ copy of the set. (This is why we used two symbols
$\mathbf{0}$ and $\mathbf{1}$ instead of the numbers $0$ and $1$ in our last
example above.)

What can we do if we have a commutative ring?

If $\mathbb{K}$ is a commutative ring, then some of the classical concepts of
algebra make sense in $\mathbb{K}$:

\begin{itemize}
\item We can add and multiply elements of $\mathbb{K}$, since $\mathbb{K}$
comes with an addition and a multiplication (by Definition
\ref{def.vs.commring}).

\item We can subtract elements of $\mathbb{K}$: Indeed, if $a\in\mathbb{K}$
and $b\in\mathbb{K}$, then we define $a-b$ to be $a+\underbrace{\left(
-b\right)  }_{\text{additive inverse of }b}$.

\item Finite sums (like $a_{1}+a_{2}+\cdots+a_{k}$ or $\sum_{i=1}^{k}a_{i}$ or
$\sum_{i\in I}a_{i}$) of elements of $\mathbb{K}$ make sense (and are defined
in the same way as for numbers). So do finite products (like $a_{1}a_{2}\cdots
a_{k}$ or $\prod_{i=1}^{k}a_{i}$ or $\prod_{i\in I}a_{i}$). The empty sum is
defined to be $0$ (the zero of $\mathbb{K}$); the empty product is defined to
be $1$ (the unity of $\mathbb{K}$).

\item We can take the power $a^{k}$ for all $a\in\mathbb{K}$ and
$k\in\mathbb{N}$; indeed, this power is defined by $a^{k}=\underbrace{aa\cdots
a}_{k\text{ times}}$. (Thus, $a^{0}=\underbrace{aa\cdots a}_{0\text{ times}%
}=\left(  \text{empty product}\right)  =1$.)

\item If $n\in\mathbb{Z}$ and $a\in\mathbb{K}$, then we can define an element
$na\in\mathbb{K}$. This element $na$ is defined by%
\[
na=\underbrace{a+a+\cdots+a}_{n\text{ times}}\ \ \ \ \ \ \ \ \ \ \text{if
}n\geq0
\]
and%
\[
na=-\left(  \left(  -n\right)  a\right)  \ \ \ \ \ \ \ \ \ \ \text{if }n<0.
\]


\item We \textbf{cannot} (in general) divide elements of $\mathbb{K}$. That
is, quotients like $a/b$ (with $a,b\in\mathbb{K}$) may fail to exist, even if
$b$ is nonzero.

\item We also \textbf{cannot} take powers $a^{b}$ with both $a,b\in\mathbb{K}%
$. (Even for complex numbers, there is no good way to do this.)
\end{itemize}

Now, fix a commutative ring $\mathbb{K}$, and replace \textquotedblleft real
numbers\textquotedblright, \textquotedblleft numbers\textquotedblright\ and
\textquotedblleft scalars\textquotedblright\ by \textquotedblleft elements of
$\mathbb{K}$\textquotedblright\ throughout the linear algebra that we have
seen. Which of our results remain true?

Matrices filled with elements of $\mathbb{K}$ will be called \textbf{matrices
over }$\mathbb{K}$. Their basic properties are still true:

\begin{itemize}
\item Rules like $A\left(  BC\right)  =\left(  AB\right)  C$ and $A\left(
B+C\right)  =AB+AC$ and $AI_{n}=A$ (for matrices of the appropriate sizes)
remain true.

\item Concepts like \textquotedblleft diagonal\textquotedblright,
\textquotedblleft upper-triangular\textquotedblright, \textquotedblleft
transpose\textquotedblright\ etc. remain valid and preserve most of their
properties (for example, $\left(  AB\right)  ^{T}=B^{T}A^{T}$ still holds).

\item Determinants still work, since the formula%
\[
\det A=\sum_{\sigma\text{ is a permutation of }\left[  n\right]
}\operatorname*{sign}\left(  \sigma\right)  \cdot A_{1,\sigma\left(  1\right)
}A_{2,\sigma\left(  2\right)  }\cdots A_{n,\sigma\left(  n\right)  }%
\]
makes sense whenever the entries of $A$ belong to a commutative ring. Basic
properties of determinants still hold. (For example, $\det\left(  AB\right)
=\det A\cdot\det B$.)
\end{itemize}

However, commutative rings are not enough for Gaussian elimination. Indeed,
some of the steps in Gaussian elimination require dividing by some entries of
the matrix\footnote{Namely, in order to turn a pivot entry $\lambda$ into $1$,
we need to scale the corresponding row by $1/\lambda$. Thus, we need
$1/\lambda$ to be well-defined, i.e., we need to be able to divide by
$\lambda$.}. But if $\mathbb{K}$ is merely a commutative ring, not every
nonzero element of $\mathbb{K}$ can be divided by. This has consequences:
Gaussian elimination no longer works (in general), and many facts that follow
from Gaussian elimination (such as the Inverse Matrix Theorem) no longer hold.

We can see this on an example with $\mathbb{K}=\mathbb{Z}$. If we perform
Gaussian elimination on the matrix $\left(
\begin{array}
[c]{cc}%
2 & 1\\
4 & 3
\end{array}
\right)  $ (which is a matrix over $\mathbb{Z}$), we obtain%
\[
\left(
\begin{array}
[c]{cc}%
\fbox{$2$} & 1\\
4 & 3
\end{array}
\right)  \overset{\text{scale row }1\text{ by }1/2}{\longrightarrow}\left(
\begin{array}
[c]{cc}%
\fbox{$1$} & 1/2\\
4 & 3
\end{array}
\right)
\]
in the first step, which already contains a non-integer entry. So we are
missing a notion of division. Commutative rings that allow division are called
\textbf{fields}:

\begin{definition}
\label{def.vs.field}A commutative ring $\mathbb{K}$ is called a \textbf{field}
if it satisfies the following two axioms:

\begin{itemize}
\item \textbf{Nontriviality:} We have $0\neq1$. (Here, the \textquotedblleft%
$0$\textquotedblright\ and the \textquotedblleft$1$\textquotedblright\ stand
not for the two integers $0$ and $1$, but rather for the two elements of
$\mathbb{K}$ that have been designated \textquotedblleft$0$\textquotedblright%
\ and \textquotedblleft$1$\textquotedblright\ in the definition of a
commutative ring. In a commutative ring $\mathbb{K}$, they can be equal, but
for a field we are requiring that they are not.)

\item \textbf{Existence of multiplicative inverses:} For each $a\in\mathbb{K}%
$, we have \textbf{either} $a=0$, \textbf{or} there is a $b\in\mathbb{K}$
satisfying $ab=ba=1$.
\end{itemize}

\noindent The element $b$ in the latter axiom is unique (this is easy to see),
and it is called the \textbf{inverse} of $a$, and is denoted by $a^{-1}$.

If $u$ and $v$ are two elements of a field $\mathbb{K}$ such that $v\neq0$,
then $\dfrac{u}{v}$ is defined to be the product $uv^{-1}$. Thus, any two
elements of $\mathbb{K}$ can be divided by each other as long as the
denominator is $\neq0$.
\end{definition}

For example, the commutative rings $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$
and our two-element ring $\left\{  \mathbf{0},\mathbf{1}\right\}  $ are
fields, but $\mathbb{Z}$ is not.

Many results about matrices are based on the ability to divide by nonzero
numbers; these results cannot be directly generalized to matrices over a
commutative ring $\mathbb{K}$, but they can be generalized to matrices over a
field $\mathbb{K}$. In particular, if $\mathbb{K}$ is a field, then

\begin{itemize}
\item Gaussian elimination works for matrices over $\mathbb{K}$ (so any matrix
has a RREF);

\item the Inverse Matrix Theorem holds;

\item the notions of \textquotedblleft linear combination\textquotedblright,
\textquotedblleft linear (in)dependence\textquotedblright\ and
\textquotedblleft spanning\textquotedblright\ (for column vectors or row
vectors over $\mathbb{K}$) can be defined (in the same way as we defined them
for vectors over $\mathbb{R}$), and enjoy the same properties;

\item basic properties of eigenvectors hold (e.g., eigenvectors corresponding
to distinct eigenvalues are linearly independent).
\end{itemize}

There do exist some properties of matrices over $\mathbb{R}$ that cannot be
generalized to matrices over an arbitrary field $\mathbb{K}$. But we have not
encountered such properties so far, and will not encounter them in this
class.\footnote{Such properties are often found around the concepts of
\textbf{symmetric} and \textbf{orthogonal }matrices.}

\subsection{Vector spaces}

\subsubsection{Definition}

So we have generalized our concept of \textquotedblleft
scalars\textquotedblright: Instead of requiring them to be real or complex
numbers, we simply allow them to come from any field $\mathbb{K}$.

Now, let us generalize \textquotedblleft vectors\textquotedblright. We know
row vectors and column vectors. What else behaves like these kinds of vectors?

We have seen (in
\href{http://www.cip.ifi.lmu.de/~grinberg/t/19fla/hw2s.pdf}{homework set \#2})
that the basic concepts we defined for column vectors (such as linear
combinations, relations and linear independence) can be used not only for
column vectors (or row vectors), but also for matrices and for polynomials.
This is because these concepts are defined entirely in terms of addition and
scaling and the zero vector. We shall now agree to call any kind of objects
that can be added and scaled (and that support a notion of zero)
\textbf{vectors}. More precisely:

\begin{definition}
\label{def.vs.vs}Let $\mathbb{K}$ be a field. The elements of $\mathbb{K}$
will be called \textbf{scalars}.

A \textbf{vector space (over }$\mathbb{K}$\textbf{)} means a set $V$ equipped
with two binary operations:

\begin{itemize}
\item a binary operation called \textquotedblleft$+$\textquotedblright, which
takes as input two elements $v,w\in V$ and yields an element of $V$ called
$v+w$;

\item a binary operation called \textquotedblleft$\cdot$\textquotedblright,
which takes as input a scalar $\lambda\in\mathbb{K}$ (that is, an element of
$\mathbb{K}$) and an element $v\in V$, and yields an element of $V$ called
$\lambda\cdot v$ or $\lambda v$
\end{itemize}

\noindent as well as a chosen element of $V$ called \textquotedblleft%
$\overrightarrow{0}$\textquotedblright, satisfying the following axioms:

\begin{itemize}
\item \textbf{Commutativity of addition:} We have $v+w=w+v$ for all $v,w\in V$.

\item \textbf{Associativity of addition:} We have $u+\left(  v+w\right)
=\left(  u+v\right)  +w$ for all $u,v,w\in V$.

\item \textbf{Neutrality of }$\overrightarrow{0}$\textbf{:} We have
$v+\overrightarrow{0}=\overrightarrow{0}+v=v$ for all $v\in V$.

\item \textbf{Right distributivity:} We have $\left(  \lambda+\mu\right)
v=\lambda v+\mu v$ for all $\lambda,\mu\in\mathbb{K}$ and $v\in V$.

\item \textbf{Left distributivity:} We have $\lambda\left(  v+w\right)
=\lambda v+\lambda w$ for all $\lambda\in\mathbb{K}$ and $v,w\in V$.

\item \textbf{Associativity:} We have $\left(  \lambda\mu\right)
v=\lambda\left(  \mu v\right)  $ for all $\lambda,\mu\in\mathbb{K}$ and $v\in
V$.

\item \textbf{Neutrality of }$1$\textbf{:} We have $1v=v$ for all $v\in V$.

\item \textbf{Annihilation I:} We have $0v=\overrightarrow{0}$ for all $v\in
V$.

\item \textbf{Annihilation II:} We have $\lambda\overrightarrow{0}%
=\overrightarrow{0}$ for all $\lambda\in\mathbb{K}$.
\end{itemize}

\noindent The operation $+$ is called the \textbf{addition} of the vector
space $V$; the operation $\cdot$ is called the \textbf{scaling} of $V$; the
element $\overrightarrow{0}$ is called the \textbf{zero vector} of $V$. The
elements of $V$ are called \textbf{vectors}.
\end{definition}

So our new notion of \textquotedblleft vector\textquotedblright\ is just
\textquotedblleft element of a vector space\textquotedblright.

We say \textquotedblleft$\mathbb{K}$-vector space\textquotedblright\ instead
of \textquotedblleft vector space over $\mathbb{K}$\textquotedblright; we also
omit the $\mathbb{K}$ if it is clear from the context.

If $v$ and $w$ are two elements of a vector space $V$, then we define the
\textbf{difference} $v-w$ to be $v+\left(  -1\right)  w$. We also set
$-w=\left(  -1\right)  w$ for any $w\in V$.

Finite sums (like $v_{1}+v_{2}+\cdots+v_{k}$ or $\sum_{i=1}^{k}v_{i}$ or
$\sum_{i\in I}v_{i}$) of elements of any vector space $V$ make sense; they are
defined just as they are defined for numbers. Empty sums (such as $\sum
_{i=3}^{2}v_{i}$) are defined to be the zero vector $\overrightarrow{0}$.

Don't get vector spaces confused with commutative rings! Both of these objects
come with an addition \textquotedblleft$+$\textquotedblright\ and a
multiplication-like operation \textquotedblleft$\cdot$\textquotedblright. But
in a commutative ring, the latter operation takes two elements of the ring as
input, whereas in a vector space, it takes a scalar and a vector as input. In
other words, in a commutative ring, you can multiply two elements of the ring,
but in a vector space, you can \textquotedblleft multiply\textquotedblright%
\ (or, more precisely, scale) a vector by a scalar (but \textbf{you cannot
multiply two vectors}\footnote{Of course, in \textbf{some} vector spaces, you
can do that. But the definition of a vector space is not responsible for
that!}). This is why, for example, there is no \textquotedblleft commutativity
of multiplication\textquotedblright\ axiom for a vector space (and no
\textquotedblleft unity vector\textquotedblright\ similar to the $1$ of a
commutative ring).

\subsubsection{Examples of vector spaces}

From now on, fix a field $\mathbb{K}$.

\begin{definition}
\label{def.vs.Knm-vs}Fix $n,m\in\mathbb{N}$. The set of all $n\times
m$-matrices with entries in $\mathbb{K}$ shall be denoted by $\mathbb{K}%
^{n\times m}$. This is a $\mathbb{K}$-vector space, with the operation $+$
being addition of matrices, with the operation $\cdot$ being scaling of
matrices, and with the zero vector $\overrightarrow{0}$ being the zero matrix
$0_{n\times m}$.

Thus, $n\times m$-matrices are vectors (in the sense of being elements of the
vector space $\mathbb{K}^{n\times m}$). This does not mean that they are
column vectors or row vectors; we are just using the word \textquotedblleft
vector\textquotedblright\ in the general sense of \textquotedblleft element of
a vector space\textquotedblright\ here.

But in particular, this includes row and column vectors. Indeed, $n\times
1$-matrices are column vectors, and $1\times m$-matrices are row vectors.
Thus, row vectors and column vectors are particular cases of vectors in the
new sense of this word.
\end{definition}

Note that the vector space $\mathbb{K}^{n\times m}$ of $n\times m$-matrices
incorporates matrix addition and matrix scaling, but it doesn't
\textquotedblleft know\textquotedblright\ how matrices are multiplied; matrix
multiplication is not part of its structure. (And indeed, if $n\neq m$, then
you cannot multiply two $n\times m$-matrices, so matrix multiplication cannot
be considered to be an \textquotedblleft internal\textquotedblright\ operation
on this vector space.)

\begin{remark}
Not only is $\mathbb{K}^{n\times m}$ a vector space, but several useful
subsets of $\mathbb{K}^{n\times m}$ are vector spaces as well. For example,%
\[
\left\{  A\in\mathbb{K}^{n\times m}\ \mid\ \text{each row of }A\text{ sums to
}0\right\}
\]
is a vector space (with the same addition and scaling as before). We will
later understand these as examples of \textquotedblleft
subspaces\textquotedblright.
\end{remark}

Here are some simpler examples of vector spaces:

\begin{itemize}
\item The field $\mathbb{K}$ itself is a $\mathbb{K}$-vector space (with
addition being addition, and scaling being multiplication, and the
$\overrightarrow{0}$ being $0$). This is an example where scalars and vectors
are the same thing.

Thus, in particular, $\mathbb{R}$ is an $\mathbb{R}$-vector space, and
$\mathbb{C}$ is a $\mathbb{C}$-vector space.

\item However, $\mathbb{C}$ is also an $\mathbb{R}$-vector space, because you
can scale complex numbers by real numbers (since real numbers are complex numbers).

\item The one-element set $\left\{  0\right\}  $ is a $\mathbb{K}$-vector
space for any field $\mathbb{K}$. (Here, addition and scaling and
$\overrightarrow{0}$ are defined in the only possible way: i.e., by setting
$0+0=0$ and $\lambda\cdot0=0$ for all $\lambda\in\mathbb{K}$, and declaring
$0$ to be the zero vector.)

\item The set of all infinite sequences $\left(  a_{1},a_{2},a_{3}%
,\ldots\right)  \in\mathbb{K}^{\infty}$ is also a $\mathbb{K}$-vector space,
if we define addition by%
\[
\left(  a_{1},a_{2},a_{3},\ldots\right)  +\left(  b_{1},b_{2},b_{3}%
,\ldots\right)  =\left(  a_{1}+b_{1},a_{2}+b_{2},a_{3}+b_{3},\ldots\right)
\]
and define scaling by%
\[
\lambda\left(  a_{1},a_{2},a_{3},\ldots\right)  =\left(  \lambda a_{1},\lambda
a_{2},\lambda a_{3},\ldots\right)
\]
and define the zero vector $\overrightarrow{0}$ by%
\[
\overrightarrow{0}=\left(  0,0,0,\ldots\right)  .
\]
You can view these infinite sequences as $1\times\infty$-matrices, i.e., as
row vectors of infinite length; then, these are just particular cases of
matrix addition and scaling.

\item The set $\mathbb{R}\left[  x\right]  $ of all polynomials in one
variable $x$ with real coefficients is an $\mathbb{R}$-vector space.

\item Let $S$ be any set, and $\mathbb{K}$ be any field. Consider the set
$\mathbb{K}^{S}$ of all maps from $S$ to $\mathbb{K}$. Then, $\mathbb{K}^{S}$
becomes a $\mathbb{K}$-vector space if we define addition and scaling
pointwise\footnote{i.e., the sum $f+g$ of two maps $f,g:S\rightarrow
\mathbb{K}$ is defined by%
\[
\left(  f+g\right)  \left(  s\right)  =f\left(  s\right)  +g\left(  s\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }s\in S;
\]
and the map $\lambda f$ (for any $\lambda\in\mathbb{K}$ and $f:S\rightarrow
\mathbb{K}$) is defined by%
\[
\left(  \lambda f\right)  \left(  s\right)  =\lambda\cdot f\left(  s\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }s\in S.
\]
} and define $\overrightarrow{0}$ to be the constant-$0$ map\footnote{i.e.,
the map%
\[
S\rightarrow\mathbb{K},\ \ \ \ \ \ \ \ \ \ s\mapsto0
\]
}.

\item Thus, for example, the set of all maps (= functions) from $\mathbb{R}$
to $\mathbb{R}$ is an $\mathbb{R}$-vector space.

\item The set $\mathcal{C}\left(  \mathbb{R}\right)  $ of all continuous
functions from $\mathbb{R}$ to $\mathbb{R}$ is an $\mathbb{R}$-vector space as well.
\end{itemize}

\subsection{Linear combinations}

We can now recall some notions we defined for column vectors, and extend their
definitions to vectors in arbitrary vector spaces over arbitrary fields. We
begin with the notions of \textquotedblleft linear
combination\textquotedblright, \textquotedblleft relation\textquotedblright,
\textquotedblleft linear independence\textquotedblright\ and \textquotedblleft
linear dependence\textquotedblright:

\begin{definition}
Let $\mathbb{K}$ be any field. Let $v_{1},v_{2},\ldots,v_{k}$ be some vectors
in a $\mathbb{K}$-vector space $V$. Then, a $\mathbb{K}$\textbf{-linear
combination} of $v_{1},v_{2},\ldots,v_{k}$ means a vector that can be written
in the form%
\[
\lambda_{1}v_{1}+\lambda_{2}v_{2}+\cdots+\lambda_{k}v_{k}%
\ \ \ \ \ \ \ \ \ \ \text{for some }\lambda_{1},\lambda_{2},\ldots,\lambda
_{k}\in\mathbb{K}.
\]
We omit the \textquotedblleft$\mathbb{K}$\textquotedblright\ from
\textquotedblleft$\mathbb{K}$-linear combination\textquotedblright\ if it is
clear what field we mean.
\end{definition}

\begin{definition}
Let $\mathbb{K}$ be a field. Let $v_{1},v_{2},\ldots,v_{k}$ be some vectors in
a $\mathbb{K}$-vector space $V$.

\textbf{(a)} A \textbf{relation} (more precisely: a $\mathbb{K}$%
\textbf{-linear relation}) between $v_{1},v_{2},\ldots,v_{k}$ means a choice
of $\lambda_{1},\lambda_{2},\ldots,\lambda_{k}\in\mathbb{K}$ satisfying%
\[
\lambda_{1}v_{1}+\lambda_{2}v_{2}+\cdots+\lambda_{k}v_{k}=\overrightarrow{0}.
\]


\textbf{(b)} The \textbf{trivial relation} between $v_{1},v_{2},\ldots,v_{k}$
is the relation obtained by choosing $\lambda_{1}=\lambda_{2}=\cdots
=\lambda_{k}=0$. Clearly, $v_{1},v_{2},\ldots,v_{k}$ always have this trivial relation.

\textbf{(c) }We say that the vectors $v_{1},v_{2},\ldots,v_{k}$ (or, more
precisely, the list $\left(  v_{1},v_{2},\ldots,v_{k}\right)  $) are
\textbf{independent} (more precisely: $\mathbb{K}$\textbf{-linearly
independent}) if the only relation between $v_{1},v_{2},\ldots,v_{k}$ is the
trivial relation. Otherwise, we say that these vectors are \textbf{dependent}.
\end{definition}

This encompasses independence of column vectors, of matrices, of polynomials
and of many other things -- because all of these things are vectors in vector spaces.

How do we tell whether a list of vectors in a vector space is independent?
There is no general method (like for column vectors); you have to know the
structure of your vectors.

\begin{example}
\textbf{(a)} Recall that $\mathbb{C}$ is a $\mathbb{C}$-vector space. Thus,
any complex number is in itself a vector over $\mathbb{C}$. Consider the two
vectors $1$ and $i$ in this space. Are they $\mathbb{C}$-linearly dependent?

Yes, because
\[
1\cdot1+i\cdot i=0\ \ \ \ \ \ \ \ \ \ \text{is a nontrivial relation between
}1\text{ and }i.
\]


\textbf{(b)} Recall that $\mathbb{C}$ is an $\mathbb{R}$-vector space. Thus,
any complex number is in itself a vector over $\mathbb{R}$. Consider the two
vectors $1$ and $i$ in this space. Are they $\mathbb{R}$-linearly dependent?
In other words, are there \textbf{real} coefficients $\lambda_{1},\lambda_{2}$
(not both $0$) such that $\lambda_{1}\cdot1+\lambda_{2}\cdot i=0$ ?

No, because for real numbers $\lambda_{1},\lambda_{2}$, we have $\lambda
_{1}\cdot1+\lambda_{2}\cdot i=\left(  \lambda_{1},\lambda_{2}\right)  $, and
this complex number is only $0$ if both $\lambda_{1}$ and $\lambda_{2}$ are
$0$.
\end{example}

\begin{example}
Consider the $\mathbb{R}$-vector space $\mathcal{C}\left(  \mathbb{R}\right)
$ of continuous functions $\mathbb{R}\rightarrow\mathbb{R}$.

\textbf{(a)} Are the three functions $1$, $\sin$ and $\cos$ linearly
dependent? (Here, $1$ means the constant-$1$ function, i.e., the function that
sends each $x\in\mathbb{R}$ to $1$.)

\textbf{(b)} Are the three functions $1$, $\sin^{2}$ and $\cos^{2}$ linearly
dependent? (Here, $\sin^{2}$ means the function that sends each $x\in
\mathbb{R}$ to $\left(  \sin x\right)  ^{2}$. Similarly, $\cos^{2}$ means the
function that sends each $x\in\mathbb{R}$ to $\left(  \cos x\right)  ^{2}$.)

\textbf{Answers:} \textbf{(a)} This would mean that there exist three reals
$\lambda_{1},\lambda_{2},\lambda_{3}$ (not all zero) such that%
\[
\lambda_{1}\cdot1+\lambda_{2}\cdot\sin+\lambda_{3}\cdot\cos=0.
\]
In other words, these reals would satisfy%
\[
\lambda_{1}+\lambda_{2}\sin x+\lambda_{3}\cos x=0\ \ \ \ \ \ \ \ \ \ \text{for
all }x\in\mathbb{R}.
\]
We claim that they don't exist. To see why, assume that they exist. Thus,%
\[
\lambda_{1}+\lambda_{2}\sin x+\lambda_{3}\cos x=0\ \ \ \ \ \ \ \ \ \ \text{for
all }x\in\mathbb{R}.
\]
Plugging $x=0$ into this equation yields%
\begin{align*}
\lambda_{1}+\lambda_{2}\underbrace{\sin0}_{=0}+\lambda_{3}\underbrace{\cos
0}_{=1}  &  =0,\ \ \ \ \ \ \ \ \ \ \text{that is,}\\
\lambda_{1}+\lambda_{3}  &  =0.
\end{align*}
Plugging $x=\pi/2$ into the same equation yields%
\begin{align*}
\lambda_{1}+\lambda_{2}\underbrace{\sin\left(  \pi/2\right)  }_{=1}%
+\lambda_{3}\underbrace{\cos\left(  \pi/2\right)  }_{=0}  &
=0,\ \ \ \ \ \ \ \ \ \ \text{that is,}\\
\lambda_{1}+\lambda_{2}  &  =0.
\end{align*}
Plugging $x=\pi$ into the same equation yields%
\begin{align*}
\lambda_{1}+\lambda_{2}\underbrace{\sin\pi}_{=0}+\lambda_{3}\underbrace{\cos
\pi}_{=-1}  &  =0,\ \ \ \ \ \ \ \ \ \ \text{that is,}\\
\lambda_{1}-\lambda_{3}  &  =0.
\end{align*}
Combining these three equations yields the system $\left\{
\begin{array}
[c]{c}%
\lambda_{1}+\lambda_{3}=0\\
\lambda_{1}+\lambda_{2}=0\\
\lambda_{1}-\lambda_{3}=0
\end{array}
\right.  $, whose only solution is $\lambda_{1}=\lambda_{2}=\lambda_{3}=0$.
Thus, the only relation between $1,\sin,\cos$ is trivial. Hence, $1,\sin,\cos$
are linearly independent.

\textbf{(b)} This would mean that there exist three reals $\lambda_{1}%
,\lambda_{2},\lambda_{3}$ (not all zero) such that%
\[
\lambda_{1}\cdot1+\lambda_{2}\cdot\sin^{2}+\lambda_{3}\cdot\cos^{2}=0.
\]
In other words, these reals would satisfy%
\[
\lambda_{1}+\lambda_{2}\sin^{2}x+\lambda_{3}\cos^{2}%
x=0\ \ \ \ \ \ \ \ \ \ \text{for all }x\in\mathbb{R}.
\]
Such reals exist: $\lambda_{1}=-1$, $\lambda_{2}=1$ and $\lambda_{3}=1$.
Indeed,%
\[
-1+1\sin^{2}x+1\cos^{2}x=-1+\underbrace{\sin^{2}x+\cos^{2}x}_{=1}=-1+1=0.
\]
So $1,\sin^{2},\cos^{2}$ are linearly dependent.
\end{example}

There is no general method to decide whether a bunch of functions in
$\mathcal{C}\left(  \mathbb{R}\right)  $ is linearly dependent or not. But
once you have some dependence/independence statements, linear algebra can help
derive some useful consequences from them.


\end{document}