\documentclass[30pt,landscape]{foils}

\usepackage{amsmath}

\usepackage{pause}               \usepackage{background}
\usepackage{graphicx}           \usepackage{geometry}
\usepackage{hyperref}

\usepackage{pp4slide}
\geometry{headsep=3ex,hscale=0.9}

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}

\newcommand{\pz}{\pause}
\newcommand{\pb}{\pagebreak}

\definecolor{bgblue}{rgb}{0.03,0.39,0.23}
\vpagecolor{bgblue}

\hypersetup{pdftitle={lecture},
  pdfsubject={A mathematics lecture},
  pdfauthor={Dev Sinha, University of Oregon},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor={red}
}

\begin{document}

{\Large Vectors and data sets} \pz

%Last time we developed some basic properties
%of matrices.  \pz 
 Matrices with only one column or
row are called (column or row) {\em vectors}.  \pz
Vectors naturally sit on a line, plane, three-space, etc. \pz

\begin{example}
$\begin{bmatrix}   1 \\  2 \end{bmatrix}$ and $\begin{bmatrix} 
3 & 4 & 5 
\end{bmatrix}$ are vectors, which we can represent by points
in the plane or in space.  \pz
\end{example}

Because they are special cases of matrices, they can be
added and subtracted.  \pz  Vectors also have a fundamental
way to multiply each other. \pz

\begin{definition}
The dot product of a row vector $ \begin{bmatrix}  a_1 & a_2 & \cdots & a_n \end{bmatrix}$
and a column vector $\begin{bmatrix}   b_1  \\ b_2 \\ \cdots \\ b_n  \end{bmatrix} $
is the sum $a_1 b_1 + a_2 b_2 + \cdots a_n b_n$. \pz
\end{definition}

Note that the dot product of two vectors is not another vector but a number. \pz
The dot product arises in many contexts, especially geometry.  \pb

\begin{theorem}
The dot product of $v$ and $w$ is zero if and only if 
the line between $O$ and $v$ is perpendicular to the line between
$O$ and $w$, \pz where $O$ is the origin - the point  $(0, \ldots, 0)$. \pz  
\end{theorem}

\begin{example}
Verify this theorem when $v = \begin{bmatrix}  1 & 2 \end{bmatrix}$
and $w = \begin{bmatrix} 6 \\ -3 \end{bmatrix}.$  \pz
\end{example}

Dot products also supply us with alternate notation for linear equations. \pz

\begin{example}
$$\begin{bmatrix}  3 & 2\end{bmatrix} \cdot \begin{bmatrix} x \\ y 
\end{bmatrix} = 5 $$
is an alternate notation for the equation $3x + 2y = 5$. \pz 
\end{example}

Any collection of related data \pz (that is any series of numbers) \pz
can (and rightfully should) be collected in a vector.  \pz  The dot
product is then useful in describing linear relationships in that data. \pb

\begin{example}
Let $V$ denote the number of vampires in Sunnydale and $S$ be
the number of vampire slayers.  \pz  We may collect these data
in the vector$\begin{bmatrix} V \\ S \end{bmatrix}$.  \pz  Let $W$
be the number of vampires next year, \pz which is 1.2 times the
number of vampires this year minus 26 times the number of slayers. \pz
Then we have 
$$ W = \begin{bmatrix} 
1.2 & -26  
\end{bmatrix} \begin{bmatrix} V \\ S \end{bmatrix}.$$
\end{example}

\pb

{\Large Matrix multiplication} \pz

The multiplication of matrices often throws people for
a loop since it seems unnatural.  \pz  It builds on the dot
product of vectors, which is a helpful starting point. \pz

\begin{definition}
The product $M \cdot N$ of two matrices is the matrix
whose entry in the $i$th row and $j$th column
is the dot product of the $i$th row of $M$ and the $j$th column
of $N$, \pz when this is defined. 
\end{definition}

\pb

