It's a Complex Situation

Published on
38 min read––– views

So, you got scooped by Hamas...

It is October 7th, I'm putting the final touches on a markdown file named something cheeky like "The Game Theory of Apartheid" (title pending). I take a break from forging diagrams for the lengthy deep dive – rebuking figures and claims from an article on the divisive subject and open Twitter

And then, lo and behold, I scroll past cell phone footage of an agent of Hamas paragliding into Sderot. In the coming days, my commentary on the dynamics of apartheid and its mathematical origins go from novel and humorous to decidedly un-chique. I've scrapped the critique for a later date. Though not particularly inflammatory itself, it still doesn't seem very couth to publish – instead I'll make snide offcolor jokes in the section headings of this post instead!

For the still-curious, the original paper from last month's would-be post can be found here. I'd suggest questioning why there are different distributions for the modest and greedy populations if their preferences are symmetric? That's all.

It's a Complex Situation

A month later [footnote], with no signs of the situation letting up, I instead turn my attention to the conveniently less-political subject of Geometric Algebra. After the last last last month's post, I did some additional reading about Cayley Tables, their other uses, their eponymous author, and some of his other work such as Cayley-Dickson constructions of algebras from which I had to work backwords to solidify the question(s) motivating this post:

  • Why is the cross product only well-defined in 3 and 7 dimensions?
  • Why is there no canonical 'just' product between two vectors? We've got the dot product, the cross product, seemingly nonsensical wedge and Hadamard products, and other esoteric ways to combine two collections of numbers, but no single analogue for arithmetic multiplication, why is that?

That's the rabbit hole, let's jump in.

Vectors, a refresher

To work our way up to the definitions of the dot, cross, and wedge products, their respective properties and pitfalls in the search for a canonical vector product, we first examine the taxonomy of a vector.

Taking some vector v=(vx,vy,vz)\mathbf v = (v_x, v_y, v_z ) we immediately presume a basis of our coordinate system. A basis is the set of linearly independent vectors that generates all elements of our vector space. Which of course begs the question, what is linear independence, again?

Linear Independence

A set of vectors {v1,v2,...,vk}\{ \mathbf v_1, \mathbf v_2, ..., \mathbf v_k \} is said to be linearly independent if the equation

x1v1+x2v2++xkvk=0x_1v_1 + x_2v_2 + \cdots + x_kv_k = 0

has only one trivial solution: x=0\mathbf x = \mathbf 0.

We can verify the linear independence of a set of vectors like so. Given a set of vectors:

{u,v,w}={[111],[112],[314]}\{ \mathbf u, \mathbf v, \mathbf w \} = \Biggr \{ \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}, \begin{bmatrix} 3 \\ 1 \\ 4 \end{bmatrix} \Biggr \}

we can check if the following homogenous equation1 has a non-trivial2 solution:

xu+yv+wz=0x[111]+y[112]+z[314]=[000][113111124]=[000]    [102011000]    x=2z    y=z\begin{aligned} \mathbf{x} \cdot \mathbf{u} + \mathbf{y} \cdot \mathbf{v} + \mathbf{w} \cdot \mathbf{z} &= \mathbf 0\\ \mathbf x \begin{bmatrix} 1 \\ 1 \\ 1 \\ \end{bmatrix} + \mathbf y \begin{bmatrix} 1 \\ -1 \\ 2 \\ \end{bmatrix} + \mathbf z \begin{bmatrix} 3 \\ 1 \\ 4 \\ \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \\ \begin{bmatrix} 1 & 1 & 3 \\ 1 & -1 & 1 \\ 1 & 2 & 4 \\ \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \\ \implies \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \\ \end{bmatrix} &\begin{matrix} \implies \mathbf x= -2 \mathbf z \\ \\ \implies \mathbf y = -\mathbf z \end{matrix} \\ \end{aligned}

which are nontrivial solutions, so our vectors are linearly independent.

Properties of Linear Independence

  • A set of vectors is linearly dependent iff one of the vectors u\mathbf u is colinear with another v\mathbf v such that u\mathbf u is a scalar multiple of v\mathbf v,
  • Any set containing the zero vector 0\mathbf 0 is linearly dependent since the zero vector is colinear with all other vectors,
  • If a subset of the vectors we're concerned about is linearly dependent, then the whole set is linearly dependent (hence it is only necessary to show that two vectors in a set are colinear to prove linear dependence of the whole set).

