Hacker News new | ask | show | jobs
by _mhr_ 1277 days ago
What are the advantages of GA over regular linear algebra in practice? Can you create better neural nets or faster graph search algorithms? What is the draw, computationally?
2 comments

The most commonly cited example is cross product -- instead of esoteric rules about "this special type of vector that doesn't really work like a vector", you just make them their own irreducible thing.

This means that "multiplying" apples and oranges is possible by having appapple components, ororange components, and apporange components, and they're just described the same way as you do with distributing multiplication in brackets, so just sum of incomparable objects.

So ultimately, in terms of calculations they fundamentally use the same number of operations. The main advantage is a cohesive framework of Types, rather than arbitrary exceptions defining different product rules. You just have *one* vector product, whose output have all of those as components.

Do you think there's a practical benefit, or is it just more elegant conceptually?

From my limited understanding the idea is that instead of having vectors, quaternions, planes and so forth, these are all represented pretty much the same way. But as a working programmer is there a benefit to that? At the type level I'd definitely like those concepts to be separate.

Check out this gallery of examples (from ganja.js), e.g. this one https://enkimute.github.io/ganja.js/examples/coffeeshop.html...

The concepts may or may not be useful for your aims. One pragmatic benefit could be e.g. you can automatically generate optimally-performant code for different algebraic operations, all just from the spec.

>What are the advantages of GA over regular linear algebra in practice?

It is a unified description of certain kinds of spaces. The greatest conceptual advantage over "regular linear algebra" (the quotes are there because you are still doing regular linear algebra, but with a different spaces and operations than R^n) is that it allows a very nice description of Euclidean space. Where e.g. points and rotations are the same type of object.

I think the best example are complex numbers. Complex numbers are just 2D vectors where multiplication is rotation. (Defining i as the square root of -1 is probably the worst way to think about complex numbers). The way they are doing it (the right way IMO) is actually as a 2^1 dimensional Vectorspace, with one multiplication (fully described by the product of all basis vectprs with one another) which describes the geometric properties of 2D euclidean space.

You can see more here: https://bivector.net/index.html

>Can you create better neural nets or faster graph search algorithms? What is the draw, computationally?

In one talk they claimed this is the case for graphical applications, where they contrasted it with Quarternions.

It is useless for neural nets, which need fast high dimensional matrix multiplication.