\section{Subspaces and Spanning Sets }

It is time to study vector spaces more carefully and answer some fundamental questions.

\begin{enumerate}
\item \emph{Subspaces}: When is a subset of a vector space itself a vector space?  (This is the notion of a \emph{subspace}.)

\item \emph{Linear Independence}: Given a collection of vectors, is there a way to tell whether they are independent, or if one is a linear combination of the others? 

\item \emph{Dimension}: Is there a consistent definition of how ``big'' a vector space is?

\item \emph{Basis}:  How do we label vectors?  Can we write any vector as a sum of some basic set of vectors?  How do we change our point of view from vectors labeled one way to vectors labeled in another way?
\end{enumerate}
\index{Subspace!notion of}\index{Linear independence!concept of}\index{Dimension!notion of}\index{Basis!concept of}
Let's start at the top!

\subsection{Subspaces}

\begin{definition}
We say that a subset $U$ of a vector space $V$ is a \emph{subspace}\index{Subspace} of $V$ if $U$ is a vector space under the inherited addition and scalar multiplication operations of $V$. 
\end{definition}

\begin{example}
Consider a plane $P$ in $\Re^3$ through the origin:
\[
ax+by+cz=0.
\]
This equation can be expressed as the homogeneous system $\rowvec{a & b & c}\colvec{x\\y\\z}=0$, or $MX=0$ with $M$ the matrix $\rowvec{a & b & c}$.  If $X_1$ and $X_2$ are both solutions to $MX=0$, then, by linearity of matrix multiplication, so is $\mu X_1 + \nu X_2$:
\[
M(\mu X_1 + \nu X_2) = \mu MX_1 + \nu MX_2 = 0.
\]
So $P$ is closed under addition and scalar multiplication.  Additionally, $P$ contains the origin (which can be derived from the above by setting $\mu=\nu=0$).  All other vector space requirements hold for $P$ because they hold for all vectors in $\Re^3$.
\end{example}


\begin{theorem}[Subspace Theorem]\index{Subspace theorem}
Let $U$ be a non-empty subset of a vector space $V$.  Then $U$ is a subspace if and only if $\mu u_1 + \nu u_2 \in U$ for arbitrary $u_1, u_2$ in $U$, and arbitrary constants $\mu, \nu$.  
\end{theorem}

\begin{proof}
The proof is left as an exercise to the reader.
\end{proof}

\noindent
Note that the requirements of the subspace theorem are often referred to as ``closure''\index{Closure}.






\subsection{Building Subspaces}

Consider the set 
\[
U= \left\{ \colvec{1\\0\\0}, \colvec{0\\1\\0} \right\} \subset \Re^3.
\]
Because $U$ consists of only two vectors, it clear that $U$ is \emph{not} a vector space, since any constant multiple of these vectors should also be in $U$.  For example, the $0$-vector is not in $U$, nor is $U$ closed under vector addition.

But we know that any two vectors define a plane.  In this case, the vectors in $U$ define the $xy$-plane in $\Re^3$.  We can consider the $xy$-plane as the set of all vectors that arise as a linear combination of the two vectors in $U$.  Call this set of all linear combinations the \emph{span}\index{Span} of $U$:
\[
\spa(U)=\{ x \colvec{1\\0\\0}+y \colvec{0\\1\\0} | x,y\in \Re \}.
\]
Notice that any vector in the $xy$-plane is of the form
\[
\colvec{x\\y\\0} = x \colvec{1\\0\\0}+y \colvec{0\\1\\0} \in \spa(U).
\]

\begin{definition}
Let $V$ be a vector space and $S=\{ s_1, s_2, \ldots \} \subset V$ a subset of~$V$.  Then the \emph{span of $S$} is the set:
\[
\spa(U)=\{ r^1s_1+r^2s_2+\ldots + r^Ns_N | r^i\in \Re, N\in \N \}.
\]
\end{definition}


\begin{example}
Let $V=\Re^3$ and $X\subset V$ be the $x$-axis.  Let $P=\colvec{0\\1\\0}$, and set $$S=X \cup P\, .$$
The elements of $\spa(S)$ are linear combinations of vectors in the $x$-axis and the vector $P$.  