\begin{example}
(Try to) perform the following matrix multiplications:
$$
\begin{bmatrix}  1 & 2 \\  3 & 4 \end{bmatrix}  \begin{bmatrix}  -1 &  0 \\  \frac{1}{2} & -2 \end{bmatrix} \pz
\;\;\; \begin{bmatrix}  1  & 2 & 3\\ 4 & 5 & 6 \end{bmatrix} \begin{bmatrix}   -1 \\ 0 \\  1   \end{bmatrix} \pz
\;\;\; \begin{bmatrix}  1  & 2 & 3\\ 4 & 5 & 6 \end{bmatrix} \begin{bmatrix}  5 & -2 \\ 1 & 3 \end{bmatrix} \pz
$$
\end{example}

So, the matrices $M$ and $N$ can only be multiplied if the number of columns of
$M$ equals the number of rows of $N$. \pz  So in the second example, while the
two matrices given can be multiplied, they could not be if their order is reversed. \pz
Reversing order of matrices is a problem even when the multiplication is still
defined.  \pz  Compare our first example with the product
$  \begin{bmatrix}  -1 &  0 \\  \frac{1}{2} & -2 \end{bmatrix}   
\begin{bmatrix}  1 & 2 \\  3 & 4 \end{bmatrix}$.  \\

{\em Matrix multiplication is not commutative!  In general $M \cdot N$ is not equal to $N \cdot M$,
even when both are defined!}

You should be asking at this point: \pz why should I multiply matrices like this? \pz
Why can't I say $\begin{bmatrix}  1 & 2 \\ 3 & 4 \end{bmatrix} \times 
\begin{bmatrix}  5 & 6\\  7& 8 \end{bmatrix} = \begin{bmatrix}  5 & 12\\  21& 32 \end{bmatrix}$? \pz
At least that would be commutative... \pz

The answer is that you could, but you would not find it as useful as the matrix multiplication
defined using the dot product.  \pz  Experience with many kinds of problems ranging from
geometry and computer graphics to iterative processes and political science has shown
that the matrix multiplication just defined is a remarkably expedient.  \pz

\begin{example}
The system of equations 
\begin{eqnarray*}
2x + 3y = 5 \\
x - 2y = 3 \pz
\end{eqnarray*}

can be written in matrix-vector notation as
$$
\begin{bmatrix}  2 & 3 \\ 1  & -2  \end{bmatrix}
\begin{bmatrix}  x \\ y  \end{bmatrix} =
\begin{bmatrix}  5 \\ 3  \end{bmatrix} \pz
$$
\end{example}

Because matrix multiplication {\em is} associative, some applications
can be developed cleanly. \pz

\begin{example}
Suppose that the number of vampires and slayers in Sunnydale changes
from one year to the next according to 
$$\begin{bmatrix}   V_{new} \\  S_{new}  \end{bmatrix}
= \begin{bmatrix}   1.2 & -26 \\  \frac{1}{100} & 1 \end{bmatrix}
\begin{bmatrix}   V_{o} \\  S_{o}  \end{bmatrix}. \pz
$$
(Interpret this equation.) \pz
Then after ten year you would expect 
$$ \begin{bmatrix}   1.2 & -26 \\  \frac{1}{100} & 1 \end{bmatrix} 
\begin{bmatrix}   1.2 & -26 \\  \frac{1}{100} & 1 \end{bmatrix}   \cdots 
\begin{bmatrix}   1.2 & -26 \\  \frac{1}{100} & 1 \end{bmatrix} 
\begin{bmatrix}   V_{o} \\  S_{o}  \end{bmatrix}. $$
vampires and slayers to be on the prowl.
Because matrix multiplication is associative, this can be written
and computed more succinctly as
$$ \begin{bmatrix}   1.2 & -26 \\  \frac{1}{100} & 1 \end{bmatrix}^{10} 
\begin{bmatrix}   V_{o} \\  S_{o}  \end{bmatrix}. $$ \pz
\end{example}

This example is a taste of population modeling using matrices. \pz
For a more complete story, take Math 342. \pz


\end{document}
 