Math time, oh yeah. Okay so quaternions are what we call hypercomplex numbers. Here complex doesn't mean that they are complicated, they are a complex. Multiple dings combined, just like a building complex. It's hypercomplex because whereas a regular complex number is made up of a real component and an imaginary component, a quaternion has a real component and 3 imaginary components.

Okay so you must have a lot you are thinking about, but it might be useful to understand how you do operations. The quaternion is sort of a hybrid of a 3d vector and a regular complex number. You can add quaternions together by summing each component, just like with vectors and regular complex numbers. For simplicity we can call the units of the imaginary components i j and k.

(r +xi +yj +zk) + (s + ai + bj + ck) = ( (r+s) + (x+a)i + (y+b)j + (z+c)k )

For multiplication, you multiply each component by each other component. Multiplying by a constant is easy, you just scale each component. But what happens when the components interact? If you multiply an imaginary unit by itself you get what you would with regular imaginary numbers.

i×i = j×j = k×k = -1

But what about the rest? It operates just like a cross product of vectors!

i×j = k j×k = i k×i = j j×i = -k k×j = -i i×k = -j

Pretty neat huh? You can use these things to represent rotations, and the math isn't all that complicated to use.

    • butt [they/them]
      ·
      4 years ago

      Yep. These work in 3D space to describe rotations the same way you can use complex numbers (a + bi) to describe rotations in 2D space

  • TemporalMembrane [she/her]
    ·
    4 years ago

    You can go even higher to octonions but starting with the quaternions you start to lose more and more useful things (like associativity for octonians and commutativity for quaternions). The next highest are the sedions (15 imaginary directions and the real line) but I don't think many people research that because its lost almost any structure and there isn't much we can say about it.