I think this is the first article I've ever read about the octonions that didn't include the following John Baez quip:
"There are exactly four normed division algebras: the real numbers ($\R$), complex numbers ($\C$), quaternions ($\H$), and octonions ($\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/."
Is there an easy explanation of what problems quaternion or octonions solve?
Imaginary numbers are needed to take the square root of a negative number, and complex numbers result from combining the new numbers with the real numbers. Complex numbers also allow solving roots that aren't found in just real numbers.
But I have no similar comparison of what I can do with a quaternion or octonion that I can't do with a complex number. I remember seeing some w based number system derived from the cube root of either 1 or -1 (forget which, but w and -w were the solutions that weren't 1 or -1), but it did all the same things that complex numbers do and was considered mostly uninteresting.
It also seems like there is a pattern to go infinitely beyond octonions, but they all behave identical to octonions, but are the octonions even needed in the same way complex numbers are needed, or do they just make some math problems easier to work with?
Historically, quaternions came about as a way to try to reason about three dimensional physics. I mean, complex numbers were obviously really nice -- two dimensional numbers you could meaningfully add, subtract, multiply and divide. But they were only 2-D and we live in a 3-D world and we want to do 3-D physics.
So Hamilton was trying really hard to find a way to have 3-dimensional numbers that behaved nicely, and he couldn't do it. But he did find 4-dimensional numbers -- the quaternions. And they were really neat. You can use them quite well for classical mechanics, and electromagnetism, and even special relativity. So, why don't we?
We look at Maxwell's equations of electromagnetism today, and they're really nice, single-line vector formulas. You can also write them as nice, single-line quaternion formulas. Our notion of vector didn't exist at the time the quaternions were first used, and it was a boon to have quaternion notation to simplify some of these physical laws. Vectors and quaternions competed for a bit, and vectors won since they generalize to arbitrary dimensions.
Hidden inside of quaternion multiplication, you can find the three-dimensional versions of the dot product and cross product. And they do have some theoretically interesting properties for number theory and abstract algebra. In the end, however, sometimes items are discarded in favor of better items. I'd rate quaternions as one of the coolest items that ultimately wound up in the discard pile.
Rotation matrices by themselves do not suffer from gimbal lock. I think you meant Euler angle representations with the rotations always applied in a consistent order around the pitch/yaw/roll axes.
Right. Just to add on, one reason Quaternions are still used in graphics (despite rotation matrices not suffering from gimbal lock either) is that they're easy to interpolate between, even if you have many.
If you just have two you can slerp (or not), but if you have a large number of them (weights from an animation system, for example), a basic weighted sum followed by normalizing is shockingly well behaved and extremely fast.
This is a timely comment. I've been aware of quaternions for rotation for decades but only learned yesterday that rotation matrices can be used for some use cases. I'd never heard this small fact until then and now I stumble across your comment!
Geometric algebra, related to quaternions, can represent Maxwell's equations in a single equation, using polyvectors and the inner and outer products.
The subalgebras formed by scalar and bivectors (1, x^y, y^z, z^x)--or the monovectors and the pseudoscalar (x, y, z, x^y^z)--from a three-dimensional geometric algebra have a lot of the same mathematical properties as quaternions.
I don't know whether or not octonions have a similar relationship with a 4-D geometric algebra, where one dimension is a timelike dimension, because that is one gnarly mess of anticommutative, nonassociative math to wade through.
You can summarize Maxwells equations in any dimension using two formulas:
$$
\delta F = j
d F = 0
$$
where $F$ is the field-strength two-form and $j$ is the current density.
Complex numbers tell you what happens if there is an i that i^2=-1. What happens is that you get cool way to express 2d rotations.
Quaternions tell you what happens if there are three different i's that have this property. And it tells that it leads to nice algebra that expresses 3d rotations very well (and even 4d if you believe the article).
Octonions tell what happens if there are seven such i's. And it leads to cool algebra that helps expressing.... we don't quite know yet.
Also considering other numbers of i's doesn't lead to anything coherent. Also considering different possibilities of what should be the result of multiplying one i by another different i doesn't lead to anything cohesive.
So... i^2=-1 apparently can have either zero, one, three or seven solutions and they have to have very specific relationships between themselves for calculations to make sense
i did not understand quaternions until I read Hamilton's original works. Maybe i just have a 19th century brain or something. but i found them delightfully free of modern gobbldeygook.
>Maybe i just have a 19th century brain or something. but i found them delightfully free of modern gobbldeygook.
No, you can blame Bourbaki for that. People such as V. Arnold decried the way mathematics is now presented[1].
It was from Hamilton's book that I learned what the word vector means and why it's used. It simply means carrier (as in malaria vector that you might heard from biologists) - and carries the space, by a translation!
Such lucidity is absent from all linear algebra books I've seen.
We need to go back to the presentation style of 19th century, where not only the result, but the thought process is presented. Today's papers look like they are written for formal verification systems.
I share the same sentiment.
The state of modern mathematics exposition is well summarised IMO by "they like the logically most efficient path; that rarely coincides with the pedagogically most efficient one", to paraphrase.
I also have an anecdote similar to yours regarding Hamilton and vectors: I think it was in one of the "Analysis Infinitorum" (Euler) that I found the natural logarithm being called the "hyperbolic logarithm" (it was the English translation of course). When I was a kid I was perplexed by how everyone seemed to insist on using e as the base of their logarithms and exponentials -- why the hell? Reading Euler's treatment of the subject would have been very satisfying then.
>Is there an easy explanation of what problems quaternions solve?
Sure. Unit quaternions form a double-cover of SO(3).
In other words, you can encode a rotation of a 3-dimensional object with a single unit quaternion.
But wait, there's more! You could do the same with a matrix, or a triple of angles. Why not do that?
Answer: interpolation. The "natural" way you want to go from one rotation to another corresponds to exponentiation of quaternions. If you linearly interpolate matrices, the intermediate steps will do something nasty: they won't even be rotations!
The natural way to implement the Arcball interface for rotations is using quaternions. Here[1], I have implemented it in ProcessingJS and wrote up the math behind it.
Quaternions (like complex numbers) can do other things too, but this alone is a good start. Also gives you intuition why they aren't commutative: because rotations in 3-space aren't.
TL;DR: Unit complex numbers = rotations of plane. Unit quaternions = rotations of 3-space.
PS: you shouldn't think of complex numbers as the solution to the problem of "taking the square root of -1". Think of them as "how can I multiply/divide a 2D vector by another 2D vector?" - there's only one way to do it sanely (multiply/divide lengths, add/subtract angles). This is what the complex numbers are.
Hamilton was trying to solve the same problem in 3D, and couldn't (turns out, it is not possible[2]), but solved it in 4 dimensions, and later found many applications for them.
In my opinion this is the best answer, because it neatly explains why quaternions are more useful than vectors for rotation. Vectors are "nicer" because they generalize to arbitrary dimensions. But quaternions handle 3-dimensional rotations in (essentially) a single step. The point about interpolation is really important, because all the machinery offered by vectors becomes a burden.
It's also good to think about complex numbers in the way described here because it neatly abstracts the concept of numbers and maps them to a form of dimensionality. Great comment all around.
If you code a system with 3D rotations coded as Euler angles, you can align two axises and lose a degree of freedom. This is gimbal lock.
Using unit quaternions (aka versors) to code the rotation instead, you cannot lose a degree of freedom. 4x4 matrices also solve this problem, but quaternions are more mathematically efficient. They also give very smooth interpolation for computer-assisted animations.
Also related to spinors in quantum physics and exists as a subalgebra of some conformal geometric algebras.
I've known about quaternions for many years and even used them to program rotation matrices for a few 3d projects but I've never really given them much thought beyond that. For some reason, your comment just completely changed the way I thought about them. To think that the i part of ijk is the same i = sqrt(-1) is mindblowing to me. I had never considered that there may be other "more imaginary" dimensions that were required to solve yet more complicated problems.
One way to think of it is that numbers are mainly used to solve problems by studying the behavior of subsets of them that have specific properties. Like "prime numbers", "square-free numbers", and "solutions to this given equation", etc., and the interesting feature of numbers in general is that they can embed multiple such concepts at the same time. This is helpful because you can find numbers that share multiple properties in order to bridge between otherwise unrelated problems -- it makes it easier to compose solutions of simpler problems into solutions for larger, more complex problems.
From that point of view, quaternions and octonions solve problems in the same way more common numbers do, they just have different sets of properties and so help solving a different set of problems. Of course, they can only do this if we study them well enough to have a sufficiently large suite of concepts and relations in our toolbox.
Not sure about octonions. But quaternions are somewhat used in mechanics, specifically for dealing with rotations. The usage of quaternions is computationally simpler for describing arbitrary rotations in 3d dimensions.
> Imaginary numbers are needed to take the square root of a negative
No, they are not. That problem is not well defined. A symbol is not a solution.
Complex numbers are needed to solve the polynoms of a higher degree. Eg. x^4+x^2=-1 can be simplified to y^2+y=-1 with y=x^2 which wouldn't have a solu
"There are exactly four normed division algebras: the real numbers ($\R$), complex numbers ($\C$), quaternions ($\H$), and octonions ($\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/."