
\section{What is Linear Algebra?}

In this course, we'll learn about three main topics: Linear Systems, Vector Spaces, and Linear Transformations.  Along the way we'll learn about matrices and how to manipulate them.  

For now, we'll illustrate some of  the basic ideas of the course in the two dimensional case.  We'll see everything carefully defined later
and start with some simple examples to get an idea of the things we'll be working with.

\begin{example}
Suppose I have a bunch of apples and oranges.  Let $x$ be the number of apples I have, and $y$ be the number of oranges I have.  As everyone knows, apples and oranges don't mix, so if I want to keep track of the number of apples and oranges I have, I should put them in a list.  We'll call this list a \emph{vector,}\index{Vector!in ${\mathbb R}^2$} and write it like this: $(x,y)$.  The order here matters!  I should remember to always write the number of apples first and then the number of oranges - otherwise if I see the vector $(1,2)$, I won't know whether I have two apples or two oranges.
\end{example}


This vector in the example is just a list of two numbers, so if we want to, we can represent it with a point in the plane with the corresponding coordinates, like so:

\vspace{2mm}
\begin{tikzpicture}[domain=0:4]
    \draw[->] (-0.2,0) -- (4.2,0) node[right] {$\mbox{Apples}$};
    \draw[->] (0,-1.2) -- (0,4.2) node[above] {$\mbox{Oranges}$};
    \draw[->] (0,0) -- (2,3) node[anchor=south east] {$(x,y)$};
\end{tikzpicture}

In the plane, we can imagine each point as some combination of apples and oranges (or parts thereof, for the points that don't have integer coordinates).  Then each point corresponds to some vector.  The collection of all such vectors---all the points in our apple-orange plane---is an example of a \emph{vector space}.

\begin{example}  There are 27 pieces of fruit in a barrel, and twice as many oranges as apples.  How many apples and oranges are in the barrel?

How to solve this conundrum?  We can re-write the question mathematically as follows:

\begin{eqnarray*}
	x+y & = & 27 \\
	\phantom{x+}y & = & 2x
\end{eqnarray*}
\end{example}

This is an example of a \emph{Linear System}\index{Linear System!concept of}.  It's a collection of equations in which variables are multiplied by constants and summed, and no variables are multiplied together:  There are no powers of $x$ or $y$ greater than one, or any places where $x$ and $y$ are multiplied together.

Notice that we can solve the system by manipulating the equations involved.  First, notice that the second equation is the same as $-2x+y=0$.  Then if you subtract the second equation from the first, you get on the left side $x+y - (-2x+y) = 3x$, and on the left side you get $27-0=27$.  Then $3x=27$, so we learn that $x=9$.  Using the second equation, we then see that $y=18$.  Then there are 9 apples and 18 oranges.

Let's do it again, by working with the list of equations as an object in itself.  First we rewrite the equations tidily:

\begin{eqnarray*}
	x+y & = & 27 \\
	2x-y & = & 0
\end{eqnarray*}

We can express this set of equations with a matrix as follows:

\begin{equation*}
    \begin{pmatrix}
      1             &2  \\
      2             &-1
    \end{pmatrix}
  \colvec{x \\ y}
  =
  \colvec{27 \\ 0}
\end{equation*}

The square list of numbers is an example of a \emph{matrix}.  We can multiply the matrix by the vector to get back the linear system using the following rule for multiplying matrices by vectors:

\begin{equation*}
    \begin{pmatrix}
      a             &b  \\
      c             &d
    \end{pmatrix}
  \colvec{x \\ y}
  =
  \colvec{ax+by \\ cx+dy}
\end{equation*}

The matrix is an example of a \emph{Linear Transformation}\index{Linear Transformation!concept of}, because it takes one vector and turns it into another in a ``linear'' way.

Our next task is to solve linear linear systems, we'll learn a general method called Gaussian Elimination.

\newpage

\section*{References}

Hefferon, Chapter One, Section 1

Wikipedia, \href{http://en.wikipedia.org/wiki/System_of_linear_equations}{Systems of Linear Equations}

\section*{Review Problems}

\begin{enumerate}
\item Let $M$ be a matrix and $u$ and $v$ vectors:

$
M=    \begin{pmatrix}
      a             &b  \\
      c             &d
    \end{pmatrix},
v = \colvec{ x \\ y }, u = \colvec{ w \\ z } 
$.


  \begin{enumerate}
  \item \emph{Propose} a definition for $u+v$.
  \item \emph{Check} that your definition obeys $Mv+Mu = M(u+v)$.
  \end{enumerate}

\item Pablo is a nutritionist who knows that oranges always have twice as much sugar as apples.  When considering the sugar intake of schoolchildren eating a barrel of fruit, the represents the barrel like so: 

\begin{tikzpicture}[domain=0:4]
    \draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
    \draw[->] (-0.2,0) -- (4.2,0) node[right] {$sugar$};
    \draw[->] (0,-1.2) -- (0,4.2) node[above] {$fruit$};
    \draw[->] (0,0) -- (2,3) node[anchor=south east] {$(s,f)$};
\end{tikzpicture}

\emph{Find} a linear transformation relating Pablo's representation to the one in the lecture.  Write your answer as a matrix.


\item 
    There are methods for solving linear systems other 
    than Gauss' method.
    One often taught in high school is to solve one of the 
    equations for a variable, then substitute the resulting expression into
    other equations.
    That step is repeated until there is an equation with only one
    variable.
    From that, the first number in the solution is derived, and then 
    back-substitution can be done.
    This method takes longer than Gauss' method, since it involves
    more arithmetic operations, and is also more
    likely to lead to errors.
    To illustrate how it can lead to wrong conclusions, we will use the system 
    \begin{equation*}
      \begin{linsys}{2}
            x  &+  &3y  &=  &1  \\
            2x  &+  &y   &=  &-3 \\
            2x  &+  &2y  &=  &0  
      \end{linsys}
    \end{equation*}

    \begin{enumerate}
      \item Solve the first equation for $x$ and 
        substitute that expression into the second equation.
        Find the resulting $y$.
      \item Again solve the first equation for $x$, 
        but this time substitute that expression into the third equation.
        Find this $y$.
    \end{enumerate}
    What extra step must a user of this method take to avoid 
    erroneously concluding a system has a solution?

\end{enumerate}

\newpage
