\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{systeme}

\usepackage{xcolor}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}

\usepackage{tikz}
%\usepackage{pgfplots}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
%\tikzstyle{bball} = [circle,shading=ball, ball color=blue,
%    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{miniball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=0.5pt]
%\tikzstyle{bminiball} = [circle,shading=ball, ball color=blue,
%    minimum size=1mm,inner sep=0.5pt]
%\tikzstyle{redminiball} = [circle,shading=ball, ball color=red,
%    minimum size=1mm,inner sep=0.5pt]
%\tikzstyle{mminiball} = [circle,shading=ball, ball color=black,
%    minimum size=0.6mm,inner sep=0.1pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*}

%\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}

\parskip = 0.05in
\parindent = 0.0in

\allowdisplaybreaks

%\pagestyle{empty}

\begin{document}
\centerline{Math 201 lecture for Friday, Week 1}
\bigskip

\centerline{\bf Introduction to $\R$}
\medskip

We will start the study of abstract vector spaces in the next class.  Today, we
will introduce a particular vector space, $\R^n$, and informally discuss some of
its subspaces (lines, planes, etc.)

\textbf{Definition.} \emph{Real $n$-space} is the set
\[
  \R^n:=\underbrace{\R\times\cdots\times \R}_{\text{$n$-factors}}:=
  \{(x_1,\ldots,x_n): x_i\in\R \text{ for $i=1,\ldots,n$}\}.
\]
with two operations: \emph{addition} $+\colon\R\times \R\to\R$ and \emph{scalar
multiplication} $\cdot\colon \R\times\R^{n}\to\R^n$ defined, respectively, as follows:
\[
  (x_1,\ldots,x_n)+(y_1,\ldots,y_n):=(x_1+y_1,\ldots,x_n+y_n),
\]
and
\[
  \lambda (x_1,\ldots,x_n):=(\lambda x_1,\ldots,\lambda x_n)
\]
for all $(x_1,\ldots,x_n), (y_1,\ldots,y_n)\in\R^n$ and $\lambda\in\R$.

\textbf{Example 1.} In $\R^{4}$,
\[
  (4,0,-2,1) + (3, 1,2,-4)= (7,1,0,-3)
\]
and
\[
  2(0,3,3,7)=(0,6,6,14).
\]

We will often think of points in~$(x_1,\ldots,x_n)\in\R^{n}$ as column vectors or
column matrices:
\[
\left(\begin{array}{c}
   x_1\\ \vdots\\ x_n
\end{array}\right).
\]

\textbf{Example 2.}
\[
  2
\left(\begin{array}{r}
   1\\ 2\\ 4
\end{array}\right)
-
\left(\begin{array}{r}
   3\\ 0\\ -4
\end{array}\right)
=
\left(\begin{array}{r}
   -1\\ 4\\ 12
\end{array}\right).
\]

There are two standard ways to interpret an element $p\in\R^{n}$: either as
\emph{point} in space or as a \emph{vector} (thought of as an arrow or direction\footnote{The
word ``vector'' will soon have a technical definition: an element of a vector
space.})
For instance, we can think of~$(1,2)\in\R^{2}$ as point:
\begin{center}
  \begin{tikzpicture}[>=latex,scale=0.5,line cap=round]
   \draw[->] (-2,0) -- (5,0) node[right]{$x$};
   \draw[->] (0,-2) -- (0,4) node[above]{$y$};
   \draw (1,0.1)--(1,-0.1) node[below] {$1$};
   \draw (0.1,2)--(-0.1,2) node[left] {$2$};
   \node[miniball] at (1,2) {};
  \end{tikzpicture}
\end{center}
or as an arrow/direction:
\begin{center}
  \begin{tikzpicture}[>=latex,scale=0.5,line cap=round]
   \draw[->] (-2,0) -- (7,0) node[right]{$x$};
   \draw[->] (0,-2) -- (0,7) node[above]{$y$};
   \draw[->] (0,0) -- (1,2);
   \draw[->] (4,4) -- (5,6);
   \draw (1,0.1)--(1,-0.1) node[below] {$1$};
   \draw (0.1,2)--(-0.1,2) node[left] {$2$};
   \draw (4,0.1)--(4,-0.1) node[below] {$4$};
   \draw (5,0.1)--(5,-0.1) node[below] {$5$};
   \draw (0.1,4)--(-0.1,4) node[left] {$4$};
   \draw (0.1,6)--(-0.1,6) node[left] {$6$};
  \end{tikzpicture}
