In my previous post, I reviewed how the complex numbers can be used to represent coordinates in the plane and how, once you’ve done that, complex arithmetic leads naturally to rotations, scalings, and translations of the plane. Today, we’re going to do the same with the Clifford algebra .
What are Clifford Algebras
In our previous post, we used two different ways to represent coordinates in the plane. We used an ordered pair of real numbers like and we used the real and imaginary parts of a complex number like . Another way we could have written the coordinates in the plane is as a vector. Typically, to express a vector, we pick an axis (say, the x-axis) and then pick a second axis perpendicular to it (say, the y-axis). Most physics books would call these and . I am going to use and instead so that there is no confusion with and because it is a notation that we will continue throughout Clifford algebras. We could then express as . Here, and are called unit vectors. We assume they have length one so that when we take three of them, we get something with length three (for arbitrary values of three
).
Having done that, we can easily multiply any vector by a real number using the normal distributive law: . And, we can add vectors just like we added complex numbers: summing like parts. So, . Of course, subtraction goes the same way: .
Great. We can add and subtract vectors. We can multiply vectors by real numbers. But, what about multiplying a vector by a vector? Well, let’s try it: . Again, we’re going to use the F.O.I.L. method. We end up with: . So far, I have assumed that we can multiply real numbers by our unit vectors in any order, but that maybe multiplying would be different than . Well, to get anywhere from here, we need to be able to evaluate things like and .
[Note: the F.O.I.L. method is nothing magical. It is simply the distributive law applied three times:
Actually, this leaves me a good place to mention… if you’re better at hearing someone speak while doing math than you are reading along on your own, then you can review the complex arithmetic we did in the last post with these videos at KhanAcademy.org: i and Imaginary numbers, Complex Numbers (part 1), and Complex Numbers (part 2).]
So, where are we? If we want to multiply two vectors together, we need to decide how to multiply things like or . Well, there are probably lots of ways we could do this. But, we’re going to be trying to do geometric things with our vectors. What are some geometrically useful possibilities?
We could say that any vector multiplied by itself is just itself so that . This doesn’t really help us figure out anything about and how it relates to .
Another possibility is that parallel vectors annihilate each other so that while perpendicular vectors do not. If that were the case, then . And, . so that . This has some merits. This results in what is called the Exterior (or Grassmann) algebra. There is lots of interesting stuff to learn there, but Clifford algebras take a slightly different tack.
Another natural choice might be then that if we take some vector and multiply it by itself, maybe we should get a real number that is the square of the length of . So, if we have a vector , its length is . If we want the square of the vector to be , then we need to have the following:
To make this equation work out for every and , we need to have and . This is the essence of Clifford algebra. All of the rest is deducible from here. But, we’re going to be a bit more explicit on some of the things this implies.
We can reduce further, now. When we multiplied it all out, we got: . Knowing now that and , we can rewrite this: . So, we multiplied two vectors and got a real number plus a real number times this other thing: . We’re going to call this other thing a bivector.
A bivector?
Let’s explore bivectors a little more. In particular, what is ? Well, we’ve already decided that . So, we know that . And, we already decided that , so . And, we already decided that . So, . When we square our unit bivector, we get . Our bivector is exactly like our from the complex numbers!
Recall that . Now, let’s multiply out . We get which is .
So, we could stop right here if we wanted. We could represent our points in the plane as a real number plus a real number times and do everything we did with the complex numbers. But, if we did that, then we’ve totally skipped over using the vector part of our Clifford algebra. We are only using the bivector part.
Now we’ve got real numbers and vectors and bivectors. What if we multiply ? Well, since , we are just left with . How about if we multiply ? Here, we have to make use of , so we end up with . So, our vectors and bivectors are a little weird compared to what we’re used to. We’re used to having for real numbers (and even complex numbers). But, this doesn’t work out for vectors times vectors or vectors times bivectors. And, it turns out, that will be a good thing later. In two-dimensions, it isn’t quite as big a deal. [Well, if you’re familiar with vector cross-products, then maybe it is a big deal to you since you already know that .]
Anyhow, an arbitrary element of the two-dimensional Clifford algebra is of the form for real numbers , , , and . It is a real number plus a two-dimensional vector with real coordinates plus a real number times our bivector .
Transforming the Plane
It is common/natural/intuitive?/easy? to think of the coordinates of a point in the plane as a two-dimensional vector from the origin to the point. As such, we’re just going to use the coordinates as the coefficients of the unit vectors of our general element . So, the point would be represented in our algebra as . This is called a pure vector
since it has zero for its real part and zero for its bivector part.
Now, what if we had a whole list of points , , , ? We can represent these as elements of our Clifford algebra as , , , . If we want to translate all of them by two units along the x-axis and seven units along the y-axis, then we can let and just add to each of our points: .
Now, what if we want to scale the whole plane up by a factor of six radiating from the origin? We can just let and multiply it by each of our points: .
How about rotation by an angle around the origin? Well, drawing on what we did with complex numbers, let’s see if we can just get away with multiplying by . Recall that we want a point to go to a point when rotated.
Let’s try multiplying . Remember, we have to be careful to keep the ‘s and ‘s in the order they appear because every time we swap places on them, we need to swap the sign. When we multiply this out, we get:
This is really close. We just don’t have the sign right on the sine terms. Well, we could just use the fact that and . But, that would be funky weird to use when you want to rotate by . But, we’ve seen before how switching the order of multiplying things can change the sign. Let’s try this here. Instead of multiplying with the vector on the right, let’s multiply with the vector on the left:
There we have it. So, if we let , then we can rotate all of our points by angle around the origin using: .
And, of course, if we want to scale or rotate around different points, we can translate, scale or rotate, and translate back again like we did with the complex numbers.
Not so fast
It turns out that just multiplying with the vector on the left isn’t going to serve us well as we go up in dimensions. We’re going to do something that might look really awkward now, and will be somewhat awkward for this two-dimensional case, but it’s going to prepare us to do better things in three or more dimensions.
Let’s let . And, let’s let . You might recognize this as just like the complex conjugate of .
Let’s see what we get if we multiply by on the left and by on the right.
This is getting a bit large, so let’s just concentrate for a moment on the terms that are going to contribute to in the end: namely, the term in the first factor times the real part in the second factor and the term in the first factor times the bivector part in the second factor.
We can do a similar thing with the portions that contribute to :
Now, we have to remember some trigonometric identities. In particular, we need to remember the double angle identities: and . Taking advantage of those, we have our whole product:
So, if we want to rotate by an angle around the origin, we can let . Then, we can let . And, of course, if we want to rotate around a point instead, we can translate by , do this rotation, and translate back so that .
Now, we’ve used Clifford algebras to represent rotating, translating, and scaling the plane. In our next installment, we will move on to use quaternions to rotate three-dimensional space. From there, we will move to the Clifford algebra for three-dimensional vectors .
[…] posts, I described how complex numbers can be used to rotate, scale, and translate the plane, how Clifford algebras can be used to rotate, scale, and translate the plane, and why I resorted to an awkward trick for the Clifford algebra rotations of the plane. In this […]
[…] my prior post about using Clifford algebras to do plane rotations, I finished with a non-intuitive step at the end. Rather than multiplying on the right by an […]
[…] using Clifford algebras for rotating, translating, and scaling the plane, and […]