With this in mind, the conventional basis used to describe 3 dimensional space is {x,y,z}\{\mathbf{x, y, z} \}, a familiar variable for each axis, where all of the basis vectors are orthonormal to one another:

xy,  x=1yz,  y=1xz,  z=1\begin{aligned} \mathbf x &\perp \mathbf y, \; \Vert \mathbf x\Vert = 1\\ \mathbf y &\perp \mathbf z, \; \Vert \mathbf y\Vert = 1\\ \mathbf x &\perp \mathbf z, \; \Vert \mathbf z\Vert = 1\\ \end{aligned}

(Orthonormality meaning: each vector is orthogonal to the others, and has a unit length).

Vector Products

If you're still reading, then chances are that at least two things come to mind when you read the phrase "Vector Product": the dot product and the cross product.

The Dot Product

Also known as the "inner" product, this operation aptly denoted with a '\cdot' can be interpreted in a Euclidean context as the projection of one vector u\mathbf u onto another v\mathbf v, or the amount that u\mathbf u is pointing in the same direction as v\mathbf v.

It is computed via summation over the element-wise products:

uv=uxvx+uyvy+uzvz\color{red} \mathbf u \color{black} \cdot \color{blue}\mathbf v \color{black} = \color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}u\color{black}_z\color{blue}v\color{black}_z

and its general form is:

uv=i=1nuivi,n=u=v\color{red} \mathbf u \color{black} \cdot \color{blue}\mathbf v \color{black} = \sum_{i=1}^n \color{red} u \color{black}_i \color{blue} v \color{black}_i, \quad n = \Vert\color{blue}\mathbf u \color{black} \Vert = \Vert\color{red}\mathbf v \color{black} \Vert

The Cross Product

