\documentclass{article}
\input{../macros.tex}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Lecture 5: Transposes, permutations, spaces $\mb R^n$}

In this lecture we introduce vector spaces and their subspaces.

\subsection*{Permutations}

Multiplication by a permutation matrix $\mb P$ swaps the rows of a
matrix; when applying the method of elimination we use permutation
matrices to move zeros out of pivot positions.  Our factorization
$\mb{A = LU}$ then becomes $\mb {PA = LU}$, where $\mb P$ is a
permutation matrix which reorders any number of rows of $\mb A$.
Recall that $\mb P^{-1} = \mb P^T$,
i.e. that $\mb P^T \mb P = \mb I$.

\subsection*{Transposes}

When we take the transpose of a matrix, its rows become columns and
its columns become rows.  If we denote the entry in row $i$ column
$j$ of matrix $\mb A$ by $\mb A_{ij}$, then we can describe $\mb A ^T$
by: $\left( \mb A^T\right)_{ij} = \mb A_{ji}$.  For example:
$${\threebytwo 1 3 2 3 4 1}^T = \left[ \begin{array}{rrr} 1&2&4 \\ 3&
    3&1\end{array}\right].$$

A matrix $\mb A$ is {\em symmetric} if $\mb A^T = \mb A$.  Given any
matrix $\mb R$ (not necessarily square) the product $\mb R^T \mb R$
is always symmetric, because $\left(\mb R^T \mb R\right )^T = \mb R^T
\left(\mb R^T\right)^T = \mb R^T \mb R$.  (Note that $\left(\mb R^T
\right)^T = \mb R$.)

\subsection*{Vector spaces}

We can add vectors and multiply them by numbers, which means we can
discuss {\em linear combinations} of vectors.  These combinations
follow the rules of a {\em vector space}.

One such vector space is $\R^2$, the set of all vectors with exactly two real
number components.  We depict the vector $\twobyone a b$ by drawing an
arrow from the origin to the point $(a,b)$ which is $a$ units to the
right of the origin and $b$ units above it, and we call $\R^2$ the
``$x-y$ plane''.

Another example of a space is $\R^n$, the set of (column) vectors with $n$ real
number components.

\subsubsection*{Closure}

The collection of vectors with exactly two {\em positive} real valued
components is {\em not} a vector space.  The sum of any two vectors in that collection is again in the collection, but multiplying any
vector by, say, $-5$, gives a vector that's not in the collection.
We say that this collection of positive vectors is {\em closed} under addition
but not under multiplication.

If a collection of vectors is closed under linear combinations
(i.e. under addition and multiplication by any real numbers), and if
multiplication and addition behave in a reasonable way, then we call
that collection a {\em vector space}.

\subsubsection*{Subspaces}

A vector space that is contained inside of another vector space is
called a {\em subspace} of that space.  For example, take any non-zero
vector $\vb v$ in $\R^2$.  Then the set of all vectors $c \vb v$,
where $c$ is a real number, forms a subspace of $\R^2$.  This
collection of vectors describes a line through $\twobyone 00$ in $\R^2$
and is closed under addition.

A line in $\R^2$ that does not pass through the origin is {\em not} a subspace of $\R^2$. Multiplying any vector on that line by $0$ gives the zero vector, which does not lie on the
line.  Every subspace must contain the zero vector because vector
spaces are closed under multiplication.

\smallskip

The subspaces of $\R^2$ are:  
\begin{enumerate}
\item all of $\R^2$,
\item any line through $\twobyone 00$ and
\item the zero vector alone ($Z$).
\end{enumerate}
The subspaces of $\R^3$ are:  
\begin{enumerate}
\item all of $\R^3$,
\item any plane through the origin,
\item any line through the origin, and
\item the zero vector alone ($Z$).
\end{enumerate}

\subsubsection*{Column space}

Given a matrix $\mb A$ with columns in $\R^3$, these columns and all
their linear combinations form a subspace of $\R^3$.  This is the {\em
  column space} $C(\mb A)$.  If $\mb A = {\small \threebytwo 1 3
2 3 4 1}$, the column space of $\mb A$ is the plane through the
origin in $\R^3$ containing $\small \threebyone 1 2 4$ and $\small \threebyone 3 3
1$.

Our next task will be to understand the equation $\mb A \vb x = \mb b$ in
terms of subspaces and the column space of $\mb A$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
