Hacker News new | ask | show | jobs
by xelxebar 302 days ago
In a particular sense, division and subtraction are more general than their supposedly more primitive inverse operations.

For example, we can take the "difference" of two points to get a vector, i.e. the grocery store is in that direction, while it doesn't make much sense to add two points---this location plus the grocery store? Similarly with temperature (of a given scale), today can be 5 degrees hotter than yesterday, but saying "the total temperature between yesterday and today is 57 degrees" doesn't have a clear meaning.

So, in that vein, what operation transforms one 3D vector into another?

Well a combination of rotation and scaling, of course! There is some freedom in how you want to represent this scaling+rotation operation; we could use 3x3 matrices, meaning that the quotient of 3D vectors is reasonably described by a matrix. However, 3x3 matrices have 9 degrees of freedom, which is way overkill, since we just need 4 numbers: an axis (2 params), an angle, and a scale factor. For this reason, quaternions are a particularly natural representation of 3D vector division.

The general concept of division that we're getting at here has the terrible name "g-torsor". If you're not familiar with abstract algebra, though, the definition is not very enlightening. However, John Baez has a really accessible article[0] that comes to the rescue!

Side note: notice that in general, the results of division are different objects than the things doing the division. As such, it's somewhat unfortunate that we use the same units for both in many cases, e.g. temperature and temperature differences are really different things. Talking about units quickly turns into type theory, though, so I'll stop there.

[0]:https://math.ucr.edu/home/baez/torsors.html