Hacker News new | ask | show | jobs
by godelski 301 days ago

  > How does it make sense to divide a vector by another? Can we at least multiply two vectors as well?
Yes. That is the point of moving into the 4D complex space. This takes some higher level math, but I think it is essentially anyone can understand but just not taught in the standard coursework[0]. Here's a super quick crash course

This is all about how you abstractly define things like addition and multiplication. We'll call these actions an "operator". So you got these basic algebraic structures:

  Group: a set (some numbers) and an operator (like + or *. I'll use ∘ to be general) that has associativity ( (a∘b)∘c = a∘(b∘c) ), an identity ( a∘=a ), and an inverse ( a∘ā=0 ). There's also closure which just means we don't create something that's outside the set ( ∀ a,b ∊ S, a∘b ∊ S )
    Abelian Group: We also have commutativity ( a∘b=b∘a )

  Ring: Think of as 2 groups. So we now have 2 operators ( ∘,▪ )[1]. This time ∘ is an Abelian Group and ▪ has closure, associativity ( (a▪b)▪c = a▪(b▪c) ), and is distributive with ∘ ( a∘(b▪c) = (a∘b)▪(a∘c) )

  Field: Extend that ring so now ∘,▪ are both Abelian Groups (▪ got an identity element, an inverse, and commutativity), but we give an exception for the inverse on identity of ∘[2]
There's a lot more structures, but what we often really want is this Field thing. Our normal 1D numbers work work like that, the "every day" type of math. But think for a second, how do you do this same math in 2D? How do we make ab consistent? Well, you can't. At least not with our standard +,. So we introduce imaginary numbers. These numbers aren't imaginary so much as we're just changing the rule on +,* (∘,▪) to work differently. So we use imaginary numbers in 2D because it creates a field! You literally could do this with tuples as long as you remember the i^2 rule.

Now we extend this to 3D. Ops, we get a problem. Really no way to make ▪ () consistent here, especially around division. Bummer. We have a Ring.

But going up to 4D we can use a similar rule as to what we did in 2D and get a Field again! Now we can do consistent math. And this is actually why quaternions become useful for 3D rotation. But they can do a lot more, though come with some limitations as well.

This is super high level and just scratches the surface of all of this stuff but I hope it at least makes some sense here. Please ask questions and I'm also sure someone else will add some useful comments. But your question is completely normal and actually gets to the motivation of why kids these days are learning the difference between 39 and 93, despite having the same answer they do mean different things and understanding that earlier helps you when you get to abstract nonsense.

[0] It is taught later because this is when you first start getting into math as being about abstractions. You basically learn that you only ever learned one very specific kind of math and that all that breaks down. Your question is absolutely on point due to this. Like how you probably learned matrix multiplication and learned that AB ≠ BA

[1] Whatever ∘,▪ these will usually be referred to as "addition" and "multiplication" but just note that they aren't the same thing you're probably thinking of

[2] Let's return to less abstraction for a second. We have + and for (standard) addition and multiplication, right? 0 is the identity element for + and note that 0 doesn't have an inverse for multiplication. That is: we can't do a * (0^-1) = a/0. Note here that / is a shorthand for * with an inverse operator.