Also kown as the "exterior" product, and deceptively denoted with an innocuous '×\times', the cross product cannot be intuitively interpreted from a purely mathematical standpoint (unless you're really weird). It makes more sense in the context of physics, but also is naturally derived from basic axioms of linear algebra as we'll see shortly.

u×v=[uyvzuzvyuzvxuxvzuxvyuyvx]\begin{aligned} \color{red} \mathbf u \color{black} \times \color{blue}\mathbf v \color{black} = \begin{bmatrix} \color{red}u\color{black}_y\color{blue}v\color{black}_z - \color{red}u\color{black}_z\color{blue}v\color{black}_y \\ \color{red}u\color{black}_z\color{blue}v\color{black}_x - \color{red}u\color{black}_x\color{blue}v\color{black}_z \\ \color{red}u\color{black}_x\color{blue}v\color{black}_y - \color{red}u\color{black}_y\color{blue}v\color{black}_x \\ \end{bmatrix} \end{aligned}

and there is no general definition of the cross product! It only exists in 3 and sort-of (for reasons we'll see later) 7 dimensions. In two dimensions, it can be thought of as uxvyuyvx\color{red}u\color{black}_x\color{blue}v\color{black}_y - \color{red}u\color{black}_y\color{blue}v\color{black}_x which, though useful for our intuition, is also not really a cross product since the essence of the cross-product is directionality/orientation (hence why it produces a vector itself).

The Hadamard Product

There's also the Hadamard product which is the intuitive method of element-wise multiplication for matrices (and thus vectors as well):

uv=[uxvxuyvyuzvz]\begin{aligned} \color{red} \mathbf u \color{black} \circ \color{blue}\mathbf v \color{black} = \begin{bmatrix} \color{red}u\color{black}_x\color{blue}v\color{black}_x \\ \color{red}u\color{black}_y\color{blue}v\color{black}_y \\ \color{red}u\color{black}_z\color{blue}v\color{black}_z \\ \end{bmatrix} \end{aligned}

but it doesn't see much use outside of like,,, vector graphics (used in JPEG), the Julia programming language, and the penetrating face product (whatever that is 😬).

Not quite...

But what about a canonical, vanilla uv\color{red}\mathbf u\color{blue}\mathbf v product? Why isn't that universally recognized to be the Hadamard product when every other standard arithmetic operation works intuitively on vectors: addition, subtraction, division, ... but not multiplication. Why? If we consider the "lower" families of numbers and the operations that work on them:

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N

Starting first with the Natural numbers: addition and multiplication are closed (addition/multiplication of any natural number will produce another natural number). Subtraction of natural numbers is closed under the set of integers (since e.g. 01=1N0 - 1 = -1 \notin \N), and similarly division is closed under the rationals, and exponentiation of the naturals will always produce another non-negative integer.

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N
Z:...,1,2,0,1,2,...\Z : ...,-1,-2,0,1,2,...Z\ZZ\ZZ\ZQ\mathbb QQ\mathbb Q

Taking a step up, the Integers behave similarly up to exponentiation because an integer raised to a negative integer will be a fraction.

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N
Z:...,1,2,0,1,2,...\Z : ...,-1,-2,0,1,2,...Z\ZZ\ZZ\ZQ\mathbb QQ\mathbb Q
Q:01,11,12,13,...\mathbb Q: \frac{0}{1}, \frac{1}{1}, \frac{1}{2}, \frac{1}{3}, ... Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QR\R

Rational numbers start to cause some ripples when we try to raise another number to a fraction of a power we introduce square roots (and other roots) which yields irrational numbers so we have to expand our horizons twice more to account for roots of positive numbers, and also roots of negative numbers:

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N
Z:...,1,2,0,1,2,...\Z : ...,-1,-2,0,1,2,...Z\ZZ\ZZ\ZQ\mathbb QQ\mathbb Q
Q:01,11,12,13,...\mathbb Q: \frac{0}{1}, \frac{1}{1}, \frac{1}{2}, \frac{1}{3}, ... Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
R:2\mathbb R: \sqrt 2Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
C:1\mathbb C: \sqrt -1?????

Complex Numbers

How do the Complex numbers behave for these operations, especially multiplication? First, we must understand what complex numbers are. The axiomatic definition of Complex numbers is the "imaginary" unit:

i2=1\color{purple}i\color{black}^2 = -1

We can think of complex numbers as vectors with Real and Imaginary components with a basis of {1,i}\{1, \color{purple}\mathbf i \color{black} \}. E.g. z=[zrzi]\mathbf z = \begin{bmatrix}z_r \\ z_i \end{bmatrix}.

Crucially, we can express complex numbers as the sum (linear combination) of their components: a+bia + b \color{purple}\mathbf i \color{black} and do algebra on them! Multiplication of these vector-like quantities might give us insight into vector multiplication. For example, for some a,bC\color{red} a \color{black}, \color{blue}b \color{black} \in \mathbb C:

ab=(ur+ui)(vr+vi)=urvr+uiviii+urvii+uivri=urvruivi+i(urvi+uivr)\begin{aligned} \color{red}a\color{black} \color{blue}b\color{black} &= (\color{red}u\color{black}_r + \color{red}u\color{black}_i)( \color{blue}v\color{black}_r + \color{blue}v\color{black}_i) \\ &= \color{red}u\color{black}_r \color{blue}v\color{black}_r + \color{red}u\color{black}_i \color{blue}v\color{black}_i \color{purple}\mathbf {ii} \color{black} + \color{red}u\color{black}_r\color{blue}v\color{black}_i \color{purple}\mathbf i \color {black} + \color{red}u\color{black}_i \color{blue}v\color{black}_r \color{purple}\mathbf i \color {black} \\ &= \color{red}u\color{black}_r \color{blue}v\color{black}_r - \color{red}u\color{black}_i \color{blue}v\color{black}_i + \color{purple}\mathbf i \color{black} (\color{red}u\color{black}_r\color{blue}v\color{black}_i \color{purple} + \color{red}u\color{black}_i \color{blue}v\color{black}_r) \end{aligned}

which is itself a complex number. So C\mathbb C is closed under multiplication. And, since it can be expressed strictly in terms of the coefficients of the real and imaginary components, we never actually need to explicitly model the basis variable i\color{purple}\mathbf i \color {black} in our computations. In the reduced form of an algebraic expression, it's just used for notation. The rest of the arithmetic operations we've been concerned with in our table so far are also closed under the complex numbers:

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N
Z:...,1,2,0,1,2,...\Z : ...,-1,-2,0,1,2,...Z\ZZ\ZZ\ZQ\mathbb QQ\mathbb Q
Q:01,11,12,13,...\mathbb Q: \frac{0}{1}, \frac{1}{1}, \frac{1}{2}, \frac{1}{3}, ... Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
R:2\mathbb R: \sqrt 2Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
C:i,i2\mathbb C: \color{purple}\mathbf i, \mathbf i^2 \color {black}C\color{purple} \mathbb CC\color{purple} \mathbb CC \color{purple}\mathbb CC \color{purple}\mathbb CC \color{purple}\mathbb C

Worth noting, the Complex numbers form the only "complete" algebra3 since they are closed under all 5 of these operations. Can we generalize anything useful from interpretation of the Complex numbers as vectors in the 2-dimensional plane to R3\R^3?

From C\mathbb C to R3\R^3

Armed with the knowledge that

z=(zr,zi)=zr+ziivxx+vyy=(vx,xy)=v\mathbf {z} = (z_r, z_i) = z_r + z_i \color{purple} \mathbf i \color{black} \equiv v_x\color{red}\mathbf{x}\color{black} + v_y \color{green}\mathbf{y}\color{black} = (v_x, x_y) = \mathbf v

That is, a complex number is equivalently expressed as the sum of vector components multiplied by a symbol representing its corresponding basis vector or axis – we can use the same expression of a vector as a linear combination for higher dimension vectors:

v=(vx,xy,vz)=vxx+vyy+vzy\mathbf v = (v_x, x_y, v_z) = v_x\color{red}\mathbf{x}\color{black} + v_y \color{green}\mathbf{y}\color{black} + v_z \color{blue}\mathbf{y}\color{black}

And, jumping through similar hoops as before, we can convince ourself that addition and subtraction are closed under R3\R^3, as is scalar multiplication and division, but what about vector multiplication...

uv=(uxx+uyy+uzz)(vxx+vyy+vzz)=uxvxxx+uxvyxy+uxvzxz+uyvxyx+uyvyyy+uyvzyz+uzvxzx+uzvyzy+uzvzzz\begin{aligned} \color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} = &(\color{red}u\color{black}_x\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_y\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_z\color{blue}\mathbf{z}\color{black}) (\color{blue}v\color{black}_x\color{red}\mathbf{x}\color{black} + \color{blue}v\color{black}_y\color{green}\mathbf{y}\color{black} + \color{blue}v\color{black}_z\color{blue}\mathbf{z}\color{black}) \\ = &\color{red}u\color{black}_x\color{blue}v\color{black}_x\color{red}\mathbf{xx}\color{black} + \color{red}u\color{black}_x\color{blue}v\color{black}_y\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{red}\mathbf{x}\color{blue}\mathbf{z}\color{black} + \\ &\color{red}u\color{black}_y\color{blue}v\color{black}_x\color{green}\mathbf{y}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_y\color{blue}v\color{black}_y\color{green}\mathbf{yy}\color{black} + \color{red}u\color{black}_y\color{blue}v\color{black}_z\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} + \\ &\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{blue}\mathbf{z}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_z\color{blue}\mathbf{zz}\color{black} \\ \end{aligned}

