\documentclass{article}

\usepackage{amsmath}
\usepackage{amsfonts}

\def\hvec#1{\left(#1\right)}
\def\bf#1{\ensuremath{\mathbf{#1}}}
\def\set#1{\left\{#1\right\}}
\def\R{\ensuremath{\mathbb{R}}}
\def\C{\ensuremath{\mathbb{C}}}
\def\a{\bf{a}}
\def\b{\bf{b}}
\def\v{\bf{v}}
\def\w{\bf{w}}
\def\x{\bf{x}}
\def\y{\bf{y}}
\def\z{\bf{z}}
\def\i{\bf{i}}
\def\j{\bf{j}}
\def\k{\bf{k}}

\begin{document}
\section{Vectors}
Here a vector has three components:
\[\bf v=\hvec{\bf v_x,\bf v_y,\bf v_z}\]
Basis \(\set{\bf x,\bf y, \bf z}\).

\section{Products}
Dot product

\[\bf a\cdot\bf b = \bf a_x\bf b_x
+ \bf a_y\bf b_y
+ \bf a_z\bf b_z = \sum_{i=1}^{n}\bf a_i\bf b_i\]

Cross product

\[\bf a\times \bf b =
\begin{bmatrix}
\bf a_y\bf b_z - \bf a_z\bf b_y\\
\bf a_z\bf b_x - \bf a_x\bf b_z\\
\bf a_x\bf b_y - \bf a_y\bf b_x
\end{bmatrix}
\]

