3 ms·
Historically, quaternions came about as a way to try to reason about three dimensional physics. I mean, complex numbers were obviously really nice -- two dimen
by yaks_hairbrush 8y ago
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.
- logfromblammo 8y agoGeometric 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.
- orbifold 8y agoYou 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.
- XorNot 8y agoQuaternions show up all the time in 3d graphics - they're how you represent rotation matrices without the problem of gimbal lock. I don't know if that's significant but it was how I stumbled on the concept in high school when I was messing with Direct X.
- kbwt 8y agoRotation 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.
- yoklov 8y agoRight. 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.
- andybak 8y agoThis 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!