but this isn't really a vector anymore... We can't combine like terms to express the result of in terms of just the coefficients of the basis vectors {x,y,z}\{ \color{red}\mathbf{x}\color{black}, \color{green}\mathbf{y}\color{black}, \color{blue}\mathbf{z}\color{black} \}. We've got those scrungly terms involving two basis vectors at once which aren't in C\mathbb C. So we can conclude that the Complex numbers aren't closed under vector multiplication as we'd like to define it, so are we just done then?


No, lol, of course not! Returning to axiomatic truths about vectors, another useful definition for vector exponentiation gives us some outs:

v2=v2\mathbf v^2 = \Vert \mathbf v \Vert^2

A vector times itself is equal to its magnitude squared. But can we use this for arbitrary vectors that are not equal? For example

u=(1,2,3)u2=(1,2,3)2=(12+22+32)2=12+22+32=14\begin{aligned} \mathbf u &= (1,2,3) \\ \mathbf u^2 &= (1,2,3)^2 \\ &= (\sqrt{1^2 + 2^2 + 3^2})^2 \\ &= 1^2 + 2^2 + 3^2 = 14 \\ \end{aligned}

works for an element of R3\R^3, but what about our basis vectors for R3\R^3 itself? By definition these basis vectors have unit length (1), so squaring them yields unit length as well:

R3=(x,y,z),xx=x2=12=1yy=y2=12=1zz=z2=12=1\begin{aligned} \R^3 &= ( \color{red}\mathbf{x}\color{black}, \color{green}\mathbf{y}\color{black}, \color{blue}\mathbf{z}\color{black} ),\\ \color{red}\mathbf{xx}\color{black} &= \color{red}\mathbf{x}\color{black}^2 = 1^2 = 1 \\ \color{green}\mathbf{yy}\color{black} &= \color{green}\mathbf{y}\color{black}^2 = 1^2 = 1 \\ \color{blue}\mathbf{zz}\color{black} &= \color{blue}\mathbf{z}\color{black}^2 = 1^2 = 1 \\ \end{aligned}

