**Physicist**: The most straightforward way to stumble across quaternions is to sit around thinking about complex numbers, where we have “i” which is the square root of -1 and stands for “imaginary number”. If you have i, then you have two square roots of -1: i and -i (all square roots are positive/negative pairs). To get to quaternions you just need to ask “alright, but what if there were *another* square root of -1?”.

So, you call that new number “j” (not to be confused with “j” from engineering, which is actually just “i” and presumably stands for “jamaginary number”). On the face of it, there’s nothing wrong with that; if we can make up i and work with it (to great effect), then making up j shouldn’t be terribly different. In the same way that we can write complex numbers as A+Bi, we should be able to write these new numbers as A+Bi+Cj; “trinions” as it were. However, it turns out that introducing a “j” requires us to also introduce a “k” (that also does the same thing as i and j).

Here’s why. You start by saying “i^{2} = j^{2} = -1″ and then asking “ij = ?”. You begin to get a sinking feeling when you square it: (ij)^{2 }= i^{2}j^{2} = (-1)(-1) = 1. This implies that ij = 1 or -1. But ij = 1 means that j = -i and ij = -1 means that j = i. There are more rigorous (confusing/complicated) ways to do this, but they ultimately boil down to “dude, we need another number”. That number is k (for “kamaginary” maybe).

So we’ve got i^{2} = j^{2} = k^{2} = -1 and ij = k. Fine. But there’s a big problem: quaternions can’t be commutative (mathematicians would call this big problem an “interesting property”, because they’re so chipper). “Commutative” means that order doesn’t matter, but for quaternions it must. Here comes a contradiction:

Firstly: (ij)^{2} = k^{2} = -1. This is basically a definition. It’s “True”.

Secondly (with commutativity): (ij)^{2} = (ij)(ij) = ijij = i^{2}j^{2} = (-1)(-1) = 1. Savvy readers will note that 1 ≠ -1. This can be fixed by declaring that ij = -ji.

Thirdly (declaring that ij = -ji): (ij)^{2} = (ij)(ij) = i(ji)j = i(-ij)j = -i^{2}j^{2} = -(-1)(-1) = -1. Fixed!

So far, this whole thing has been about why quaternions have the weird properties they do: there needs to be an i, j, *and* k, and you have to give up commutativity. Complex numbers are written “A+Bi” where i^{2} = -1. Quaternions are written “A+Bi+Cj+Dk” where i^{2} = j^{2} = k^{2} = -1, ij = k, jk = i, ki = j, and reversing any of these last three flips the sign.

One of the most profoundly cool things about quaternions is that they have their own form of Euler’s equation. When , . This can be derived the same way the regular Euler equation is derived, but using the fact that .

At this point it’s entirely natural (for a mathematical masochist) to ask “alright, but what if there were *yet another* square root of -1?”. Well it turns out that the next jump is harder and requires *seven* things that square to -1. Concerned at the prospect of running out of letters, clever mathematicians usually label these e_{1}, e_{2}, e_{3}, e_{4}, e_{5}, e_{6}, e_{7}. where (e_{1})^{2} = (e_{2})^{2} = … = (e_{7})^{2} = -1. An octonion number is written “A + Be_{1} + Ce_{2} + De_{3} + Ee_{4} + Fe_{5} + Ge_{6} + He_{7}“, where each of these (capital) letters is a real number. When you make the jump to octonions you not only lose commutativity you lose associativity, which makes everything terrible. With octonions you can’t say that (ab)c = a(bc), which is a big loss.

Some terribly insightful old soul might now be driven to inquire “alright, but what if there were *still more* square roots of -1?”. Sure. Enter the Cayley Dickson construction to create a “ladder” of as many of these number systems as your heart may ever desire, doubling in complexity every time.

Here’s the idea: you’ve start with a number system, then you take pairs of those numbers and slap a couple of rules on them. Complex numbers are just a pair of real numbers with some algebra glued on. For example, and . You may as well write this and . In addition to addition and multiplication, complex numbers also have an operation called “complex conjugation” (denoted with a bar or asterisk) which flips the sign of the imaginary part of a complex number. For example, or equivalently . The same operation exists for quaternions. For example, .

The Cayley Dickson construction defines numbers “higher up the ladder” as pairs of numbers from “lower down the ladder”. So a complex number, Z, is a pair of real numbers, A and B, which we can write Z=A+Bi={A,B}. A quaternion number, Z, is a pair of complex numbers, A+Bi and C+Di, which we can write Z=A+Bi+Cj+Dk=A+Bi+Cj+Dij=(A+Bi)+(C+Di)j={A+Bi,C+Di}. You’ll never guess how you can write an octonion.

Addition is handled like this , multiplication is handled like this , and conjugation is handled like this . For the jump from real to complex numbers those bars (conjugates) don’t do anything, but they’re important for each of the higher number systems. With this weird looking formalism in hand you can go from real numbers to complex numbers to quaternions to octonions to sedenions and so on and on and on (if you *really* want to).

It turns out that these higher number systems are useful. Complex numbers are ridiculously useful. Quaternions have a lot of interesting and *fairly* intuitive uses, like modeling rotations in 3 dimensions (which coincidentally is where we live) in part because they don’t have “special angles” that mess them up (e.g., the north pole is difficult to work with because it doesn’t have a definable longitude, but quaternions don’t have “north pole type problems”). While octonions are useful, they’re not useful in any easy to describe ways (when was the last time you *really* needed 8 dimensions for a problem?). Turns out they’re useful in string theory and presumably the higher number systems are useful as well. The harder mathematicians try to make mathematics that’s “pure” and free of the burden of being useful, the better they end up making our physics and computers.