Hacker News new | ask | show | jobs
by jjoonathan 2327 days ago
> the multiplication rules followed from the desire to define the square root of a negative number

That's a bit reductionist. You don't just get the square root of a negative number, you get the Fundamental Theorem of Algebra (an Nth degree polynomial has N roots), which is a mathematical power tool if ever there was one.

Complex numbers dramatically simplify a bunch of proofs in linear algebra, give us tons of nifty integration techniques in complex analysis (the techniques are relevant for real numbers, they just use C), provide a representation of 2D rotations that can be manipulated using the rules of algebra (this is the most relevant to the thread), and give physicists, electrical engineers, and signal processing people an abstraction to represent oscillations (energy sloshing between two buckets = two elements of a complex number, which you can then do algebra with). They're a workhorse.

Quaternions are an attempt to do that in 3D. The dot and cross product of vector calculus are other pieces of those efforts. Unfortunately, vector calculus escaped the "math lab" before it was complete and got written into other fields and engineering books, so even though the underlying concepts were eventually sorted out (it's called Geometric Algebra), everybody just uses the half-baked abstractions (quaternions, dot product, cross product) which are Good Enough. It's a perfect example of "worse is better" affecting something other than software engineering.

1 comments

>Quaternions are an attempt to do that in 3D.

I guess the question is, why does it then stop. Why not a 4D alternative. Or if you look at it going by scalars needed in a single value, it goes from 1 to 2 to 4. Why not 8 or 16 (or some other growth)? Why does it stop there?

Also, is there as easy of a problem to understand introducing the 3D technique (be it quarternions or be it Gemoetric Algebra) that works as well as using sqrt(-1) for imaginary numbers?

It can be generalized, but doing so requires some subtlety. The naive approach (the Cayley-Dickson construction) can be repeated ad infinitum, but it doesn't continue to yield useful results for representing geometric interactions like rotations in high dimensions.

Thankfully, this is a solved problem. The correct generalized structure for doing geometry is called a Clifford algebra. For n-space and any nonnegative integers p,q satisfying p+q=n, there is a corresponding real Clifford algebra Cl(R,p,q). Cl(R,0,1) turns out to be isomorphic to C (the complex numbers), and Cl(R,0,2) is a four-dimensional algebra that turns out to be isomorphic to Q (the quaternions).

This is actually not that surprising, because the signature (p,q) more or less means the algebra is built by adjoining p generators that square to +1 and q generators that square to -1 in the base field. This is formalized by taking a quotient of the tensor algebra of the field. You might wonder though why we have (p,q) = (0,2) for the quaternions. That's because if the two generators that square to -1 are i and j, then we can build the third as k = ij, so we get it for free.

A real Clifford algebra is known as a geometric algebra, and these give rise to objects called rotors. Rotations in an arbitrarily high-dimensional space can then be written as conjugation by a rotor.

You can't get the associative property in higher dimensions. There is something called octonions (which is not associative but has some similar tho weaker properties) https://en.wikipedia.org/wiki/Octonion There is a sequence of such structures, but after the Octonions you get non-zero numbers that multiply to zero: https://en.wikipedia.org/wiki/Cayley%E2%80%93Dickson_constru...
> I guess the question is, why does it then stop. Why not a 4D alternative.

It doesn't stop. That's what motivated geometric algebra, which works in any dimension. Quaternions are a sub-algebra of geometric algebra. They represent 3D rotations, which makes them interesting in their own right.

Asterisk: I believe there's a sign convention issue in mapping between quaternions and the even subalgebra of the 3D geometric algebra, so they aren't identical, just isomorphic.

> Also, is there as easy of a problem to understand introducing the 3D technique (be it quarternions or be it Gemoetric Algebra) that works as well as using sqrt(-1) for imaginary numbers?

That's an extraordinarily high bar. I don't believe anything reaches it. Part of the problem is that complex numbers are one of the most successful concepts in all of mathematics. The other part of the problem is that most of the useful facets of geometric algebra escaped the field of abstract mathematics under their own name before the unifying structure was discovered. The dot and cross product, quaternions, differential forms and the general Stokes' theorem are all examples. The remaining value proposition of geometric algebra lies mostly in getting rid of minor annoyances that come from this half-baked nature of traditional vector calculus tools:

* Cross products break in more than 3 dimensions and they break if you reflect them (see: pseudovectors). Bivectors have no such issues. They represent rotations in any dimension, reflected or not.

* Vector algebra with dot and cross products involves memorizing lots of new identities and applying creativity to work around the absence of division, while geometric algebra just has division and the same bunch of algebra tricks you already know. The geometric product isn't commutative, so it isn't perfect in this sense, but learning to deal with non-commutative algebra is a much more fundamentally useful thing than learning a bunch of 3D-specific identities.

* Dot and Cross with one argument fixed "destroy information" mapping from their input to their output. If you put them into an equation, the equation does not fully constrain the free vector, so you are often going to need more than one equation to represent any single geometric concept. Not so with geometric algebra. Many concepts map to a single equation. Including Maxwell's Equation (I use the singular intentionally)!

> geometric algebra just has division

do you have a good reference for this? i've looked into GA bit but don't remember seeing anything like this. e.g. what would dividing a bivector by a vector mean?

Here's a Math StackExchange thread that gives the procedure I'm familiar with: https://math.stackexchange.com/questions/443555/calculating-...
I still haven't wrapped my head around quaternions, but 3Blue1Brown on Youtube has a good series of videos justifying and explaining the complex numbers and quaternions in terms not of sqrt(-1) but of transformations of space.
I think the answer to that question is that it doesn't "stop", but I'll try to offer a reason that isn't "octonions exist", but instead goes in a different direction.

Geometric Algebra can capture the structure of both complex numbers and quaternions, and also the structure of the dot products, cross products, and the different kinds of vectors that arise from those operations.

To be clear, matrix multiplication can also capture the structure of complex numbers [1] and quaternions [2]. There might also be a concise reference to matrix representations of some geometric algebras, but I didn't find one. So matrices are kind of one way to not "stop at 3D", but the structure is almost too uniform (which on one hand makes it too general, and on the other hand makes it not general enough), I'd say). Sure, with a matrix you can represent rotations in 4D, but you still need to operate on vectors only. Geometric algebra, if it does have a matrix representation, gives names to special kinds of matrices and special kinds of vectors.

[1] https://en.wikipedia.org/wiki/Complex_number#Matrix_represen... and [2] https://en.wikipedia.org/wiki/Quaternion#Matrix_representati...