which allows us to eliminate some terms from our vector product uv\color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} in R3\R^3 from earlier:

uv=(uxx+uyy+uzz)(vxx+vyy+vzz)=uxvxxx+uxvyxy+uxvzxz+uyvxyx+uyvyyy+uyvzyz+uzvxzx+uzvyzy+uzvzzz=uxvx+uyvy+uzvz+uyvzyz+uzvyzy+uzvxzx+uxvzxz+uxvyxy+uyvxyx\begin{aligned} \color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} = &(\color{red}u\color{black}_x\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_y\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_z\color{blue}\mathbf{z}\color{black}) (\color{blue}v\color{black}_x\color{red}\mathbf{x}\color{black} + \color{blue}v\color{black}_y\color{green}\mathbf{y}\color{black} + \color{blue}v\color{black}_z\color{blue}\mathbf{z}\color{black}) \\ = &\color{red}u\color{black}_x\color{blue}v\color{black}_x\color{red} \cancel{\color{red}\mathbf{xx}\color{black}} + \color{red}u\color{black}_x\color{blue}v\color{black}_y\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{red}\mathbf{x}\color{blue}\mathbf{z}\color{black} + \\ &\color{red}u\color{black}_y\color{blue}v\color{black}_x\color{green}\mathbf{y}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_y\color{blue}v\color{black}_y\color{green}\color{red} \cancel{\color{green}\mathbf{yy}\color{black}} + \color{red}u\color{black}_y\color{blue}v\color{black}_z\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} +\\ &\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{blue}\mathbf{z}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_z\color{blue}\color{red} \cancel{\color{blue}\mathbf{zz}\color{black}} \\ \\ = &\color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}u\color{black}_z\color{blue}v\color{black}_z + \\ &\color{red}u\color{black}_y\color{blue}v\color{black}_z\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{blue}\mathbf{z}\color{green}\mathbf{y}\color{black} + \\ &\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{red}\mathbf{x}\color{blue}\mathbf{z}\color{black} + \\ & \color{red}u\color{black}_x\color{blue}v\color{black}_y\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_y\color{blue}v\color{black}_x\color{green}\mathbf{y}\color{red}\mathbf{x}\color{black} \\ \end{aligned}

which is marginally better, but we need to derive a little more juice out of our orthonomral basis vectors to clean up the rest of the riff raff.

little juice, little squeeze

If we consider just two axes {x,y}\{ \color{red}\mathbf{x}\color{black}, \color{green}\mathbf{y}\color{black} \} we know that the diagonal projection bisecting them has a length of 2\sqrt 2 from/giving us the pythagorean theorem:

x+y=12+22=2v2=v2(x+y)2=(2)2xx+xy+yx+yy=21+xy+yx+1=2xy+yx=0xy=yx\begin{aligned} \Vert \color{red}\mathbf{x}\color{black} + \color{green}\mathbf{y}\color{black} \Vert &= \sqrt{1^2 + 2^2} = \sqrt 2 \\ \mathbf v^2 &= \Vert \mathbf v \Vert^2 \\ (\color{red}\mathbf{x}\color{black} + \color{green}\mathbf{y}\color{black})^2 &= \Vert \mathbf (\sqrt 2) \Vert^2 \\ \color{red}\mathbf {xx} \color{black} + \color{red}\mathbf {x}\color{green}\mathbf {y} \color{black} + \color{green}\mathbf {y}\color{red}\mathbf {x} \color{black} + \color{green}\mathbf {yy}\color{black} &= 2\\ 1 + \color{red}\mathbf {x}\color{green}\mathbf {y} \color{black} + \color{green}\mathbf {y}\color{red}\mathbf {x} \color{black} + 1 &= 2 \\ \color{red}\mathbf {x}\color{green}\mathbf {y} \color{black} + \color{green}\mathbf {y}\color{red}\mathbf {x} \color{black} &= 0 \\ \color{red}\mathbf {x}\color{green}\mathbf {y} \color{black} &= - \color{green}\mathbf {y}\color{red}\mathbf {x} \color{black} \\ \end{aligned}

we can reduce pretty handily down to this useful corollary. Notice that we didn't combine the middle term in the expansion since we have yet to prove that vector multiplication is commutative (it is not).

We can return to our mountain of terms and use this identity to make it more tractable. We can take each term in our "right column" and substitute it with its swapped and negated counterpart:

