



\section{ Vector Spaces }

Thus far we have thought of vectors as lists of numbers in $\mathbb{R}^n$.  As it turns out, the idea of a vector can be much more general.  In the spirit of generalization, then, we will define vectors based on their most important properties.  Once complete, our new definition of vectors will include vectors in $\mathbb{R}^n$, but will also cover many other extremely useful notions of vectors. We do this in the hope of creating a mathematical structure
applicable to a wide range of real worl problems.

The two key properties of vectors are that they can be added together and multiplied by scalars.  So we make the following definition.


\begin{definition} A \emph{vector space}\index{Vector space} (over $\mathbb{R}$) is a set $V$ with two operations $+$ and $\cdot$ satisfying the following properties for all $u, v \in V$ and $c, d \in \mathbb{R}$:

\begin{itemize}

\item[(+i)] (Additive Closure)\index{Closure!additive} $u+v \in \mathbb{R}$.  (Adding two vectors gives a vector.)

\item[(+ii)] (Additive Commutativity) $u+v=v+u$.  (Order of addition doesn't matter.)

\item[(+iii)] (Additive Associativity) $(u+v)+w = u+(v+w)$  (Order of adding many vectors doesn't matter.)

\item[(+iv)] (Zero) There is a special vector $0_V \in V$ such that $u+0_V = u$ for all $u$ in $V$.

\item[(+v)] (Additive Inverse) For every $u \in v$ there exists $w \in V$ such that $u+w=0_V$.

\item[($\cdot$ i)] (Multiplicative Closure)\index{Closure!multiplicative} $c\cdot v \in V$.  (Scalar times a vector is a vector.)

\item[($\cdot$ ii)] (Distributivity) $(c+d) \cdot v= c\cdot v + d\cdot v$.  (Scalar multiplication distributes over addition of scalars.)

\item[($\cdot$ iii)] (Distributivity) $c\cdot (u+v)= c\cdot u + c\cdot v$.  (Scalar multiplication distributes over addition of vectors.) 

\item[($\cdot$ iv)] (Associativity) $ (cd)\cdot v = c \cdot (d \cdot v)$. 

\item[($\cdot$ v)] (Unity) $1\cdot v = v$ for all $v \in V$.
\end{itemize}
\end{definition}

\begin{remark}
Don't confuse the scalar product $\cdot$ with the dot product $\dotprod$.  The scalar product is a function that takes a vector and a number and returns a vector.  (In notation, this can be written $\cdot: \mathbb{R}\times V \rightarrow V$.)  On the other hand, the dot product takes two vectors and returns a number.  (In notation: $\dotprod: V\times V \rightarrow \Re$.)

Once the properties of a vector space have been verified, we'll just write scalar multiplication with juxtaposition $cv=c\cdot v$, though, to avoid confusing the notation.
\end{remark}

\begin{remark}
It isn't hard to devise strange rules for addition or scalar multiplication that break some or all of the rules listed above.

One can also find many interesting vector spaces, such as the following.
\end{remark}

\begin{example}

\[V = \{f | f:\mathbb{N} \rightarrow \Re \} \]
Here the vector space is the set of functions that take in a natural number~$n$ and return a real number.  The addition is just addition of functions: $(f_1 + f_2)(n) = f_1(n) + f_2(n)$.  Scalar multiplication is just as simple: $c \cdot f(n) = cf(n)$.

We can think of these functions as infinite column vectors: $f(0)$ is the first entry, $f(1)$ is the second entry, and so on.  Then for example the function $f(n) = n^3$ would look like this:

\[
f(n) = \colvec{0\\1\\8\\27\\ \vdots \\ n^3 \\ \vdots}
\]
Alternatively, $V$ is the space of sequences: $f = \{f_1, f_2, \ldots, f_n, \ldots \}$.

Let's check some axioms.

\begin{itemize}
\item[(+i)] (Additive Closure) $f_1(n) +f_2(n)$ is indeed a function $\mathbb{N} \rightarrow \Re$, since the sum of two real numbers is a real number.

\item[(+iv)] (Zero) We need to propose a zero vector.  The constant zero function $g(n) = 0$ works because then $f(n) + g(n) = f(n) + 0 = f(n)$.
\end{itemize}

The other axioms that should be checked come down to properties of the real numbers.
\end{example}

\begin{example}
Another very important example of a vector space is the space of all differentiable functions: 
\[
\{f | f:\Re\rightarrow \Re,\ \frac{d}{dx}f \text{ exists} \}.
\]
The addition is point-wise $(f+g)(x)=f(x)+g(x)$, as is scalar multiplication $c\cdot f(x)=cf(x)$.  

From calculus, we know that the sum of any two differentiable functions is differentiable, since the derivative distributes over addition.  A scalar multiple of a function is also differentiable, since the derivative commutes with scalar multiplication ($\frac{d}{d x}(cf)=c\frac{d}{dx}f$).  The zero function is just the function such that $0(x)=0$ for every $x$.  The rest of the vector space properties are inherited from addition and scalar multiplication in $\Re$.

In fact, the set of functions with at least $k$ derivatives is always a vector space, as is the space of functions with infinitely many derivatives.
\end{example}


\begin{remark}[Vector Spaces Over Other Fields]  Above, we defined vector spaces over the real numbers.  One can actually define vector spaces over any \emph{field}.  A field is a collection of ``numbers'' satisfying a number of properties.

One other example of a field is the complex numbers, 
\[
\mathbb{C}= \{x+iy | i^2=-1, x,y\in \Re \}.
\]
In quantum physics, vector spaces over $\mathbb{C}$ describe all possible states a system of particles can have.  

For example,
\[
V= \{ \colvec{\lambda \\ \mu} : \lambda, \mu \in \mathbb{C}\}
\]
describes states of an electron, where $\colvec{1 \\ 0}$ describes spin ``up'' and $\colvec{0 \\ 1}$ describes spin ``down''.  Other states, like $\colvec{i \\ -i}$ are permissible, since the base field is the complex numbers.

Complex numbers are extremely useful because of a special property that they enjoy: every polynomial over the complex numbers factors into a product of linear polynomials.  For example, the polynomial $x^2+1$ doesn't factor over the real numbers, but over the complex numbers it factors into $(x+i)(x-i)$.  This property ends up having very far-reaching consequences: often in mathematics problems that are very difficult when working over the real numbers become relatively simple when working over the complex numbers.  One example of this phenomenon occurs when diagonalizing matrices, which we will learn about later in the course.

Another useful field is the rational numbers $\mathbb{Q}$.  This is field is important in computer algebra: a real number given by an infinite string of numbers after the decimal point can't be stored by a computer.  So instead rational approximations are used.  Since the rationals are a field, the mathematics of vector spaces still apply to this special case.

There are many other examples of fields, including fields with only finitely many numbers.  One example of this is the field $\mathbb{Z}_2$ which only has elements $\{0,1\}$.  Multiplication is defined normally, and addition is the usual addition, but with $1+1=0$.  This particular field has important applications in computer science:  Modern computers actually use $\mathbb{Z}_2$ arithmetic for every operation.  

In fact, for every prime number $p$, the set $\mathbb{Z}_p=\{0,1,\ldots, p-1\} $ forms a field.  The addition and multiplication are obtained by using the usual operations over the integers, and then dividing by $p$ and taking the remainder.  For example, in $\mathbb{Z}_5$, we have $4+3=2$, and $4\cdot4=1$.  (This is sometimes called ``clock arithmetic.'')  Such fields are very important in computer science, cryptography, and number theory.

In this class, we will work mainly over the Real numbers and the Complex numbers, and occasionally work over $\mathbb{Z}_2$.  The full story of fields is typically covered in a class on abstract algebra or Galois theory.
\end{remark}


\section*{References}

Hefferon, Chapter One, Section I.1

Wikipedia:
\begin{itemize}
\item \href{http://en.wikipedia.org/wiki/Vector_space}{Vector Space}
\item \href{http://en.wikipedia.org/wiki/Field_(mathematics)}{Field}
\item \href{http://en.wikipedia.org/wiki/Spin_1/2}{Spin $\frac{1}{2}$}
\end{itemize}



\begin{enumerate}
\item Check that $V= \{\colvec{x\\y} : x,y \in \Re \} = \Re^2$ with the usual addition and scalar multiplication is a vector space.

\item Check that the complex numbers form a vector space.

\item Consider the set of convergent sequences, with the same addition and scalar multiplication that we defined for the space of sequences: 
\[V = \{f | f:\mathbb{N} \rightarrow \Re, \lim_{n \rightarrow \infty} f \in \Re \}\]

Is this still a vector space?  Explain why or why not.

\item Let $V= \{\colvec{x\\y} : x,y \in \Re \} = \Re^2$.  

Propose as many rules for addition and scalar multiplication as you can that satisfy some of the vector space conditions while breaking some others.

\item Consider the set of $2\times 4$ matrices:
\[ V = \{ 
\begin{pmatrix}
a & b & c & d \\
e & f & g & h 
\end{pmatrix}
| a,b,c,d,e,f,g,h \in \mathbb{C} \}
\]

Propose definitions for addition and scalar multiplication in $V$.  Identify the zero vector in $V$, and check that every matrix has an additive inverse.  

\item Let $P_3^{\Re}$ be the set of polynomials with real coefficients of degree three or less.
	\begin{itemize}
	\item Propose a definition of addition and scalar multiplication to make $P_3^{\Re}$ a vector space.

	\item Identify the zero vector, and find the additive inverse for the vector $-3-2x+x^2$.

	\item Show that $P_3^{\Re}$ is not a vector space over $\mathbb{C}$.  Propose a small change to the definition of $P_3^{\Re}$ to make it a vector space over $\mathbb{C}$.
\end{itemize}

\end{enumerate}


\newpage