\end{center}
Geometrically, addition of vectors is given by the ``parallelogram rule'' and
scalar multiplication amounts to scaling the length of a vector but not its
directions (except that scaling by a negative number reverses direction):
\begin{center}
  \begin{tikzpicture}[scale=0.6]
    \node[miniball] (0) at (0,0) {};
    \node[label={right:$u$}] (u) at (2,1) {};
    \node[label={below left:$v$}] (v) at (1,3) {};
    \node[label={right:$u+v$}] (u+v) at (3,4) {};
    \draw[->] (0,0)--(2,1);
    \draw[->] (0,0)--(1,3);
    \draw[dashed] (2,1)--(3,4);
    \draw[dashed] (1,3)--(3,4);
    \begin{scope}[xshift=7cm]
      \node[miniball] (0) at (0,0) {};
      \node[label={below:$u$}] (u) at (2,1) {};
      \node[label={below:$3u$}] (3u) at (6,3) {};
      \draw[->] (0)--(u);
      \draw[->] (0)--(3u);
    \end{scope}
    \begin{scope}[xshift=21cm]
      \node (0) at (0,0) {};
      \node[label={below:$u$}] (u) at (2,1) {};
      \node[label={below:$-2u$}] (-2u) at (-4,-2) {};
      \node[miniball] at (0,0) {};
      \draw[->] (0.center)--(u.center);
      \draw[->] (0.center)--(-2u.center);
    \end{scope}
  \end{tikzpicture}
\end{center}
\bigskip

\textbf{Definition (line in~$\R^{n}$).} Let~$p,v\in\R^n$,
with~$v\neq(0,\ldots,0)$.  Then 
\[
  \{p+\lambda v:\lambda\in\R\}
\]
is the \emph{line in~$\R^{n}$ in the direction of~$v$ and passing through the
point~$p$}.

\Needspace{3\baselineskip}
\textbf{Remarks.}\
\begin{enumerate}
  \item In the above definition, the set of all scalar multiples of~$v$, i.e.,
$\{\lambda v:\lambda\in\R\}$, gives a line \emph{through the origin} in the direction
of~$v$.  We then translate that line through the origin by~$p$.  In that
translation, the origin is translated to the point~$p$ (and, thus, the resulting
line contains the point~$p$). 
  \item We say the function
\begin{align*}
  \R&\to\R^{n}\\
  t&\mapsto p+t v
\end{align*}
is a \emph{parametrization} of the line passing through~$p$ in the direction
of~$v$.  Its image is the line, itself.  We could use $\lambda$ or any symbol
here instead of $t$, of course.  We are using $t$ to connote time.  We think of the
parametrization as giving the position at each time $t$ of a point traveling
along the line.)
  \item \textbf{Exercise.} Try to show that if~$q$ is any point on the line $\{p+\lambda v:\lambda\in\R\}$ and $w$
    is any nonzero scalar multiple of~$v$, then
    \[
     \{q+\lambda w:\lambda\in\R\} = \{p+\lambda v:\lambda\in\R\}
    \]
    So the same line may be described in many different ways.  (This is not hard
    to do: start with an arbitrary element of the set on the left-hand side, and then show
    that is contained in the set on the right-hand side.)
\end{enumerate}


\textbf{Example 3.} Give a parametrization of the line through the points $(1,2,0)$ and $(0,1,1)$ in
$\R^{3}$.
\smallskip

\emph{Solution.}  For the direction, we may choose~$v =
(0,1,1)-(1,2,0)=(-1,-1,1)$.  (We think of $v$ as the vector with head $(0,1,1)$
and tail $(1,2,0)$).  We then pick any point on the line, say $p=(1,2,0)$.
Then our line has the parametrization
\[
  t\mapsto p+t v = (1,2,0)+t\left((0,1,1)-(1,2,0)\right)=(1,2,0)+t(-1,-1,1).
\]
Setting~$t$ equal to~$0$ and~$1$, respectively, shows that this line
really does pass throught the points $(1,2,0)$ and $(0,1,1)$.
Here is an alternative way to write this parametrization:
\[
  t\mapsto (1-t,2-t,t).
\]

\textbf{Example 4.} \emph{A line in~$\R^2$ can always be expressed as the solution set
to a single linear equation.}  For example, consider the line
\[
  L:=\{(3,2)+\lambda(1,5):\lambda\in\R\}.
\]
A point~$(x,y)$ lies on this line~$L$ if and only if
\[
  (x,y)=(3,2)+\lambda(1,5)=(3+\lambda,2+5\lambda)
\]
for some~$\lambda\in\R$.  It follows that
\begin{align*}
  (x,y)\in L&\Longleftrightarrow x=3+\lambda\quad\text{and}\quad
  y=2+5\lambda\text{ for some $\lambda$}\\
	    &\Longleftrightarrow x-3=\lambda\quad\text{and}\quad \frac{1}{5}(y-2)=\lambda\text{ for some $\lambda$}\\
&\Longleftrightarrow x-3=\frac{1}{5}(y-2)\\
&\Longleftrightarrow 5x-15=(y-2)\\
&\Longleftrightarrow 5x-y=13.
\end{align*}
So the line~$L$ is the set of solutions to~$5x-y=13$.

