\documentclass{article}
\usepackage{enumitem,amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage[left=2.5cm,right=2.5cm, top=2cm, bottom=2cm,nohead,nofoot]{geometry}
\newenvironment{amatrix}[1]{%
  \left(\begin{array}{@{}*{#1}{r}|r@{}}
}{%
  \end{array}\right)
}
\def\dotprod#1#2{\vec{#1}\cdot\vec{#2}}
\def\vec#1{\mathbf{#1}}
\def\norm#1{\left|\!\left|#1\right|\!\right|}
\def\R{\mathbb{R}}
\def\df#1{\textbf{#1}}
\def\theorem{\par\noindent{\bf \underline{Theorem}} }
\def\proof{\par\noindent{\sl Proof.} }
\def\example{\par\noindent{\bf \underline{Example}} }
\def\remark{\par\noindent{\bf \underline{Remark}} }
\title{Summary of Day 4}
\author{William Gunther}
\date{May 22, 2014}

\begin{document}
\maketitle

\section{Objectives}
\begin{itemize}
	\item Explore more geometric properties of $\R^n$ by looking at dot products to capture the notions of lengths and angles.
	\item Calculate dot products and norms of vectors.
	\item Write parametric and normal equations for lines and planes in $\R^2$ and $\R^3$.
	\item Understand the connection between lines/planes and linear combinations of vectors.
	\item Define span and the geometric intuition.
\end{itemize}

\section{Summary}
\begin{itemize}
	\item Recall: In $\R^2$ a vector can be viewed as a directed line segmented. We can ask two questions about that line segment:
		\begin{itemize}
			\item What is the length?
			\item What is the angle it makes (with another vector, for instance)?
		\end{itemize}
	\item We define a type of multiplication between vectors called the \df{dot product} (or \df{scalar product}) which is an operation:
	\[
		\R^n \times \R^n \to \R
	\]
	That is, it is an operation between vectors of $\R^n$ that returns a scalar in $\R$ (hence the name scalar product). It is define as follows:

	If $\vec v, \vec w\in \R^n$ were: 
	\[ 
		\vec v = \begin{pmatrix} v_1\\v_2\\\vdots\\v_n \end{pmatrix} \qquad\quad \vec w = \begin{pmatrix} w_1\\w_2\\\vdots\\w_n \end{pmatrix} 
	\]
	Then we define:
	\[
		\dotprod v w := v_1 w_1 + v_2 w_2 + \cdots + v_n w_n = \sum_{i=1}^n v_i w_i
	\]
	\item This type of product will be generalized to other vector spaces; in an abstract vector space, this type of operation is called a \df{inner product}. Inner products are traditionally written as $\langle \vec u, \vec v\rangle$ instead of $\dotprod u v$. We'll use the latter notation because it is more specific: it is the dot product, which happens to be an inner product.
	\item There are some properties of the dot product we'd like to write down and prove.
	\theorem Let $\vec u, \vec v \in \R^n$ and $c\in \R$. Then :
		\begin{enumerate}
			\item $\dotprod u v = \dotprod v u$.
			\item $\vec u\cdot (\vec v+\vec w) = (\vec u \cdot \vec v) + (\vec u\cdot \vec w)$.
			\item $(c\vec u)\cdot\vec v = c(\vec u \cdot \vec v)$.
			\item $\vec u \cdot \vec u \geq 0$ and $\vec u \cdot \vec u = 0$ if and only if $\vec u=\vec 0$.
		\end{enumerate}
	\proof We will prove just property 4, because it's a little important for something we are about to define.

	There are two things we must show, so we will be begin by proving that $\vec u \cdot \vec u \geq 0$. We first can write down what $\vec u$ is as it is a vector in $\R^n$ therefore we can write it in the following form:
	\[ \vec u = [u_1, \ldots, u_n] \]
	Therefore, by the definition of the dot product:
	\[ \vec u \cdot\vec u= u_1u_1 + \cdots u_nu_n = u_1^2 + \cdots + u_n^2 = \sum_{i=1}^n u_i^2 \]
	It is true that for every real number $c$ we have that $c^2 \geq 0$; therefore, the above is the sum of $n$ non-negative numbers, therefore itself is non-negative. Thus $\vec u\cdot \vec u \geq 0$ which is what we wanted.

	Now we need to show the next condition: $\vec u \cdot \vec u = 0$ if and only if $\vec u=\vec 0$. For this, as it is an `if and only if' we must show two direction: that the left implies thr right, and the right implies the left. 

	We begin by showing that the left implies the right. So we assume that $\vec u \cdot \vec u = 0$ and hope to show that $\vec u = 0$. Let $\vec u$ be as above, and then, as above, $\vec u \cdot \vec u = \sum_{i=1}^n u_i^2$. Suppose, for sake of contradiction that this quantity was non-zero. Then it must be that at least one of the things in the sum is non-zero; so $u_i^2\neq 0$. This holds only when $u_i\neq 0$, which means that $\vec u \neq \vec 0$ as the $i$th component is nonzero.

	Next we show the right implies the left. This direction is easier; we need only show that $\vec 0 \cdot \vec 0 = 0$, which it does as $\sum_{i=0}^n (0)(0) = 0$ \qed
	\item We now define a \df{norm} on a the vector space on $\R^n$; we write the norm of vector $\vec v$ as $\norm{\vec v}$ and define it as:
	\[ \norm{\vec v} := \sqrt{ \vec v \cdot \vec v } \]
	Note that this makes sense; $\vec v \cdot \vec v$ is always a real number, and by property $4$ above it is always non-negative, so it has a square root.
	\item The norm of a vector is suppose to give a measurement of length. We already know from geometry was the length of one of these line segments is in $\R^2$ and $\R^3$; we can check that this notion of length coincides with out expectations:
	\example $\norm{ [v_1, v_2] } = \sqrt{ v_1^2 + v_2^2 }$, which is what we'd expect from the Pythagorean Theorem.
	\item The norm has several properties that we'd like to pick out an identify.
	\theorem Let $\vec v\in \R^n$ and $c\in \R$. Then:
	\begin{enumerate}
		\item $\norm{\vec v} = 0$ if and only if $\vec v = 0$.
		\item $\norm{c\vec v} = c\norm{\vec v}$.
	\end{enumerate}
	\proof You should try to write out a formal proof, but these follow pretty straightforwardly from the inner product properties 3 and 4 above, and the definition of the norm. \qed
	\item There are two fundamental properties involving norms and inner products: the \df{Triangle inequality} and the \df{Cauchy-Schwarz inequality}. We will prove the former using the latter, and revisit Cauchy-Schwarz later in the course.
	\theorem (The Cauchy Schwarz inequality) \[ \dotprod u v \leq \norm{\vec{u}}\norm{\vec{v}} \]
	\theorem (The Triangle inequality) \[ \norm{\vec{u} + \vec{v}} \leq \norm{\vec u}\norm{\vec v} \]
	\proof (of Triangle inequality). 
		\begin{alignat*}{3}
			\norm{\vec u + \vec v}^2 &= (\vec u + \vec v) \cdot (\vec u + \vec v) &\qquad&\text{by dfn of norm}\\
			&= (\vec u + \vec v) \cdot \vec u + (\vec u + \vec v) \cdot \vec v &&\text{dot product property}\\
			&= \vec u \cdot \vec u + \vec v \cdot \vec u + \vec u \cdot \vec v + \vec v \cdot \vec v &&\text{same property}\\
			&= \norm{\vec u}^2 + 2(\vec v\cdot \vec u) + \norm{\vec v}^2 &&\text{communitivity of dot product and dfn of norm}\\
			&= \norm{\vec u}^2 + 2|\vec v\cdot \vec u| + \norm{\vec v}^2 && |x| \geq x\text{ for all $x\in \R$}\\
			&\leq \norm{\vec u}^2 + 2\norm{\vec v}\norm{\vec u} + \norm{\vec v}^2 &&\text{Cauchy-Schwarz}\\
			&= (\norm{\vec u} + \norm{\vec v})^2 &&\text{factor}
		\end{alignat*}
		Therefore, $\norm{\vec u + \vec v}^2 \leq (\norm{\vec u} + \norm{\vec v})^2$. As all quantities are positive, we can conclude that: \[\norm{\vec u + \vec v} \leq \norm{\vec u} + \norm{\vec v}\]
	\item We can also measure the length between two vectors using the norm:

	The distance between the tips of the vectors $\vec v$ and $\vec u$ is $\norm{\vec v - \vec u}$.
	\item We can also measure angles with the dot product

	You can use the law of cosines to get the following formula for $\theta$
	\[
		\cos(\theta) = \frac{ \vec u \cdot \vec v}{\norm{\vec u}\norm{\vec v}}
	\]	
	\item The most important part of the above calculation is we can now describe what it means for 2 angles to be orthogonal to each other. Two vectors $\vec v$ and $\vec u$ are \df{orthogonal} if $\vec u \cdot \vec v = 0$. 

	This is the definition of orthogonal; you can see it coincides with what you'd expect. Namely $\vec u \cdot \vec v = 0$ if and only if the angle between them is $90$ degrees. 
	\item We can also use vectors to describe lines and planes in $\R^n$ (but in particular, we'll stick to $\R^2$ and $\R^3$ because those are the only ones that we mere mortals can easily visualize).
	\item Recall (from earlier math classes) that a line in $\R^2$ is given by the equation $ax + by = c$ (or sometimes $y = mx + b$). 
	
	It is the set of all points that go through a particular point (which we can describe by the vector $\vec p$ pointing at the point) with a particular slope (which we can describe by a vector $\vec d$ parallel to the slope of the line). 

	Let $\vec x$ signify a point on the line. What relationship should hold between $\vec x$, $\vec p$ and $\vec d$? Well, it should be the case that if you move the line to the origin (by subtracting $\vec p$) you should be able to stretch $\vec d$ by some quantity to hit the point. That is: \[ \vec x - \vec p = t \vec d \] $t$ in this instance is called the \df{parameter}; we can imagine $t$ varying and as it does it `draws' the line in $\R^2$. Solving for $\vec x$ you get the following equation (which should look like $y=mx + b$): \[ \vec x = t\vec d + \vec p \]

	\item We could also describe a line by finding a vector $\vec v$ which is orthogonal to the line. Let's call $\vec n$ a vector which is orthogonal to the line (this is called a \df{normal vector} to the line). Then we want that if you dot $\vec n$ with a vector pointing at point on the line offset by the point $\vec p$ you should get $0$; that is:
	\[ \vec n \cdot (\vec x - \vec p) = 0 \]
	This should look like $ax + bx = c$; particular if you move the constants to the right hand side:
	\[	
		\vec n \cdot \vec x = \vec n \cdot \vec p
	\]
	\item The last equation actually would describe a plane in $\R^3$; there is a vector $\vec n$ which is orthogonal to all points on a place. Therefore, if you knew this vector and a point on the plane, the above would describe all such points.

	Given two vector $\vec u$ and $\vec v$ on the plane (non-parallel), you could find a vector $\vec n$ which is orthogonal to both (using perhaps the \df{cross product}, which we will not talk about this his course; you could also use the dot product and solve some equations) and you'd get the following parametric equation:
	\[
		\vec x - \vec p = s\vec u + t \vec v
	\]
	Here, $s$ and $t$ are both parameters. If you fix one of the parameters then you can see that you are drawing a line. As both vary though, you are drawing a plane.
	\item This last section is really to help you build geometric intuition for $\R^n$. It is a useful skill to be able to visualize particular sets of points as geometric objects, like lines and planes.
	\example Consider a system where this is the augmented matrix:
	\[
		\begin{amatrix}{2}
			1 & 3 & 1 \\
			0 & 0 & 0
		\end{amatrix}
	\]
	The only restriction for the solution is that $x + 3y = 1$. This is a linear in $\R^2$. 
	\item We define the \df{span} of a set of vectors as the set of all linear combinations of these vectors.
\end{itemize}


\end{document}
