Hacker News new | ask | show | jobs
by Certhas 2781 days ago
Matrices are linear transformations. Take a bunch of vectors, map them to another bunch of vectors. It's all inherently geometric.

The matrix:

  adg
  beh
  cfj
maps the vector (1,0,0) to the vector (a,b,c), (0,1,0) to (d,e,f), etc... so if you write any other vector as a weighted sum of (1,0,0), (0,1,0), etc... the weights get mapped to the new vectors.

As someone with a background in physics and geometry, it seems bizarre to me to use quaternions to reason about geometry. It's really unnatural. It's basically just a coincidence that the algebraic structure of rotations in 3d happens to look like this. It doesn't generalize to higher dimensions. There is no equivalent to quaternions for 4, 5, 6d [1].

Bivectors discussed in the article, on the other hand, easily generalize to higher dimensions, and are a completely natural geometric concept. (Of course if your thesis is about constructing 4d objects you care about that a whole lot more than if you build a 3d engine...)

Now that doesn't mean it's easier or harder to manipulate one or the other. As they all reference the same mathematical structure it's also not surprising that the code ends up being the same. And given that algebra is more natural for computers, I can see why quaternions might be useful here. But geometric they are not.

[1] https://en.wikipedia.org/wiki/Composition_algebra

1 comments

There is an N-dimensional generalisation for complex numbers, quaternions and hypercomplex numbers called Clifford algebra. I'm not an expert in that field (coming from physics and optics) but apparently it's not by chance that quaternions are connected with the rotation group SO(3) and complex numbers with SO(2). You can generalize to SO(n) with Clifford algebra.
There was an excellent article posted to HN a few years back about Clifford algebra you (and GP) might find interesting:

https://slehar.wordpress.com/2014/03/18/clifford-algebra-a-v...

This is closely related to the exterior algebra, which is where bivectors live. But I don't know much about Clifford algebras either. I didn't know that they are more directly connected to Quaternions. Thanks!
The 'geometric product' mentioned in the article is just Clifford's product. The 'geometric algebra' is the same thing as the Clifford algebra induced by the scalar product.
Ah got it. Thanks. Feels like I should have known that.