`2D Cross Product' set \(\bf z\) to zero in the above:
\[
\bf a\times\bf b = \bf a_x\bf b_y-\bf a_y\bf b_x
\]

Hadamard (component-wise) Product
\[
\bf a\circ \bf b = \begin{bmatrix}
\bf a_x\bf b_x\\
\bf a_y\bf b_y\\
\bf a_z\bf b_z
\end{bmatrix}
\]

So we have \(\bf a\cdot\bf b\), \(\bf a\times\bf b\), and \(\bf a\circ\bf b\).

\section{Multiplying Vectors}
What about \emph{the} product: \(\bf a\bf b\)?

Scalar multiplication is componentwise:
\begin{align*}
2\bf a &=
\begin{bmatrix}
2\bf a_x\\
2\bf a_y\\
2\bf a_z
\end{bmatrix}
\\
\bf a/2 &=
\begin{bmatrix}
\bf a_x/2\\
\bf a_y/2\\
\bf a_z/2
\end{bmatrix}
\end{align*}

Vector addition is componentwise too.
So why not the Hadamard product?
Consider \(\hvec{1,0,0}\circ\hvec{0,1,0}=\bf 0\),
so we can multiply two nonzero vectors to get the zero vector.

Consider \(\C\).
\[
\bf i^2=-1
\]
All we know is this: it squares to \(-1\). This is the \emph{imaginary unit}. We just treat it like any other variable in algebraic expressions.

We can interpret this as a 2D vector
\[
z=\hvec{z_r,z_i}
\]
with basis \(\set{1,\bf i}\).

This is like
\[
\bf v=\hvec{\bf v_x,\bf v_y}
\]
with basis \(\set{\bf x,\bf y}\).

Let's do similar to \(C\)
\begin{align*}
\a\b &= (\a_r+\a_i\i)(\b_r+\b_i\i)\\
&= \a_r\b_r + \a_i\b_i\i\i + \a_r\b_i\i + \a_i\b_r\i\\
&= (\a_r\b_r-\a_i\b_i)+(\a_r\b_i+\a_i\b_r)\i
\end{align*}
which is also a complex number.
Complex numbers are closed under multiplication.

\section{The Key Idea}
Let's go back to 3D vectors.
\begin{align*}
\v&=\hvec{\v_x,\v_y,\v_z}\\
&=\v_x\x+\v_y\y+\v_z\z
\end{align*}
with basis \(\set{\x,\y,\z}\).

Let's do a formal multiplication:
\begin{align*}
\a\b &= \left(\a_x\x + \a_y\y + \a_z\z\right)\left(\b_x\x+\b_y\y+\b_z\z\right)\\
&=\a_x\b_x\x\x + \a_x\b_y\x\y +\cdots + \a_z\b_z\z\z
\end{align*}
It seems things are not closed under multiplication
as this is not something of the form \(?\x+?\y+?\z\).

So what do we do with \(\x\x\)? Let's say
\[
\v^2=\left\|\v\right\|^2
\]
Then \(\x^2=\y^2+\z^2=1\).
So now we have
\begin{align*}
\a\b &=\a_x\b_x + \a_y\b_y + \a_z\b_z\\
&+\a_x\b_y\x\y + \a_x\a_z\x\z + + \cdots
\end{align*}

Let's go back to 2D for a moment.
\begin{align*}
\left(\x+\y\right)^2&=\sqrt{2}^2=2\\
\x\x+\x\y+\y\x+\y\y&=2\\
1+\x\y+\y\x+1&=2\\
\x\y+\y\x=0\\
\x\y&=-\y\z
\end{align*}
So now we have
\begin{align*}
\a\b =&\a_x\b_x + \a_y\b_y + \a_z\b_z+\\
&\y\z\left(\a_y\b_z-\a_z\b_y\right)+\\
&\z\x\left(\a_z\b_x-\a_x\b_z\right)+\\
&\x\y\left(\a_x\b_y-\a_y\b_x\right)
=&\a\cdot\b+\a\times\b
\end{align*}
Let's look at \(\x\y\) and so on.
We have
\begin{align*}
\left(\x\y\right)^2&=\x\y\x\y\\
&=\x(\y\x)\y=-\x\x\y\y\\
&=-1
\end{align*}
This is like \(\i^2\)=-1.
We can do the same for \(\x\z\) and \(\y\z\).

Also
\begin{align*}
(\x\y)(\z\x)(\y\z)&=
  (\y\x)(\x\z)(\y\z)\\
  &=\y\z\y\z\\
  &=-1
\end{align*}

This looks like the \emph{quaternions}:
\[
\i^2=\j^2=\k^2=\i\j\k=-1
\]

So this product has a basis of \(\set{\bf 1,\y\z,\z\x,\x\y}\). So 3D vector multiplication yields the quaternions, in a simliar way that 2D vector multiplication yields the complex numbers.

Now with the cross product, we get something perpendicular to the original vector.
The cross product's magnitude is the area
of the parallelogram made by \(\a\) and \(\b\).

Let's conceptualise these bases as planes.
So \(\x\y\) is the unit plane made by \(\x\) and
\(\y\). Call these \emph{bivectors}. They're
not quite vectors. They have an area of \(1\)
and are mutually orthogonal.

With bivectors we have shadows of an oriented area.
If positive is anticlock then negative is clockwise.
It looks similar to a vector but is algebraically different as the basis is \(\x\y\) and so on.
Bivectors represent the minimum information required to store both a \emph{plane} and a \emph{magnitude}.
This is why they show up when dealing with \emph{rottions}, because rotations happen in a plane.

The cross product retuns a \emph{pseudovector}.
If mirror the basis vectors, the cross product
remains the same. It only works in 3D and 7D,
and has hidden transformation rules.

The \emph{wedge product} is
\begin{align*}
\a\wedge\b =& \y\z\left(\a_y\b_z+\a_z\b_y\right)+\\
&\left(\a_z\b_x+\a_x\b_z\right)+\\
&\left(\a_x\b_y+\a_y\b_x\right)
\end{align*}
and returns a bivector. This generalises to any dimension. So
\[
\a\b=\a\cdot\b + \a\wedge\b
\]
A place this turns up is \emph{curvature}.
Curvature in 2D:
\[
\kappa=\frac{f^\prime_xf^{\prime\prime}_y-f^\prime_yf^{\prime\prime}_x}{\left\|f^\prime\right\|^3}
\]
It is a signed scalar. In 3D:
\[
\kappa=\frac{\left\|f^\prime\times f^{\prime\prime}\right\|}{\left\|f^\prime\right\|^3}
\]
Always positive? What about the axis?
If we do the wedge product we get
\[
\bf\kappa=\frac{f^\prime\wedge f^{\prime\prime}}{\left\|f^\prime\right\|}
\]
giving us a bivector.

\section{Geometric Algebra}
What we end up with is a \emph{Clifford Algebra}.
In 2D we have the basis for a \emph{Full
2D VGA Multivector}
\[\set{1,\x,\y,\x\y}\]
In 3D we have
\[\set{1,\x,\y,\z,\y\z,\z\x,\x\y,\x\y\z}\]
where \(\x\y\z\) is a trivector corresponding to volume. We get a 3D VGA, where
\(\x\) is a 3D vector, and quaternions are rotors.
\end{document}
