\section{ Vectors in Space, $n$-Vectors }

In vector calculus classes, you  encountered three dimensional vectors.  Now we will develop the notion of $n$-vectors and learn some of their properties.

We begin by looking at the space $\mathbb{R}^n$, which we can think of as the space of points with $n$ coordinates.  We then specify an \emph{origin} $O$, a favorite point in $\mathbb{R}^n$.  Now given any other point $P$, we can draw a \emph{vector} $v$ from $O$ to $P$.  Just as in $\mathbb{R}^3$, a vector has a \emph{magnitude} and a \emph{direction}.  

If $O$ has coordinates $(o^1, \ldots, o^n)$ and $p$ has coordinates $(p^1, \ldots, p^n)$, then the \emph{components} of the vector $v$ are $\colvec{p^1 - o^1 \\ p^2- o^2 \\ \vdots \\ p^n - o^n }$.  This construction allows us to put the origin anywhere that seems most convenient in $\mathbb{R}^n$, not just at the point with zero coordinates\footnote{Do not be confused by our use of a superscript to label components of a vector. Here $v^2$ denotes
the second component of a vector $v$, rather than a number $v$ squared!}.  

Most importantly, we can {\it add} vectors and {\it multiply} vectors by a scalar. 

\begin{definition} Given two vectors, $u=\colvec{u^1 \\ \vdots \\ u^n }$ and $v=\colvec{v^1 \\ \vdots \\ v^n }$ their \emph{sum}\index{Vector addition!$n$-vectors} $$u+v = \colvec{ u^1+v^1 \\ \vdots \\ u^n+v^n}\, .$$  
Given a scalar $c$, the \emph{scalar multiple}\index{Scalar multiplication!$n$-vectors} $$cu = \colvec{ cu^1 \\ \vdots \\ cu^n}\, .$$
\end{definition}

A special vector is the \emph{zero vector}\index{Zero vector!$n$-vectors} connecting the origin to itself.  All of its components are zero.  Notice that with respect to the usual notions of Euclidean geometry, it is the only vector with zero magnitude, and the only one which points in no particular direction.  Thus, any single vector determines a line, \emph{except} the zero-vector.  Any scalar multiple of a non-zero vector lies in the line determined by that vector.

The line determined by a non-zero vector $v$ through a point $P$ can be written as $\{ P + tv | t \in \mathbb{R} \}$.  For example, $\{ \colvec{1\\2\\3\\4} + t\colvec{1\\0\\0\\0} | t \in \mathbb{R} \}$ describes a line in 4-dimensional space parallel to the $x$-axis.

Given two non-zero vectors, they will \emph{usually} determine a plane, unless both vectors are in the same line.  In this case, one of the vectors can be realized as a scalar multiple of the other.  The sum of $u$ and $v$ corresponds to laying the two vectors head-to-tail and drawing the connecting vector.  If $u$ and $v$ determine a plane, then their sum lies in plane determined by $u$ and~$v$.

The plane determined by two vectors $u$ and $v$ can be written as $$\{ P + su + tv | s, t \in \mathbb{R} \}\, .$$  

\begin{example}
$$\left\{ \colvec{3\\1\\4\\1\\5\\9} + s\colvec{1\\0\\0\\0\\0\\0} + t\colvec{0\\1\\0\\0\\0\\0} | s, t \in \mathbb{R} \right\}$$ describes a plane in 6-dimensional space parallel to the $xy$-plane.
\end{example}

\vspace{2mm}
We can generalize the notion of a plane:  

\begin{definition} A set of $k$ vectors $v_1, \ldots, v_k$ in $\mathbb{R}^n$ with $k\leq n$ determines a $k$-dimensional \emph{hyperplane}\index{Hyperplane}, unless any of the vectors $v_i$ lives in the same hyperplane determined by the other vectors.  If the vectors do determine a $k$-dimensional hyperplane, then any point in the hyperplane can be written as:

\[
\{ P + \sum_{i=1}^{k} \lambda_iv_i | \lambda_i \in \mathbb{R} \}
\]
\end{definition}

\subsection{Directions and Magnitudes}

Consider the Euclidean length\index{Euclidean length} of a vector: 
\[
||v|| = \sqrt{(v^1)^2 + (v^2)^2+\cdots(v^n)^2}\ =\ \sqrt{ \sum_{i=1}^n (v^i)^2 }\: .
\]
Using the Law of Cosines\index{Law of Cosines}, we can then figure out the angle between two vectors.  Given two vectors $v$ and $u$ that span a plane in $\mathbb{R}^n$, we can then connect the ends of $v$ and $u$ with the vector $v-u$.  Then the Law of Cosines states that:

\[ 
||v-u||^2 = ||u||^2 + ||v||^2 - 2||u||\,  ||v|| \cos \theta 
\]
Then isolate $\cos \theta$:

\begin{eqnarray*}
||v-u||^2 - ||u||^2 - ||v||^2 &=& (v^1-u^1)^2 + \ldots + (v^n-u^n)^2 \\
& & \qquad - ((u^1)^2 + \ldots + (u^n)^2) \\
& & \qquad - ((v^1)^2 + \ldots + (v^n)^2) \\
& = & -2 u^1v^1 - \ldots - 2u^nv^n
\end{eqnarray*}
Thus, 
\[
||u||\  ||v|| \cos \theta = u^1v^1 + \ldots + u^nv^n\, .
\]
This motivates the definition of the dot product.

