\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{xcolor}

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

\usepackage{tikz}
%\usepackage{pgfplots}
%\tikzstyle{ball} = [circle,shading=ball, ball color=black,
%    minimum size=1mm,inner sep=1.3pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}

%\usepackage{graphicx}

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

\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*}

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

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\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}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 201 lecture for Wednesday, Week 2}
\bigskip

\centerline{\bf Vector spaces}
\medskip

Let~$F$ be a field, e.g., $\Q$, $\R$, $\C$, $\Z/2\Z$ (but not~$\Z$).  
\medskip

\textbf{Definition.} A \emph{vector space over~$F$} is a set~$V$ with two
operations
\begin{center}
  \begin{tikzpicture}
    \node at (0,0) {vector addition:};
    \node at (5,-0.1) {
      \begin{minipage}{0.9\linewidth}
	\begin{align*}
	  +\colon V\times V&\to V\\
	  (v,w)&\mapsto v+w
	\end{align*}
      \end{minipage}
    };
    \begin{scope}[xshift=-13,yshift=-2cm]
      \node at (0,0) {scalar multiplication:};
      \node at (5,-0.1) {
	\begin{minipage}{0.9\linewidth}
	  \begin{align*}
	    +\colon F\times V&\to V\\
	    (a,v)&\mapsto av
	  \end{align*}
	\end{minipage}
      };
    \end{scope}
  \end{tikzpicture}
\end{center}
  such that the following hold for all~$x,y,z\in V$ and~$a,b\in F$:
  \begin{enumerate}
    \item $x+y=y+x$  (commutativity of addition).
    \item $(x+y)+z=(x+y)+z$ (associativity of addition).
    \item There exists~$0\in V$ such that~$0+w=w$ for all~$w\in V$.
    \item There exists~$-x\in V$ such that~$x+(-x)=0$.
    \item For~$1\in F$, we have~$1\cdot x= x$.
    \item $(ab)x=a(bx)$ (associativity of scalar multiplication).
    \item $a(x+y)=ax+ay$ (distributivity).
    \item $(a+b)x=ax+bx$ (distributivity).
  \end{enumerate}
\medskip

\textbf{Remark.} Rules 1--4 provide the {\em additive structure} and say that under
addition~$V$ forms an {\em abelian group}.  Rules 5--8 deal with the second
operation, scalar multiplication.  Together, they provide a {\em linear
structure} for the set~$V$.
\medskip

\textbf{Exercise.} Let~$v$ be an element of a vector space.  Prove that
$(-1)v=-v$.

\textbf{Example.} Let~$F^n=\underbrace{F\times\cdots\times F}_{n \text{
times}}=\left\{ (a_1,\dots,a_n) : a_i\in F\text{ for $i=1,\dots,n$}\right\}$
with the operations
\begin{align*}
  &(a_1,\dots,a_n)+(b_1,\dots,b_n):=(a_1+b_1,\dots,a_n+b_n)\\
  &c(a_1,\dots,a_n):=(ca_1,\dots,ca_n)
\end{align*}
for all~$(a_1,\dots,a_n), (b_1,\dots,b_n)\in F^n$ and~$c\in F$.
Then~$F^n$ is a vector space. 
\medskip

Special cases:
\begin{enumerate}[label=(\alph*)]
  \item $F=\R$ and~$n=2$.  This gives~$\R^2$ with its usual linear structure.
    Addition is given by the ``parallelogram rule'' and scalar multiplication
    scales length:
    \begin{center}
      \begin{tikzpicture}[scale=0.6]
	\node[] (0) at (0,0) {};
	\node[label={right:$u$}] (u) at (2,1) {};
	\node[label={below left:$v$}] (v) at (1,3) {};
	\node[label={right:$u+v$}] (u+v) at (3,4) {};
	\draw[->] (0,0)--(2,1);
	\draw[->] (0,0)--(1,3);
	\draw[dashed] (2,1)--(3,4);
	\draw[dashed] (1,3)--(3,4);
	\begin{scope}[xshift=7cm]
	  \node (0) at (0,0) {};
	  \node[label={below:$u$}] (u) at (2,1) {};
	  \node[label={below:$3u$}] (3u) at (6,3) {};
	  \draw[->] (0)--(u);
	  \draw[->] (0)--(3u);
	  \node at (6.05,1) {.};
	\end{scope}
      \end{tikzpicture}
    \end{center}
    Here are examples of the vector space axioms in the special case $V=\R^{2}$:
    \begin{enumerate}[label=\arabic*.]
      \item commutativity of~$+$:
	\[
	  (6,3)+(-2,4)=(4,7)=(-2,4)+(6,3);
	\]
      \item associativity of~$+$:
	\begin{align*}
	  ((6,3)+(-2,4))+(0,2)&=(4,7)+(0,2)\\
	  &=(4,9)\\
	  &=(6,3)+(-2,6)\\
	  &=(6,3)+( (-2,4)+(0,2));
	\end{align*}
      \item zero vector:
	\[
	  (0,0)+(6,3)=(6,3);
	\]
      \item additive inverses:
	\[
	  (6,3)+(-6,-3)=(0,0);
	\]
      \item scaling by~$1$:
	\[
	  1\cdot(6,3)=(1\cdot 6,1\cdot 3)=(6,3);
	\]
      \item associativity of scalar multiplication:
	\[
	  (3\cdot
	  2)(6,3)=6(6,3)=(36,18)=3(12,6)=3\left(2\left(6,3\right)\right);
	\]
      \item distributivity:
	\[
	  3( (6,3)+(-2,4))=3(4,7)=(12,21)
	\]
	and
	\[
	  3(6,3)+3(-2,4)=(18,9)+(-6,12)=(12,21);
	\]
      \item distributivity:
	\[
	  (3+2)(6,3)=5(6,3)=(30,15)
	\]
	and
	\[
	  3(6,3)+2(6,3)=(18,9)+(12,6)=(30,15).
	\]
    \end{enumerate}
  \item $F=\Z/3\Z$ and~$n=4$. For example,~$(0,1,0,0), (1,1,0,2)\in \left( \Z/3\Z
    \right)^4$, and 
    \[
      (0,1,0,0)+2(1,1,0,2)=(0,1,0,0)+(2,2,0,1)=(2,0,0,1).
    \]
  \item The field~$F$ is a vector space over itself (this is the case of $F^{n}$
    with $n=1$).