uv=uxvx+uyvy+uzvz+uyvzyz+uzvyzy+uzvxzx+uxvzxz+uxvyxy+uyvxyx    uxvx+uyvy+uzvz+uyvzyzuzvyyz+uzvxzxuxvzzx+uxvyxyuyvxxy    uxvx+uyvy+uzvz+yz(uyvzuzvy)+zx(uzvxuxvz)+xy(uxvyuyvx)\begin{aligned} \color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} = &\color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}u\color{black}_z\color{blue}v\color{black}_z + \\ &\color{red}u\color{black}_y\color{blue}v\color{black}_z\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} + \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{blue}\mathbf{z}\color{green}\mathbf{y}\color{black} + \\ &\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} + \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{red}\mathbf{x}\color{blue}\mathbf{z}\color{black} + \\ & \color{red}u\color{black}_x\color{blue}v\color{black}_y\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} + \color{red}u\color{black}_y\color{blue}v\color{black}_x\color{green}\mathbf{y}\color{red}\mathbf{x}\color{black} \\ \\ \implies & \color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}u\color{black}_z\color{blue}v\color{black}_z + \\ &\color{red}u\color{black}_y\color{blue}v\color{black}_z\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} - \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black} + \\ &\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} - \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black} + \\ & \color{red}u\color{black}_x\color{blue}v\color{black}_y\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} - \color{red}u\color{black}_y\color{blue}v\color{black}_x\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \\ \\ \implies & \color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}u\color{black}_z\color{blue}v\color{black}_z + \\ &\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black}(\color{red}u\color{black}_y\color{blue}v\color{black}_z - \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{black}) + \\ &\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black}(\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{black} - \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{black}) + \\ & \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black}(\color{red}u\color{black}_x\color{blue}v\color{black}_y\color{black} - \color{red}u\color{black}_y\color{blue}v\color{black}_x) \\ \end{aligned}

which is (drum roll) the dot product added to the cross product? "Somehow" emerging out of nowhere. Well, not quite nowhere. And we still have these nebulous basis products that don't make any sense on their own either...

actually Quaternions

To "fix/eliminate" these terms, what if we just repeat what's been working for us so far:

(xy)2=xyxxyy=xxyy=11=1\begin{aligned} (\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black})^2 &= \color{red}\mathbf{x}\color{black}\underbrace{\color{green}\mathbf{y}\color{red}\mathbf{x}}_{\color{black}-\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black}}\color{green}\mathbf{y}\\ &= -\color{red}\mathbf{xx}\color{green}\mathbf{yy}\color{red} \\ &= -1 \cdot 1 \\ &= -1 \end{aligned}

(we can only make this substitution with orthonormal vectors – not the least part because we're guaranteed that they're non-zero). But hmmmm we have a thing we can square which gives us 1-1 you say???? That's just i\color{purple} \mathbf i, which holds for the other combinations of our basis vectors too:

(xy)2=(zx)2=(yz)2=(xy)(zx)(yz)=1(\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black})^2 = (\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black})^2 = (\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black})^2 = (\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black})(\color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black})(\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black}) = -1

which does now look vaguely familiar as long-suppressed physics lectures come surging to memory. These basis vector combinations behave identically to

i2=j2=k2=ijk=1\mathbf{i}^2 = \mathbf{j}^2 = \mathbf{k}^2 = \mathbf{ijk} = -1

which is the definition of quaternions.

Anotha one

returning to the tabular classification of algebras, we can answer the question about what family of numbers R3\R^3 is closed under via muliplication (this sentence isn't real). The answer is not one I would have guessed in a vacuum (pun intended), it's quaternirons denoted with a bb'd H\mathbb H for "Hamilton":

family/operation++×\times-//^ \text{\textasciicircum}
N:0,1,2,3,...\N : 0,1,2,3,...N\NN\NZ\ZQ\mathbb QN\N
Z:...,1,2,0,1,2,...\Z : ...,-1,-2,0,1,2,...Z\ZZ\ZZ\ZQ\mathbb QQ\mathbb Q
Q:01,11,12,13,...\mathbb Q: \frac{0}{1}, \frac{1}{1}, \frac{1}{2}, \frac{1}{3}, ... Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
R:2\mathbb R: \sqrt 2Q\mathbb QQ\mathbb QQ\mathbb QQ\mathbb QC\mathbb C
C:i,i2\mathbb C: \color{purple}\mathbf i, \mathbf i^2 \color {black}C\color{purple} \mathbb CC\color{purple} \mathbb CC\color{purple}\mathbb CC\color{purple}\mathbb CC\color{purple}\mathbb C
R3:(1.5,2,3)\R^3: (1.5, 2, -3)R3\R^3H\mathbb HR3\R^3R3\R^3H\mathbb H

So 3D vector multiplication in this manner yeilds a quaternion xyH\color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \in \mathbb H with a basis of {1,yz,zx,xy}\{1, \color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black}, \color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black}, \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \}