\begin{definition} The \emph{dot product}\index{Dot product} of two vectors $u=\colvec{u^1 \\ \vdots \\ u^n }$ and $v=\colvec{v^1 \\ \vdots \\ v^n }$ is 
$$u\dotprod v = u^1v^1 + \ldots + u^nv^n\, .$$
The \emph{length} of a vector\index{Length of a vector} 
$$||v|| = \sqrt{v\dotprod v }\, .$$
The \emph{angle}\index{Angle between vectors} $\theta$ between two vectors is determined by the formula $$u\dotprod v = ||u||||v||\cos \theta\, .$$
\end{definition}

\vspace{2mm}\noindent
The dot product has some important properties:
\begin{enumerate}
\item The dot product is \emph{symmetric}, so $$u\dotprod v = v\dotprod u\, ,$$
\item \emph{Distributive} so  $$u\dotprod (v+w) = u\dotprod v + u\dotprod w\, ,$$
\item \emph{Bilinear}, which is to say, linear in both $u$ and $v$.  Thus $$ u\dotprod (cv+dw) = c \, u\dotprod v +d \, u\dotprod w\, ,$$ and 
$$(cu+dw)\dotprod v = c\, u\dotprod v + d\, w\dotprod v\, .$$
\end{enumerate}

There are, in fact,  many different useful ways to define lengths of vectors.  Notice in the definition above how we defined the dot product, and then all the other definitions are dependent on the definition of the dot product.  So if we change our idea of the dot product, we change our notion of length and angle as well.  The dot product provide the \emph{Euclidean length and angle} between two vectors.  

Other definitions of length and angle arise from \emph{bilinear forms}, which have all of the properties listed above.   Instead of writing $\dotprod$ for other bilinear forms, we usually write $\langle u,v \rangle$ to avoid confusion.

\begin{example}
Consider a four-dimensional space, with a special direction which we will call ``time''.  The \emph{Lorentzian inner product} on $\mathbb{R}^4$ is given by $\langle u,v \rangle = u^1v^1 + u^2v^2 + u^3v^3 - u^4v^4$.  This is of central importance in Einstein's theory of special relativity.

As a result, the ``length'' of a vector with coordinates $x, y, z$ and $t$ is $||v|| = x^2 + y^2 + z^2 - t^2$.
\end{example}



\begin{theorem}[Cauchy-Schwartz Inequality]\index{Cauchy--Schwartz inequality}
For vectors $u$ and $v$ with an inner-product $\langle\, ,\rangle$,
\[ \frac{|\langle u,v \rangle|}{||u|| ||v||} \leq 1
\]
\end{theorem}

\begin{proof}
This follows from the definition of the angle between two vectors and the fact that $\cos \theta \leq 1$.
\end{proof}

\begin{theorem}[Triangle Inequality]\index{Triangle inequality}
Given vectors $u$ and $v$, we have:
\[ ||u+v|| \leq ||u|| + ||v|| \]
\end{theorem}

\begin{proof}

\begin{eqnarray*}
||u+v||^2 & = & (u+v)\dotprod (u+v) \\
 	& = & u\dotprod u + 2 u\dotprod v + v\dotprod v \\
	& = & ||u||^2 + ||v||^2 + 2\,  ||u||\,  ||v|| \cos \theta \\
	& = & (||u|| + ||v||)^2 + 2 \, ||u|| \, ||v|| (\cos \theta -1) \\
	& \leq & (||u|| + ||v||)^2	\\
\end{eqnarray*}

Then the square of the left-hand side of the triangle inequality is $\leq$ the right-hand side, and both sides are positive, so the result is true.
\end{proof}

\section*{References}

Hefferon: Chapter One.II

Relevant Wikipedia Articles:
\begin{itemize}
\item \href{http://en.wikipedia.org/wiki/Dot_product}{Dot Product}
\item \href{http://en.wikipedia.org/wiki/Inner_product_space}{Inner Product Space}
\item \href{http://en.wikipedia.org/wiki/Minkowski_metric}{Minkoski Metric}
\end{itemize} 

\section*{Review Questions}
\begin{enumerate}

\item \begin{itemize}
	\item[(2)] Find the angle between the diagonal of the unit square in $\mathbb{R}^2$ and one of the coordinate axes.

	\item[(3)] Find the angle between the diagonal of the unit cube in $\mathbb{R}^3$ and one of the coordinate axes.

	\item[(n)] Find the angle between the diagonal of the unit (hyper)-cube in $\mathbb{R}^n$ and one of the coordinate axes.

	\item[($\infty$)] What is the limit as $n \to \infty$ of the angle between the diagonal of the unit (hyper)-cube in $\mathbb{R}^n$ and one of the coordinate axes?
\end{itemize}

\item Consider the matrix 
$M = \begin{pmatrix}
\cos \theta & \sin \theta \\
-\sin \theta & \cos \theta \\
\end{pmatrix}
$ and the vector $X = \colvec{x\\y}$.
\begin{enumerate}
	\item Sketch $X$ and $MX$ in $\mathbb{R}^2$.
	\item Compute $\frac{||MX||}{||X||}$.
\end{enumerate}

\item Suppose in $\mathbb{R}^2$ I measure the $x$ direction in inches and the $y$ direction in miles.  Approximately what is the real-world angle between the vectors $\colvec{0\\1}$ and $\colvec{1\\1}$?  What is the angle between these two vectors according to the dot-product?  Give a definition for an inner product so that the angles produced by the inner product are the actual angles between vectors.

\item (Lorentzian Strangeness).  For this problem, consider $\mathbb{R}^n$ with the Lorentzian inner product and metric defined above. 
\begin{enumerate}
	\item Find a non-zero vector in two-dimensional Lorentzian space-time with zero length.

	\item Find and sketch the collection of all vectors in two-dimensional Lorentzian space-time with zero length.

	\item Find and sketch the collection of all vectors in three-dimensional Lorentzian space-time with zero length. 
\end{enumerate}

\end{enumerate}

\newpage