\end{enumerate}
\textbf{More examples of vector spaces.}
\begin{enumerate}[label=(\roman*)]
  \item The field $\C$ is a vector space over~$\R$.  For all~$a,b,c,d,t\in\R$, we have
    \begin{align*}
      &(a+bi)+(c+di)=(a+c)+(b+d)i\\
      &t(a+bi)=ta+(tb)i.
    \end{align*}
  \item The field $\R$ is a vector space over~$\Q$.
  \item The set of $m\times n$ matrices with entries in~$F$:
    \[
      M_{m\times n}:=
      \left\{ \left(\begin{array}{ccc}
	    a_{11}&\dots&a_{1n}\\
	    &\vdots&\\
	    a_{m1}&\dots&a_{mn}
      \end{array} \right): a_{ij}\in F\text{ for all~$i,j$}\right\}.
    \]
    has a standard vector space structure.
    Given~$A\in M_{m\times n}$, denote the entry in its~$i$-the row
    and~$j$-th column by~$A_{ij}$.  Define the vector space operations on
    $M_{m\times n}$ as follows:

    addition: $(A+B)_{ij}:=A_{ij}+B_{ij}$ for all~$A,B\in M_{m\times n}$;

    scalar multiplication: ~$(cA)_{ij}:=cA_{ij}$ for all~$A\in M_{m\times n}$
    and~$c\in F$.

    For example, let~$F=\Q$, $m=2$, and ~$n=3$.  We have
    \[
2
\left(\begin{array}{rrr}
    1&0&3\\
    -1&2&0
\end{array} \right)
+
5
\left(\begin{array}{ccc}
    0&2&-1\\
    1&0&4
\end{array} \right)
=
\left(\begin{array}{ccc}
    2&10&1\\
    3&4&20
\end{array} \right).
    \]
    Calling this last matrix~$A$, we have~$A_{1,1}=2$, $A_{1,2}=10$,\dots,
    $A_{2,3}=20$.
  \item (\textbf{Important.}) If~$S$ is any set, let~$F^S$ be the set
    of functions $f\colon S\to F$.  This function space is naturally
    an~$F$-vector space (i.e., a vector space with scalar field~$F$) with the
    following operations: for~$f,g\in F^S$ and~$t\in F$ define $f+g$ and~$tf$ by
    \vspace{-0.5cm}
\begin{center}
  \begin{tikzpicture}
    \node at (0.5,0) {addition:};
    \node at (5,0.25) {
      \begin{minipage}{0.9\linewidth}
	\begin{align*}
	  (f+g)(s):=f(s)+g(s)
	\end{align*}
      \end{minipage}
    };
    \begin{scope}[xshift=-13,yshift=-2cm]
      \node at (0,0) {scalar multiplication:};
      \node at (5,0.25) {
	\begin{minipage}{0.9\linewidth}
	  \begin{align*}
	    (tf)(s):=t(f(s)).
	  \end{align*}
	\end{minipage}
      };
    \end{scope}
  \end{tikzpicture}
\end{center}
  {\bf Special cases:} 
  \begin{itemize}
    \item If~$S=\left\{ 1,\dots,n \right\}$, then~$F^S$ is
      essentially~$F^n$.  For example, we can think of~$(3,2)\in\R$ as the
      function
      \begin{align*}
	f\colon\left\{ 1,2 \right\}&\to\R\\
	1&\mapsto 3\\
	2&\mapsto 2.
      \end{align*}
      In general, $(a_1,\dots,a_n)\in F^n$ can be thought of as the function
      \begin{align*}
	f\colon\left\{ 1,\dots,n \right\}&\to F\\
	i\quad&\mapsto a_i.
      \end{align*}
    \item Similarly, if $S=\left\{ (i,j):i=1,\dots,m\text{ and } j=1,\dots,n \right\}$,
      then~$F^S$ may be identified with~$M_{m\times n}$ with $f\in F^S$
      corresponding to the matrix~$A$ where~$A_{ij}=f(i,j)$.
    \item If~$S=\left\{ 1,2,3,\dots \right\}$, then~$F^S$ is the vector space of
      infinite sequences in~$F$.  For example, the sequence
      $1,1/2,1/4,1/8,\dots$ in~$\Q$ can be identified with the
      function~$f\colon S\to\Q$ defined by $f(i)=1/2^i$.
  \end{itemize}

\end{enumerate}
\smallskip

\textbf{Definition.} A subset $W\subseteq V$ of a vector space $V$ is a
\emph{subspace} of~$V$ is it is a vector space with the operations of addition
and scalar multiplication inherited from~$V$.
\medskip

We will talk about subspaces in the next class.
\end{document}
