A casual intro to Geometric Algebra
post by Orfeas · 2021-04-28T00:00:46.221Z · LW · GW · 2 commentsContents
Some background How I got interested in geometric algebra Motivation: representing rotations. Geometric Algebra 1. Oriented lengths, areas, and volumes in 3D 2. The outer product and geometric product 3. Generalizing complex numbers 4. Doing rotations better Closing thoughts None 2 comments
(casual but not informal, prerequisites are trigonometry, vectors, and complex numbers, subject as digested by a non-expert in an unrelated field of science)
Some background
How I got interested in geometric algebra
One evening I stayed after class to speak with my mechanics professor. He showed me a formulation of Maxwell's equations that looked like
"Wait, what? Aren't there supposed to be four equations?" is a question I should have asked, had I known what a Maxwell was. A year later I had forgotten the exchange, but I happened to come across a swift introduction to geometric algebra on youtube. A comically dramatic flashback ensued and after a brief email correspondence, I ended up with Alan Macdonald's fantastic Linear and Geometric Algebra.
Motivation: representing rotations.
Hermione's hand shot up wildly from the desk right in front of her professor's.
"I know this! In Linearibus Essentia Mathematica by Grant Sanderson, chapter three, minute 3, second 48, he says that the ending coordinates of the basis vectors after a linear transformation uniquely describe the entire transformation! Put the coordinates of rotated basis vectors in a matrix, define the matrix product, and you're all set!"
Professor Vector smiled kindly, "That's spot on, Miss Granger. 10 points to Gryffindor! However, it is known that algorithmagically cheaper methods exist."
--
By the end of high school, it had been essentially imprinted upon me that there were two flavours of rotation: rotation matrixes and complex numbers.
Here's how to rotate the vector [1, 0] by 30° anti-clockwise using a matrix.
- Notice the coordinates of the basis vectors (read vertically) after a rotation by degrees must be
- Replace by 30° and perform matrix left-multiplication on the vector
And here's the same rotation, now using complex numbers.
- Throw the vector [1, 0] on the complex plane like so:
- Multiply by like this :
- Hey presto, retrieve the vector from the complex plane
Looking back on these notations, I feel like they do not capture the essence of what it means to rotate a vector. Matrix notation is really more adapted for robots than for humans. The issue is that unless you sit down and draw the resulting positions of the resulting basis vectors, you cannot tell what kind of transformation is being performed by glancing at the matrix. Complex numbers are already more compact, but it's not so obvious what the imaginary unit has to do with rotation in the first place.
Is there a better way?
Geometric Algebra
The promise of geometric algebra is the encapsulation of elementary linear transformations on points, lines, planes, and more into a useful and transparent algebra.
What follows is a short introduction to the subject, following a selection of topics in Linear and Geometric Algebra by Alan Macdonald. We'll have a look at
- Oriented lengths, areas, and volumes in 3D
- The outer product and geometric product
- Generalizing complex numbers
- Doing rotations better
1. Oriented lengths, areas, and volumes in 3D
An oriented length , also called a vector, is an arrow. Its length, or norm, is some real number . If we put two oriented lengths and head-to-tail, then we'll get a new oriented length . We can also stretch it like this: , and flip it like this:
An oriented area is very similar to an oriented length. It's a segment of a plane but we decide that it has fingers and that it's pointing in one of two orientations, drawn as a swirly arrow, or . We denote 's area, which is called norm too, with . Just like with oriented lengths, we can add two oriented areas and together: , and scale them like so: .
An oriented volume is a segment of space, or blob, with an orientation or and volume . We can add blobs like , scale them like , Surprisingly, oriented volumes do not have a "direction" in 3D space. Even more surprisingly, they do in 4D. Why? (Hint: does an oriented length have a direction independent from its orientation in 1D space? What about 2D space?)
Importantly, oriented areas and volumes don't have a shape because all we know is their orientation, direction, and norm. Therefore, in a given plane, any square is equal to any circle of the same norm. This point may seem confusing at first, but we can see it as an extension of the definition "a vector is an equivalence class under equipollence of unordered pairs of points".
2. The outer product and geometric product
Take two vectors and . Their outer product is the oriented area generated if the two vectors formed the sides of a parallelogram in the unique plane containing and . Its orientation is the opposite of the orientation of .
There's a deep relationship between the cross and outer products, in that the cross product is the vector orthogonal to the oriented area generated by the outer product.
Let's turn our attention to the shiny new geometric product of two vectors and :
We define it as the sum of the inner and outer products of two vectors. Ok, so as an example, let's consider vectors as members of and see what these three products mean component-wise.
The inner product of two vectors is the familiar dot product which yields a scalar.
The outer product of two vectors will yield a bivector which is just an oriented area. The bivector below is an oriented area of norm 1 in the plane spanned by the two standard basis vectors.
Finally, the geometric product is the sum of the above. This sum yields a multivector, which is like a Halloween candy bag of different dimensional objects.
Let be the smaller angle between and , so and let's use the figure above to motivate the actual definitions of the inner and outer products.
The inner product of two vectors gives a scalar that is largest when the two vectors are pointing in the same direction (), zero when they're orthogonal ( or ) to each other, and smallest when they're pointing in opposite directions ().
The outer product of two vectors returns an oriented area, so in some sense, it is proportional to the bivector . When the two vectors are pointing in the same or opposite directions, the area spanned is zero. When they're orthogonal to each other, the norm is maximal. The orientation is decided by how the area is swept, which is the information we can retrieve from the sign of . So we have
3. Generalizing complex numbers
The algebraic properties of complex numbers (and much more) are subsumed by geometric algebra. How? Let's look at complex numbers by trying to rebuild the imaginary unit from the tools that we've discovered so far. We'll need two properties of the geometric product for this.
First, watch what happens when you swap the terms of a geometric product of two basis vectors.
Second, the geometric product of a basis vector with itself will yield 1.
And now, interpreting exponentiation as repeated geometric products, this falls out.
Behold, the unit imaginary (now in bold). From this point onwards, anything you'd like to do with complex numbers could be done with real vectors, which is excellent. What's more, the unit imaginary now represents an oriented area which, we'll see, is a direct answer to our original question of what is doing in rotation.
So in particular, this Euler identity holds :
And it turns out that the geometric product of two vectors even has a polar form
4. Doing rotations better
So you'd like to rotate a vector. The first question to be asked is around what?
Let's consider the 2D case where some vector is lying in the plane and is being rotated around the origin counter-clockwise degrees to become the vector . What is the axis of rotation?
Well, it's hard to say! We could argue that is rotating around some third axis poking through the center of the page, but the problem is that our space is 2-dimensional. To avoid any philosophy, let's just rotate the plane instead.
First, write down the polar form of and then solve for , knowing that
Nice. Multiplying a vector in the plane on the right by is the action of rotating by degrees, turning into . You can check that multiplying on the left by does the same thing. So what about doing the same in 3D? What about rotating in some other arbitrary plane? Isn't this what we've all been waiting for?
Absolutely! We'll have to get our hands dirty for a moment, but we'll emerge on the other side with the most compact known algebraic representation of rotations in 3D.
First, let's generalize to be any bivector of area , and call it an angle. Think of it like an oriented slice of pizza with the pointy end stuck at the origin. Here are some concrete examples.
In a general rotation of a vector about the origin, the vector may not even live on the plane of rotation. Like olives on a pizza, there's some bit of that's stuck on the cheese and some bit that has leaped away. Geometrically, can be written as the sum of its projection and rejection onto the angle .
We're going to introduce some small changes to the previous rotation identity. First, we'll have to consider the two components of separately and then, bare with me, split the exponential into two halves. Also, the rejection of will be left totally unaffected because it's in line with the rotation's axis.
We would like to send one of those halves to the other side of so that we can recombine and . Luckily, is in the same plane as so
That's it! Rotation by half-pizza slices on each side of . Here's how to rotate by the angle , a quarter-turn in the plane.
Closing thoughts
- Vectors such that have multiplicative inverses in the geometric algebra over a vector space. Yes, you read that right. Also, I haven't found something that hasn't been made instantly easier using geometric algebra, it's great.
- A strong opinion, lightly held, of mine, as a non-physicist, is that physics should always be taught using the most appropriate relevant notation. Therefore, I believe that cross-products in classical mechanics should be disposed of.
- David Hestenes' project of Geometric Algebra is a Theory of Instruction, as outlined in his article Reforming the Mathematical Language of Physics. I intend to read and get familiar with these tools.
- I found Alan McDonald's book to be a great read, and I enjoyed the problems, so I recommend it to anyone who's interested in learning geometric algebra as a natural extension of linear algebra.
2 comments
Comments sorted by top scores.
comment by Adele Lopez (adele-lopez-1) · 2021-04-28T01:47:13.913Z · LW(p) · GW(p)
Nice intro! I agree that the cross-product should be deprecated in favor of the wedge product in almost every physical application.
I like Geometric Algebra, but I find that its proponents tend to oversell it (you aren't doing that here, I just mean in general). Which is unfortunate, since it increases the entropy (on all sides) of pretty much all discussions of it. On the other hand, it does seem to add more energy toward people learning it.
Anyway, here are some of my observations on potential blindspots. I think the way it mixes types (e.g. the geometric product of two vectors is the sum of a bivector and a scalar) sometimes adds more confusion and complexity than it removes. As an example of this from Hestenes himself, from page 18 of this, he describes trying to find the right way to use GA to model kinematics (i.e. translations, rotations, and their combination: screws). At first, this seems like the perfect excuse to add a vector to a bivector, and get a coherent geometric meaning out of it! However, he found that it was actually better to add some null basis elements, so that translations and rotations both end up being bivectors. Another case where I think type conflation is happening is in the identification of the dual space with the primary space; these have different physical units (but to be fair, standard math is terrible about conflating these too)!
None of this is to say that there aren't a bunch of great insights from thinking about things from the GA viewpoint! In particular, I find thinking of spinors as exponentiated bivectors is especially enlightening! Just a note of caution about some blindspots of the community that I've noticed since first being interested in it.
Replies from: Orfeas↑ comment by Orfeas · 2021-04-28T11:29:05.832Z · LW(p) · GW(p)
Thank you for your insightful comment. The concept of a screw is new to me, so I'll have good look at the article you shared and I will try to think carefully about how physical units relate to types, as well as what constitutes true geometric meaning.