What about it two dimensions? Vector multiplication in two dimensions is equivalent to the same in R3\R^3 just with the z\color{blue}\mathbf z components set to 0. Trying this, we get:

uv=uxvx+uyvy+xy(uxvyuyvx)\begin{aligned} \color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} = & \color{red}u\color{black}_x\color{blue}v\color{black}_x + \color{red}u\color{black}_y\color{blue}v\color{black}_y + \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black}(\color{red}u\color{black}_x\color{blue}v\color{black}_y\color{black} - \color{red}u\color{black}_y\color{blue}v\color{black}_x) \\ \end{aligned}

which has a basis of {1,xy}\{1, \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \}. In order to understand what these terms mean, and why we see artifacts of the cross product in our "just" product, we can take a closer look at the properties of the cross product in two dimensions. The cross product is commonly understood to be the vector that is normal to the plane formed by its inputs, and its magnitude will be the area of the parallelogram they form.

Consider the planes formed by these terms in our basis:

[TODO: img badly needed]

In the basis for our 2D model, {1,xy}\{1, \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \} the janky second term describes a unit plane with area 1. In the three dimensional model, the three terms define a unit cube. These planar terms are called bivectors, or in our particular unitary examples basis bivectors, each having an area of 1 and being mutually orthogonal.

So what the heck is a bivector?

Just a vector that did some experimenting in college?

To improve our geometric understanding, we can consider an oriented shape (e.g. spinning about some axis) in R3\R^3. This point can be described / modeled as the shadow that it casts onto the planes defined by the basis bivectors:

this like roughly captures the image in my mind (which may not be correct at all tbqh) but google images for "bivector in 3D space" is a frickin warzone of confusing diagrams and memes about how confusing the diagrams are. There's also this runescape-tier illustration of the somatic components of the fireball spell (shoutout to

Because our closed shape casts a shadow, and because it's oriented, the area of that shadow can be negative. So even though the vector-like object

[]\begin{bmatrix} \color{blue}0.21 \\ \color{red}0.24 \\ \color{green}-0.14 \end{bmatrix}

looks identical to a regular vector in R3\R^3, we actually interpret these numbers as the area of the projection of our oriented surface onto the three bivectors defining our space. Algebraically, this is a bit more obvious because of those formerly janky-seeming basis variables that must be included/expressed in the linear combinations of bivectors: {yz,zx,xy}\{\color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black}, \color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black}, \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black} \} which are pretty hard to mistake for just {x,y,z}\{ \color{red}\mathbf{x}\color{black}, \color{green}\mathbf{y}\color{black},\color{blue}\mathbf{z}\color{black} \}.

The Cross Product, revisted

Taking another look at the cross product:

u×v=x(uyvzuzvy)+y(uzvxuxvz)+z(uxvyuyvx)\color{red}\mathbf{u}\color{black} \times \color{blue}\mathbf{v}\color{black} = \color{red}\mathbf{x}\color{black}(\color{red}u\color{black}_y \color{blue}v\color{black}_z - \color{red}u\color{black}_z\color{blue}v\color{black}_y) + \color{green}\mathbf{y}\color{black}(\color{red}u\color{black}_z\color{blue}v\color{black}_x - \color{red}u\color{black}_x\color{blue}v\color{black}_z) + \color{blue}\mathbf{z}\color{black}(\color{red}u\color{black}_x\color{blue}v\color{black}_y - \color{red}u\color{black}_y\color{blue}v\color{black}_x)

