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 ⇒

Still No Word On The Clifford Algebra Text May 29th, 2009
Patrick Stein

I still haven’t heard back from Cambridge University Press about using one of their books to publicly study Clifford algebras. So, I started looking around for alternate texts.

My second choice book is Clifford Algebras and Spinors by Pertti Lounesto. This, too, is published by Cambridge University Press. Feh.

I started poking around for other topics instead. How about a related topic? I grabbed Differential Forms and Connections by R.W.R. Darling from my shelf. It, too, is Cambridge University Press.

Alright, different topic. How about Galios theory? I grabbed A Course In Galois Theory by D.J.H. Garling from my shelf. It is Cambridge University Press. The other two Galois theory books that I have are not from Cambridge University Press, but I’m not sure they are as useful.

I can’t find any good Clifford algebra texts that are not Cambridge University Press. This Geometry of Differential Forms by Shigeyuki Morita is published by the AMS. It looks decent from a quick glance on Google books.

Any suggestions?

Lisp Patterns Question W.R.T. Clifford Algebras May 20th, 2009
Patrick Stein

Since I moved my website to WordPress, I have been watching what search-engine searches land people on my page.

Sadly, two of the things that get people to my page most often still have not been moved over to the new site from the old. One of those things is a C++ template library for Clifford algebras. I am going to move that stuff over this week, I promise. But, I thought I might also make a Lisp library for Clifford algebras, too.

An example Clifford algebra might be C_{3,0}. A generic element in this algebra is of the form:

a_0 + a_1 e_1 + a_2 e_2 + a_3 e_3 + a_{1,2} e_{1,2} + a_{1,3} e_{1,3} + a_{2,3} e_{2,3} + a_{1,2,3} e_{1,2,3}

where the a_* are coefficients. For ease in dealing with these items, I will probably store that in a vector that looks something like this:
#(a_0 #(a_1 a_2 a_3) #(a_{1,2} a_{1,3} a_{2,3}) a_{1,2,3})

If you want a simple element though (where most of the coefficients are zero), you shouldn’t have to stare down all of that stuff or remember that a_{1,3} comes before a_{2,3}. I want you to be able to make 3 + 4 e_1 + 5 e_{1,2,3} more simply. Something like one of the following:

(defvar *a* (ca-element '(3 (4 1) (5 1 2 3)) :p 3))
(defvar *a* (ca-element '(3 (4 . :e1) (5 . :e1-2-3)) :p 3))
(defvar *a* (ca-element :s 3 :e1 4 :e1-2-3 5 :p 3))

Similarly, I will define something akin to (aref …) so that one can check or change a_{1,2} like one of the following:

(caref *a* 1 2)
(caref *a* :e1-2)

By analogy with the complex numbers, I should instead have:

(e1-2 *a*)

But, that just doesn’t scale very well.

I am leaning toward using a list of numbers to tell which a_* is being referenced. This would allow greater flexibility in other functions. But, it’s also less mathy.

Does anyone have any suggestions? Should I really be supporting both? Through the same function names or through (caref …) and (caref* …) or something?

Clifford Algebras for the Non-Mathie May 17th, 2009
Patrick Stein

I was at a party last night. I mentioned to someone that I was a math geek.

She asked, What kind of math are you into now?

I said, I really want to learn about Clifford Algebras.

She replied, What are they like?

Me, I did the deer in headlights thing. I had no idea of her math level. I had my doubts that she’d ever done Calculus. I would guess that the quadratic equation was the defining aspect of what she thought of as Algebra. I didn’t know where to start.

In thinking back now, I could have at least said something constructive.

What I Could Have Said

So, the algebra you learned about in high school was just the tip of a huge body of mathematics. If you take away the idea that you have to plug a number in for x and just look at the what you can do with the x‘s still in there, there is a whole structure going on. At more advanced levels, mathematicians work with those structures and other structures like them.

Do you know what a vector is? One of the easiest ways to think about it is this. Suppose you’ve got a number on the number line. You can kinda think of that number as a one-dimensional vector. It tells you which direction to go (positive or negative) from zero and how far to go. Now, if you take something with more dimensions than a line, like a a two-dimensional surface or three-dimensional space, you can still have the idea of what direction to go from zero and how far to go. You just have to broaden your idea of which direction to go.

So, the algebra that you did through high school is all centered on having x represent a number (a one-dimensional vector). But, things get a lot hairier if you let x represent a three-dimensional or an eight-dimensional vector. People generally agree about how to add vectors. Now, you’ve got to pick some way to multiply two vectors together.

Clifford Algebras are one system for multiplying vectors together.

If No One is Hyperventilating, Continue…

You can multiply a number by a vector to get another vector. You can also multiply a vector by a vector to get a bivector. You can multiply a vector by a bivector to get a trivector. Etc. Actually, the etc. is misleading there. It doesn’t go on forever. With Clifford Algebras, you have to pick how many dimensions your vector has. You can’t multiply a three-dimensional vector by a four-dimensional vector.

Plus, if you started with a two-dimensional vector, then bivectors are as big as you get. If you multiply a two-dimensional bivector by a two-dimensional vector, you get a two-dimensional vector. If you multiply a two-dimensional bivector by another two-dimensional bivector, you just get a number.

But, all of this is probably more than you wanted to know…. at a party….

l