Since the sum of any number of vectors along the $x$-axis is still a vector along the $x$-axis, then the elements of $S$ are all of the form:
\[
\colvec{x\\0\\0}+y \colvec{0\\1\\0} = \colvec{x\\y\\0}.
\]
Then $\spa(S)$ is the $xy$-plane, which is a vector space.  (Try drawing a picture to verify this!)
\end{example}


\begin{lemma}
For any subset $S\subset V$, $\spa(S)$ is a subspace of $V$.
\end{lemma}

\begin{proof}
We need to show that $\spa(S)$ is a vector space.

It suffices to show that $\spa(S)$ is closed under linear combinations.  Let $u,v\in \spa(S)$ and $\lambda, \mu$ be constants.  By the definition of $\spa(S)$, there are constants $c^i$ and $d^i$ (some of which could be zero) such that:
\begin{eqnarray*}
u & = & c^1s_1+c^2s_2+\ldots \\
v & = & d^1s_1+d^2s_2+\ldots \\
\Rightarrow \lambda u + \mu v & = & \lambda (c^1s_1+c^2s_2+\ldots ) + \mu (d^1s_1+d^2s_2+\ldots ) \\
& = & (\lambda c^1+\mu d^1)s_1 + (\lambda c^2+\mu d^2)s_2 + \ldots
\end{eqnarray*}
This last sum is a linear combination of elements of $S$, and is thus in $\spa(S)$.  Then $\spa(S)$ is closed under linear combinations, and is thus a subspace of~$V$.
\end{proof}

Note that this proof, like many proofs, consisted of little more than just writing out the definitions.



\begin{example}
For which values of $a$ does

\[
\spa \{ \colvec{1\\0\\a} , \colvec{1\\2\\-3} , \colvec{a\\1\\0}   \} = \Re^3?
\]
Given an arbitrary vector $\colvec{x\\y\\z}$ in $\Re^3$, we need to find constants $r^1, r^2, r^3$ such that 

\[
r^1 \colvec{1\\0\\a} + r^2\colvec{1\\2\\-3} +r^3 \colvec{a\\1\\0} = \colvec{x\\y\\z}.
\]
We can write this as a linear system in the unknowns $r^1, r^2, r^3$ as follows:

\[
\begin{pmatrix}
1 & 1 & a \\ 
0 & 2 & 1 \\
a & -3 & 0
\end{pmatrix}
\colvec{r^1\\r^2\\r^3}
= \colvec{x\\y\\z}.
\]
If the matrix $M=\begin{pmatrix}
1 & 1 & a \\ 
0 & 2 & 1 \\
a & -3 & 0
\end{pmatrix}$ is invertible, then we can find a solution 
\[
M^{-1}\colvec{x\\y\\z}=\colvec{r^1\\r^2\\r^3}
\]
for \emph{any} vector $\colvec{x\\y\\z} \in \Re^3$.

Therefore we should choose $a$ so that $M$ is invertible:  

\[
i.e.,\;  0 \neq \det M = -2a^2 + 3 + a = -(2a-3)(a+1). 
\]
Then the span is $\Re^3$ if and only if $a \neq -1, \frac{3}{2}$.
\end{example}


\section*{References}
\begin{itemize}
\item Hefferon, Chapter Two, Section I.2: Subspaces and Spanning Sets
\end{itemize}

Wikipedia:
\begin{itemize}
\item \href{http://en.wikipedia.org/wiki/Linear_subspace}{Linear Subspace}
\item \href{http://en.wikipedia.org/wiki/Linear_span}{Linear Span}
\end{itemize}


\section*{Review Questions}

\begin{enumerate}
\item (Subspace Theorem) Suppose that $V$ is a vector space and that $U \subset V$ is a subset of $V$.  Show that 
\[
\mu u_1 + \nu u_2 \in U \text{ for all } u_1, u_2 \in U, \mu, \nu \in \Re
\]
implies that $U$ is a subspace of $V$.  (In other words, check all the vector space requirements for $U$.)

\item Let $P_3[x]$ be the vector space of degree $3$ polynomials in the variable~$x$.  Check whether 
\[
x-x^3 \in \spa\{ x^2, 2x+x^2, x+x^3 \}
\]

\item Let $U$ and $W$ be subspaces of $V$.  Are:
\begin{itemize}
\item[$i.$] $U\cup W$
\item[$ii.$] $U\cap W$
\end{itemize}
also subspaces?  Explain why or why not.  Draw examples in $\Re^3$.

\end{enumerate}



\newpage