This is a pseudo-vector. Not quite a fully-fledged vector because it doesn't retain all of the expected transformational properties we'd expect it to [//TODO: link]. Additionally, this resultant vector only "works" in 3 and 7 dimensions – or rather, the properties we expect to hold true for a cross product are only true in three dimensions, and some of them are true in 7 dimensions, but there's also not one unique solution to the cross product in that many definitions, so the notion of orthogonality becomes less precise.

Specifically, we'd like a higher-dimensional cross product to retain the desired properties of:

  1. If c=a×b\mathbf c = \mathbf a \times \mathbf b, then ca=cb=0\mathbf c \cdot \mathbf a = \mathbf c \cdot \mathbf b = 0
  2. a×b=b×a\mathbf a \times \mathbf b = - \mathbf b \times \mathbf a
  3. a×b\Vert \mathbf a \times \mathbf b \Vert is the hypervolume of a,b\mathbf{a,b}

In higher dimensions, there will be more than one vector which satisfies most of these requirements (not the Jacobi identity), so which one do we choose? In 7 dimensions, there are 480 cross products with the feature that ei×ej=±ek,ije_i \times e_j = \pm e_k, i \neq j for some basis vector indices in our dimension 0<i,j,k<F0 < i, j,k < |\mathbb F|.

The dot and the cross product are the real and imaginary components of a quaternion product. For these operations, we can't keep "going up" (though damnit if Cayley didn't try) indefinitiely. Mathematical objects like real numbers, complex numbers, quaternions, and octonions (the next step "up") are called division algebras. At each higher dimension, the algebra loses properties.

There are exactly four normed division algebras: the real numbers (R\R), complex numbers (C\mathbb C), quaternions (H\mathbb H), and octonions (O\mathbb O). The real numbers are the dependable breadwinner of the family, the complete ordered field we all rely on. The complex numbers are a slightly flashier but still respectable younger brother: not ordered, but algebraically complete. The quaternions, being noncommutative, are the eccentric cousin who is shunned at important family gatherings. But the octonions are the crazy old uncle nobody lets out of the attic: they are nonassociative.

which is a wonderful quote from the first page of Baez's survey of the Octonions. I lasted approximately 5 pages before he delved entirely too deep into occult diagrams and LaTeX\LaTeX symbols I've never even seen before. Thus ends my larp as a mathemetician.

The wikipedia page for the seven dimensional cross product is in fact my initial entrypoint into this whole blog post. As mentioned, I was doing additional reading about Cayley after some exposure to his lizard brain discussed in my last post. Turns out he was rather involved, as was Conway:

u ever tried putting with a wedgie?

The product we've been exploring up to this point which produces a bivector is called the wedge product:

uv=yz(uyvzuzvy)+zx(uzvxuxvz)+xy(uxvyuyvx)\begin{aligned} \color{red}\mathbf{u}\color{black} \wedge \color{blue}\mathbf{v}\color{black} = \color{green}\mathbf{y}\color{blue}\mathbf{z}\color{black}(\color{red}u\color{black}_y\color{blue}v\color{black}_z - \color{red}u\color{black}_z\color{blue}v\color{black}_y\color{black}) + \color{blue}\mathbf{z}\color{red}\mathbf{x}\color{black}(\color{red}u\color{black}_z\color{blue}v\color{black}_x\color{black} - \color{red}u\color{black}_x\color{blue}v\color{black}_z\color{black}) + \color{red}\mathbf{x}\color{green}\mathbf{y}\color{black}(\color{red}u\color{black}_x\color{blue}v\color{black}_y\color{black} - \color{red}u\color{black}_y\color{blue}v\color{black}_x) \\ \end{aligned}

It shares the same coefficients as the cross product, but has a categorically different meaning because of the basis! The wedge product generalizes to any dimension as well, not just 3 and 7. The general form of vector multiplication we've been striving towards, therefore, is not the combination of the dot and the cross products, but rather the dot and the wedge:

uv=uv+uv\color{red}\mathbf{u}\color{blue}\mathbf{v}\color{black} = \color{red}\mathbf{u}\color{black} \cdot \color{blue}\mathbf{v}\color{black} + \color{red}\mathbf{u}\color{black} \wedge \color{blue}\mathbf{v}\color{black}

Bivectors hoo hah, what are they good for?

Despite an existential quip seen in a caustic rebuttal on Math Stack Exchange that the only naturally occurring example of quaternions is in their definition, the wedge product has numerous practical uses including measuring curvature, spacetime fields, linear dependence in higher dimneions etc. that are better detailed in a fledged Geometric Algebra course or the wiki subsections.


  1. There's too many nested definitions at play already, welcome to a footnote. A homogenous system of linear equations is one where all constant terms are zero.

  2. usually, this means not the zero vector 0=[00]\mathbf 0 = \begin{bmatrix} 0 \\ \vdots \\ 0 \\ \end{bmatrix}

  3. the Fundamental Theorem of Algebra