What Was Up With That Rotation Trick? June 10th, 2009
Patrick Stein

In 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 element representing a rotation of angle \theta, I multiplied on the left by an element representing a rotation of angle \frac{\theta}{2} and multiplied on the right by an element representing a rotation of angle -\frac{\theta}{2}.

Why did I do this? Well, I mentioned it would be awkward for the two-dimensional case, but that it will be important when we get to three or more dimensions. Well, work for a moment with \frac{\theta}{2} being a quarter rotation (ninety degrees, \frac{\pi}{2} radians). This means our total rotation is going to be a half turn (180 degrees, \pi radians).

For that \frac{\theta}{2}, r = e_1e_2 and so \overline{r} = -e_1e_2. Let’s just look at what it does to our unit vectors e_1 and e_2 to multiply on the left by r and on the right by \overline{r}.

For e_1, we get -e_1e_2e_1e_1e_2 = -e_1e_2e_2 = -e_1. Similarly, for e_2, we get -e_1e_2e_2e_1e_2 = -e_2.

So far, we were only working in two dimensions. As such, there wasn’t any e_3 to worry about. But, what if there were? What happens to the z-coordinate of something if you rotate things parallel to the xy-plane? It remains unchanged.

Well, what would happen if we multiplied e_3 on the right by \cos\theta + \sin\theta e_1e_2? We would end up with \cos\theta e_3 + \sin\theta e_3e_1e_2 = \cos\theta e_3 + \sin\theta e_1e_2e_3. We’ve ended up scaling e_3 and adding in a trivector e_1e_2e_3. We’ve made a mess.

Let’s try it instead with our trick. We’re going to start with -e_1e_2e_3e_1e_2. Every time we transpose elements with different subscripts, we flip the sign. Every time we get two elements next to each other with the same subscript, they cancel out. So, switching the e_3 with the second e_1, we get e_1e_2e_1e_3e_2. From there, we can switch the first two elements to get -e_2e_1e_1e_3e_2 which is just -e_2e_3e_2. We can switch the e_3 with the second e_2 to get: e_2e_2e_3 which is just e_3. So, our trick leaves e_3 unchanged.

In the above, there is nothing special about the subscript three. It would work for any subscript except one or two. So, the trick allows us to break the rotation up into two parts that still do what we want with e_1 and e_2 but leave our other directions unchanged (or, maybe it’s easier to think of them as changing them and then changing them right back).

Clifford Algebras for Rotating, Scaling, and Translating the Plane June 8th, 2009
Patrick Stein

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 \mathcal{C}\ell_2.

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 (3,5) and we used the real and imaginary parts of a complex number like 3 + 5i. 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 \hat{i} and \hat{j}. I am going to use e_1 and e_2 instead so that there is no confusion with i = \sqrt{-1} and because it is a notation that we will continue throughout Clifford algebras. We could then express (3,5) as 3e_1 + 5e_2. Here, e_1 and e_2 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: s \cdot \left(xe_1 + ye_2\right) = (sx)e_1 + (sy)e_2. And, we can add vectors just like we added complex numbers: summing like parts. So, (ae_1 + be_2) + (ce_1 + de_2) = (a+c)e_1 + (b+d)e_2. Of course, subtraction goes the same way: (ae_1 + be_2) - (ce_1 + de_2) = (a-c)e_1 + (b-d)e_2.

Read the rest of this entry ⇒

Complex Numbers for Rotating, Translating, and Scaling the Plane June 7th, 2009
Patrick Stein

A good friend of mine recently discovered some of the fun things you can do with complex numbers if you’re using them to represent points in the plane. Yesterday, I re-read a passage by Tony Smith about why one should be interested in Clifford algebras. Tony Smith’s passage included all of the fun one can have with the complex plane and extends it to three, four, five, and more dimensions. I thought, I should segue from the complex numbers in the plane to Clifford algebras to quaternions in 3-space to Clifford algebras again in a series of posts here.

What are Complex Numbers

Say you’re playing around with polynomials. You start playing with the equation z^2 - 1 = 0. WIth a little fiddling, you find this is equivalent to z^2 = 1. Then, you take the square root of both sides to find that z = \pm \sqrt{1} = \pm 1. We started with a polynomial equation in one variable in which the highest exponent was two and we found two answers.

Pounding your chest and sounding your barbaric yawp, you move on to z^2 + 1 = 0. This should be easy, right? With the same fiddling, we find z^2 = -1 and then z = \pm \sqrt{-1}.

Uh-oh. What do we do now? We can’t think of any number that when multiplied by itself gives us a negative number. If we start with zero, we end with zero. If we multiply a positive number by itself, we get a positive number. If we multiply a negative number by itself, we get a positive number. Again!

Read the rest of this entry ⇒

l