\textbf{Example 5.} \emph{A line in $\R^{3}$ is always the solution set to a
system of two linear equations.}  For example, consider the line through the
points $(1,0,2)$ and $(3,1,-1)$, parametrized by
\[
  t\mapsto (1,0,2) +t\left((3,1,-1)-(1,0,2)\right) = (1,0,2)+t(2,1,-3).
\]
We would like to find a system of two linear equations whose solution set is
this line.  A linear equation in~$\R^{3}$ has the form
\[
  ax+by+cz=d.
\]
We would like to find $a,b,c,d$ so that the solution set for this equation contains the points
$(1,0,2)$ and $(3,1,-1)$.  It turns out that this will force the whole line to
be contained in the solution set.  To contain these points, we need
\[
  \sysdelim..
  \systeme{a+2c=d,3a+b-c=d.}
\]
To solve this system, we first put it in reduced row echelon form by
substracting~$3$ times the first equation from the second to get
\[
  \sysdelim..
  \systeme{a+2c=d,b-7c=-2d.}
\]
Solve for the pivot variables:
\[
  \sysdelim..
  \systeme{a=-2c+d,b=7c-2d.}
\]
To find two \emph{independent} solutions\footnote{The precise meaning 
of \emph{independence} is left for later.}, we first set $(c,d)=(1,0)$, in which
case
\[
  a=-2, b=7, c=1\text{ and } d=0.
\]
We stick these values into $ax+by+cz=d$ to get our first linear equation
\[
  -2x+7y+z=0.
\]
Next we set $(c,d)=(0,1)$ to get
\[
  a=1, b=-2, c=0\text{ and } d=1
\]
with corresponding linear equation
\[
  x-2y=1.
\]
In sum, our line is the solution set to the system
\[
  \sysdelim..
  \systeme{-2x+7y+z=0,x-2y=1.}
\]
The reader should check that our original points, $(1,0,2)$ and $(3,1,-1)$ are
both solutions to this system.
\medskip

\textbf{Definition (plane in~$\R^{n}$).} Let~$p,v,w\in\R^n$. Suppose that $v$
and~$w$ are nonzero and that neither is a scalar multiple of the other.  Then
\[
  \left\{p+\lambda v+\mu w: (\lambda,\mu)\in\R^{2}\right\}
\]
is the plane in~$\R^{n}$ containing~$p$ and with directions\footnote{The word
``directions'' here is not quite standard but will do for now} $v$ and $w$.
\medskip

The plane in the above definition has the \emph{parametrization}
\begin{align*}
  \R^{2}&\to \R^{n}\\
  (s,t)&\mapsto p + sv + tw.
\end{align*}

\textbf{Example 6.} Find the plane~$P$ through the points $(0,2,-1)$, $(4,2,1)$, and
$(1,0,1)$.  Describe both parametrically and as the solution set to a single
linear equation.
\smallskip

\emph{Solution.} To find the directions, we fix any of the three points, say
$(4,2,1)$, and we consider the two arrows having this point as their tail and
$(0,2,-1)$ and $(1,0,1)$ as their heads:
\begin{align*}
  v&=\left((0,2,-1)-(4,2,1)\right)=(-4,0,-2)\\
  w&=\left((1,0,1)-(4,2,1)\right)=(-3,-2,0).
\end{align*}

\Needspace{3\baselineskip}
Geometrically, we have the following picture for these directions:
\begin{center}
  \begin{tikzpicture}
    \node[miniball,label={below:$(4,2,1)$}] at (0,0) (tail) {};
    \node at (2,2) (h1) {};
    \node at (2.2,2.2) {$(0,2,-1)$};
    \node[label={right:$(1,0,1)$}] at (4,1) (h2) {};
    \draw[->] (tail)--(h1) node[midway, above left] {$v$};
    \draw[->] (tail)--(h2) node[midway, below right] {$w$};
  \end{tikzpicture}
\end{center}
So a parametric description of the line is
\[
  \left\{(4,2,1)+\lambda(-4,0,2)+\mu(-3,-2,0): \lambda,\mu\in\R\right\}.
\]
or
\[
  \left\{(4-4\lambda-3\mu,2-2\mu,1+2\lambda): \lambda,\mu\in\R\right\}.
\]

As an aside: this parametric description is great for drawing the plane using a
computer.  For instance, the Sage code for plotting this plane could be:
\begin{verbatim}
  s,t = var("s,t")
  parametric_plot3d((4-4*s-3*t,2-2*t,1+2*s),(s,-1,1),(t,-1,1))
\end{verbatim}

We would now like to describe the plane~$P$ as the solution set of a single
linear equation.  That equation will have the form 
\[
  ax+by+cz=d
\]
for some $a,b,c,d\in\R$.  Our job is to find $a,b,c,d$.  (Scaling an equation
does not change its solution set, so our solution will only be unique up to such
scaling.)  For~$P$ to contain $(0,2,-1)$, $(4,2,1)$, and $(1,0,1)$, we need
\[
  \sysdelim..
  \systeme{2b-c=d,4a+2b+c=d,a+c=d.}
\]
Reducing to row echelon form and solving for pivot variables, we find
\begin{align*}
  a&=-d\\
  b&=\frac{3}{2}d\\
  c&=2d.
\end{align*}
We are free to choose any nonzero value for~$d$ (again: our solution is only
unique up to scaling). We choose~$d=2$ (to get rid of the denominator
of~$2$).  Therefore, the plane $P$ is the solution set to the equation
\[
  -2x+3y+4z=2.
\]
\end{document}
