% This is lecture no. 2 of MH1200/: Linear Algebra I.

\chapter{Vectors}

\begin{definition}
	Vector.
	A vector is an element in the set $\mathbb{R}^n$.
	There are three natural ways of thinking about vectors:
	\begin{itemize}
		\item An ordered list of $n$ real numbers: $(x_1,x_2,\ldots,x_n)$.
		\item A point in $n$-dimensions with coordinates: $(x_1,x_2,\ldots,x_n)$.
		\item An arrow from the origin to the point $(x_1,x_2,\ldots,x_n)$.
			This is known as a geometric vector.
	\end{itemize}
	We say that a vector $\vec{v}$ is in $\mathbb{R}^n$ like this:
	\[
		\vec{v} \in \mathbb{R}^n
	.\]
	The arrow symbolises that this mathematical object is a vector.
\end{definition}

\section{The Zero Vector}

There is a special vector call the \textbf{zero vector}.
This is just the element consisting of all zeros:
\[
	\underbrace{(0,\ldots,0)}_{n} \in \mathbb{R}^n
.\] 
We denote it: $\vec{0} \in \mathbb{R}^n$.

\section{Equality of Vectors}

If  $\vec{v}$ and $\vec{w}$ are vectors, they are precisely equal when they live in the same $\mathbb{R}^n$, and the corresponding components in the two vectors are equal.
In other words, if:
\[
	\vec{v} = (v_1,\ldots,v_n) \quad \text{and} \quad \vec{w} = (w_1,\ldots,w_n)
.\]
Then the following equations are all true:
\[
v_1 = w_1, \ldots, v_n = w_n
.\] 

\section{Operations on Vectors}

There are two \emph{fundamental operations} on vectors:
\begin{enumerate}
	\item We can add two vectors together to make a new one.
	\item We can multiply a vector by a real number.
\end{enumerate}

\subsection{Adding vectors in $\mathbb{R}^n$}
We add two vectors \emph{simultaneously} adding up their components:
\[
	(a_1,a_2,\ldots,a_n) + (b_1,b_2,\ldots,b_n) = (a_1+b_1,a_2+b_2,\ldots,a_n+b_n)
.\]
\begin{exmp}
	In $\mathbb{R}^3$:
	\[
		(1,2,3) + (-5,0,100) = (-4,2,103)
	.\] 
\end{exmp}

\subsection{Multiplication by a Scalar}
We multiply a vector $(a_1,\ldots,a_n) \in \mathbb{R}^n$ by a scalar  $c \in \mathbb{R}$ by simultaneously multiplying every entry by the scalar:
\[
	c(a_1,\ldots,a_n) = (ca_1,\ldots,ca_n) \in \mathbb{R}^n
.\]

\begin{exmp}
	In $\mathbb{R}^5$:
	\[
		(-10)(1,-0.2,2.5,10,0) = (-10,2,-25,-100,0) \in \mathbb{R}^5
	.\] 
\end{exmp}

\section{Geometric Solution Sets}
The full set:
\[
	S = {t(a,b) \in \mathbb{R}^2; t \in \mathbb{R}}
.\] is the line through the origin parallel to the vector $(a,b)$.

\bigbreak
\noindent
The full set:
\[
	S^\prime = {(c,d) + t(a,b) \in \mathbb{R}^2; t \in \mathbb{R}}
.\] is the line through the point $(c,d)$ parallel to the vector $(a,b)$.

\bigbreak
\noindent
In example \ref{parametriceqn}, we saw that the parameterized set of solutions to $5x_1+2x_2=10$ was:
\[
	S = \left\{\left(2 - \frac{2}{5}t,t\right)\in\mathbb{R}^2;t\in\mathbb{R}\right\} \subset \mathbb{R}^2
.\] 

We can rewrite this to see how it is built from geometric operations:
\begin{align*}
	\left(2-\frac{2}{5}t\right) & = (2,0) + \left(-\frac{2}{5}t,t\right) \\
			 & = (2,0) + t\left(-\frac{2}{5},1\right)
\end{align*}
Which is of the form $S^\prime = {(c,d) + t(a,b) \in \mathbb{R}^2; t \in \mathbb{R}}$, showing us that the geometric set of solutions is the line through the point $(2,0)$ parallel to the vector $\left(-\frac{2}{5},1\right)$.
\bigbreak
\begin{exmp}
	Consider the linear equation
	\[
	x + y + z =1
	.\]
	We find that through parameterisation, we introduce the free parameters $s$ and $t$, we set $y=s$ and $z=t$ to solve for $x$ :
	\[
		x + y + z =1 \rightarrow x =1 -s -t
	.\]
	Which means that for every $s,t \in \mathbb{R}$ the assignments:
	\begin{align*}
		x & = 1 -s -t \\
		y & = s \\
		z & = t
	\end{align*}
	yield a solution to the given equation.
	Moreover, because $x$ is uniquely determined by $y$ and $z$, every solution is obtained from some $s$ and $t$.
	Using set builder notation, we can denote the solution set by:
	\[
		S = \{(1-s-t,s,t) \in \mathbb{R}^3; s,t \in \mathbb{R}\}
	.\]
	Or, to visualise the set, we can rewrite this in vector notation to seperate the parameters:
	\[
		S = \{\underbrace{(1,0,0)}_{\text{shift}} + \overbrace{s(-1,1,0) + t(-1,0,1)}^{\text{Represents a plane}} \in \mathbb{R}^3; s,t \in \mathbb{R}\}
	.\]
	Which describes all possible points from the origin by going parallel to $(-1,1,0)$ for any distance, followed by going parallel to $(-1,0,1)$ for any distance, shifted by the vector $(1,0,0)$.
\end{exmp}
