# Maths - clifford / Geometric Algebra

This page is a copy of a paper by Dr Alfred Differ who has kindly given me permission to reproduce it here. He retains the copyright of this paper.

Introduction to Geometric Algebra (part two) Wed Sep 11th, 2002 at 07:42:23 AM EST

This article continues to introduce the reader to the basics of geometric algebra. Some problems will be provided for the reader to work on their own in order to reinforce the lessons described here. While a few of the solutions to these problems will be provided, readers are encouraged to solve them all and post their answers as comments. Familiarity with section one is strongly advised before proceeding with this section. Some familiarity with basic algebra and three dimensional geometry is useful too.

The purpose of this article is entirely educational. If the reader works to comprehend the content and also works the problems, they will come away with a basic understanding of what a geometric algebra is and how they work. Specific goals include the following.

1. The reader will know how to perform basic operations like reflection, rotation, and reversion.
2. The reader will begin to work with objects expressed in a representation-free manner.

Section 2: Reflections, Rotations, and Reversion

In this section, two basic operations will be described in some detail while a third will be described at a high level. The first two are no more important than the third, but they are more easily understood at a introductory level.

----Reflections----

Anyone who has been in front of a mirror for some time knows that mirrors flip our perception of direction by redirecting the light we use to interpret the world around us. There is an acoustic version of a mirror that redirects sound we hear misleading us into thinking the source lies in another direction from where it actually is. In a geometric sense, mirrors redirect the orientation of some geometric magnitudes without altering scale. The curved mirrors one would find in a funhouse do alter scale, so it is only flat mirrors that will be considered as the intuitional model for our reflection operation.

In order to mimic the actions of a mirror, we should construct an operation that reorients objects constructed within R(3,0). This operation enables us to translate a piece of our intuition into mathematics for later use. The reflection operator will be demonstrated with a few examples and then written in a general form.

Start with an oriented line segment for our test object and a directed plane segment with an area of one for our mirror. We know what a line's reflection in a mirror should look like, so it is the easiest place to start. In general, part of a line is perpendicular to a mirror while the other part is parallel to the surface. It is the perpendicular portion that gets reoriented by a planar mirror.

Mirror = M = M12e12 + M13e13 + M23e23 = ∑ Mijeij
where the sum counts all possible two index objects and the M's with indices are just real numbers. So M is a linear combination of basis plane segments.

Line = L = L1e1 + L2e2 + L3e3 = ∑ Lkek
where the sum counts all possible one index objects and the L's with indices are just real numbers. Our line, therefore, is a linear combination of basis line segments.

Because planes can be described in terms of the area spanned by two directed line segments, we can refer to our mirror M as a product of two perpendicular line segments. In other words, we could write M = AB where A and B are perpendicular and have unit lengths. Any pair of unit line segments work for A and B as long as they are in the M plane and perpendicular. Lets chose A to be in the same direction as the direction of the part of the line L that is parallel to the mirror plane. More descriptive names will be assigned to A and B for this case. A becomes mpar and B becomes mperp.

The reflection of the line L in the mirror M is written as follows.

L' = mpar-1 L mpar
where L' is the reflected line and mpar-1 mpar = +e

The details are best seen with a couple of examples.

Example 4: Reflect line segment ( 3 e1 + 4 e3) in the mirror described by the e12 plane (12-plane).

The line segment is in the 13-plane while the mirror is the 12-plane. This makes the first term the portion of the line that runs parallel to the mirror. Therefore we choose mpar = e1 and mpar-1 = e1 follows. (Recall that the basis line segments have positive squares.)

Our reflected line is then
L' = mpar-1 L mpar = e1 (3 e1 + 4 e3) e1 = 3 e1 - 4 e3.
Note how the part of the line perpendicular to the mirror changed signs.

Example 5: Reflect line segment ( 3 e1 - 2 e2 + 4 e3) in the mirror described by e13 - e12.

This example works out in a similar way to the previous example. The difference is that one must first figure out what to use for mpar. The mirror plane is equal parts of each of its basis planes, so the line segment will be separated in a similar way.

L = ( 3 e1 - 2 e2 + 4 e3) = ( 2 e3 - 2 e2) + ( 3 e1 + 2 e3 )

The first term is parallel to the mirror, so we will use
mpar= 1/squareroot(2) (e3 - e2) = mpar-1.

Our reflected line becomes
L' = 1/squareroot(2) (e3 - e2) ( 3 e1 - 2 e2 + 4 e3) 1/squareroot(2) (e3 - e2)
= 1/2 (e3 - e2) ( 3 e1 - 2 e2 + 4 e3) (e3 - e2)
= 1/2 (e3 - e2) [2 ( e3 - e2) + ( 3 e1 + 2 e3 )] (e3 - e2)
= ( e3 - e2)3 + 1/2 (e3 - e2) ( 3 e1 + 2 e3 ) (e3 - e2)
= 2( e3 - e2) + 1/2 ( 3 e31 - 3 e21 + 2 e33 - 2 e23 ) (e3 - e2)
= ( 2 e3 -2 e2) + 1/2 ( 3 e313 - 3 e312 - 3 e213 + 3 e212 + 2 e333 - 2 e332 - 2 e233 + 2 e232)
= ( 2 e3 -2 e2) + 1/2 ( -3 e1 - 3 e123 + 3 e123 - 3 e1 + 2 e3 - 2 e2 - 2 e2 - 2 e3)
= ( 2 e3 -2 e2) + 1/2 ( -3 e1 - 3 e1 - 2 e2 - 2 e2)
= ( 2 e3 -2 e2) - ( 3 e1 +2 e2)
(Note that the perpendicular part of L changed signs.)
= 2 e3 - 3 e1.

Specification of the mirror used in reflections is good enough to tie the operation to our intuitive understanding of how reflections are supposed to work. However, only part of the mirror was needed to describe how line segments get reflected. The part of the mirror parallel to the part of the line that is parallel to the mirror is all that was needed. The other perpendicular direction in the mirror plane was left out. This makes the reflection operation a 'bilinear' operation involving multiplication by a line segment and its inverse from both sides of the thing being reflected.

Reflection has been demonstrated in terms of line segments as test objects. Let us now look at what our reflections do to objects with different ranks.

Reflection of a scalar (multiple of e) does not alter the scalar. This is true because e commutes with all basis line segments. Since mpar is a sum of basis line segments, we know that mpar-1 commutes through the scalar and cancels against mpar.

S' = mpar-1 S mpar
= S mpar-1 mpar
= S

Reflection of a line segment has already been demonstrated. Since mpar is a sum of generators, we know that mpar-1 commutes through the parallel part of the line segment and anticommutes through the perpendicular part. In this case, Lperp is perpendicular to mpar.

L' = mpar-1 L mpar
= mpar-1 ( Lpar + Lperp ) mpar
= ( Lparmpar-1 - Lperpmpar-1 ) mpar
= ( Lpar - Lperp)

Reflection of a plane segment can be described in terms of what reflection does to the perpendicular line segments that define the plane. Since mpar is a sum of basis line segments, we know that mpar-1 anticommutes through the part of a plane containing mpar. This part will be named Bin. We also know mpar-1 commutes through planes where it is perpendicular to both of the line segments that define the orientation of the plane. This part will be named Bout.

B' = mpar-1 B mpar
= mpar-1 ( Bout + Bin ) mpar
= ( Boutmpar-1 - Binmpar-1 ) mpar
= ( Bout - Bin)

Reflection of a volume (multiple of e123) does not alter the volume. This is true because e123 commutes with all basis line segments. Since mpar is a sum of basis line segments, we know that mpar-1 commutes through the volume segment and cancels against mpar.

V' = mpar-1 V mpar
= V mpar-1 mpar
= V

Reflections on an object made up of several parts with different geometric rank can be written in terms of what the reflection operation does to each of its parts.

Q' = mpar-1 Q mpar = mpar-1 (QS + QL + QB + QV) mpar
= mpar-1 QS mpar + mpar-1QL mpar + mpar-1QB mpar + mpar-1 QV mpar

----Rotations----

Toss a ball into the air or roll it on the ground and it will usually rotate. Take a corner at high speed in your car on a slick road and you may start an unintended rotation. While many people describe these basic motions in terms of an axis of rotation, it is also acceptable to describe them in terms of the equators of some imaginary sphere where the original axis connects the sphere's poles. Rotational motion is a fundamental subject within Kinematics, so it is important that the representation of rotation operators within geometric algebras be done well.

While not everyone is aware of it, it is also possible to describe rotations as two sequential reflections. Our description of rotations will start with reflections and connect later to the equators and axes that are more commonly used.

To start off, we shall limit the test object to a line segment as we did with the discussion of reflections. This is done because most people have an intuitional understanding for how lines rotate in a three dimensional space. Also, rather than find the appropriate parallel portion of a mirror, we shall simply specify the unit line segment used as the reflection operator in each case.

To see that sequential reflections produce something equivalent to a rotation, an example will be shown.

Example 6: Reflect line segment ( e1 - e2 + 4 e3) across the line described by e1 and then again across the line described by e2.

L' = e2 e1 ( e1 - e2 + 4 e3) e1 e2
= ( e21112 - e21212 + 4 e21312)
= ( -e1 + e2 + 4 e3)

In this example, the line swung around 180 degrees in the 12-plane or around the 3-axis. The portion of the line pointing along e3 was unaltered. This is similar to a rotation and can be shown to work for a more general case involving other reflection lines.

In the general case, the two unit line segments used for reflection could be anything. If both reflection line segments are written in a representation free format as M and N, we can take advantage of example three from section one and write the result of their multiplication.

Example 7: Reflect line segment L across the line described by M and then again across the line described by N.

L' = N (M L M) N
= (N M) L (M N)
= [cos(θ) · e + sin(θ) · unit plane with N and then M] L [cos(θ) · e + sin(θ) · unit plane with M and then N]

Let B be the unit plane containing M and then N and we get the following.

= [cos(θ) · e - sin(θ) · B] L [cos(θ) · e + sin(θ) · B]

The end of example 7 shows a rotation operator in a general form. It is a sum of a scalar and a plane segment. This assignment works because the term to the left of L is the inverse of the term to the right.

R = [cos(θ) · e + sin(θ) · B] and
R-1 = [cos(θ) · e - sin(θ) · B]

So L' = R-1 L R

----Technical Note----

Some people prefer to use θ/2 in their definition for R because the net effect of the rotation operation is to rotate L through double the angle between the two reflection line segments as was shown in example six. Some people also prefer to write R in terms of an exponential function as follows.

R = exp(θ · B) = e θ · B = [cos(θ) · e + sin(θ) · B]

Both ideas are generally a good idea for formal usage but they aren't strictly needed here. Use the Taylor series expansion for the exponential function if you find this last equation hard to believe.

Another thing to note is that anyone with experience handling quaternions is probably noting that this result should be obvious. The rotation operator as we have written it is a sum of objects that are equivalent to quaternions.

With R defined now in terms of the two reflection line segments, it is important to bring our discussion back to the equators and axes most people are prepared to use when thinking about rotations. This is relatively easy to do once one sees that the plane segment B buried within R is the equatorial plane of the rotation. If B is e12, then the rotation occurs by swinging the 12-plane around and angle of twice θ. One could also look at this as a rotation around the 3-axis using an angle of twice θ. Both ideas lead to the same result. It is the unit plane segment within R that links us back to our intuitive approach to rotations. Once this link is made, one never needs to think of rotations as double reflections again since one can simply write out R the next time a rotation is needed.

----And now reversion----

Reversion is the last operation that will be mentioned at the introductory level. It is actually quite important for later, more advanced discussions, but it won't appear that way here. As long as a student knows what it is and how to do it, that will be enough for now.

Reversion is the operation that helps correct our tendency to write mathematical equations with the left-right reading bias present in many spoken languages. The best way to describe reversion, though, is to show what it does in terms of a couple rules and then demonstrate with a couple of examples.

1. Reversion changes the multiplication order of all basis line segments by simply writing them in the opposite order. AB becomes BA if A and B are line segments.
2. Had we been using complex numbers as our numbers instead of real numbers, reversion would turn them into their complex conjugates. We aren't using complex numbers in R(3,0), though, so this rule doesn't come into play.

----Technical Note----

The actual rules that define reversion vary a little from one algebra to another. Whether the generators have positive or negative squares does matter. The actual technique requires that one find the main automorphism of the algebra. The rules listed above work for R(3,0).

Example 8: Apply reversion to M = (3e + 7e2 - 6e13 + e123)

~M = rule1(M)
= 3e + 7e2 - 6e31 + e321
= 3e + 7e2 + 6e13 - e123

Note that terms with rank two or three are altered by reversion. Terms with rank zero or one are not altered.

Example 9: Apply reversion to the product MN = (3e + 7e2) (6e13 + e123)

Solution 1: The first thing to do is multiply the two objects and then apply the lesson we learned in the last example.

MN = (3e + 7e2) (6e13 + e123)
= (18e13 + 42e213 + 3e123 + 7e2123)
= (11e13 - 39e123)

So reversion(MN) = (-11e13 + 39e123)

Solution 2: The other way to try this is to apply reversion before multiplying the terms.

reversion(MN) = reversion(N) reversion(M) = (-6e13 - e123) (3e + 7e2)
= (-18e13 - 3e123 - 42e132 - 7e1232)
= (-11e13 + 39e123)

Note that the reversion operation applied to several objects can be 'distributed' if their product order is reversed. This rule works in general.

One of the more important uses for the reversion operation is for finding the 'length' or 'norm' of an object in the algebra. Other powerful uses involve tricks for finding continuity equations and solving for objects in equations where inverses are hard to find. Only the norm will be discussed here, though.

Imagine starting with a line segment (3e1 + 4e2). A useful question to ask is 'How long is it?' One way to do this is to pluck the coefficients out and use the Pythagoras formula for distances. The other way is to simply multiply the object by itself and examine the result. The second method works fine until the object in question is multi-ranked. The first method is a manual recipe and more automated process for finding the norm is useful. Enter the reversion operation and another example.

Example 10: Multiply the following objects on the left with their reversions. (3e1 + 4e1) and (3e1 + 4e12)

For the first object we have
~M M = (3e1 + 4e1)(3e1 + 4e1)
= (9e+ 16e) + (12e12 + 12e21)
= 25e
This is the square of the length as it would typically be defined.

For the second object we have
~N N = (3e1 - 4e12)(3e1 + 4e12)
= (9e - 16e1212) + (12e112 - 12e121)
= (9e + 16e) + (12e2 + 12e2)
= 25e + 24e2
The scalar part of this result is the same as the scalar part of the first result. It is the scalar part of the product that contains the information about the norm.

In the last example, we would have returned a completely different result for the length of the mixed rank object if we had just squared it. The result would have been (-7e) which would make for a very strange square of the length. Our recipe of multiplying on the left by the object after a reversion operation has been applied delivers the squared length we would expect, but it is buried in the scalar part of the result. Ignore the non-scalar parts and we have a better recipe for finding the norm of any object in the algebra.

Summary

In this section, the basic operations for reflection, rotation and reversion were described and demonstrated with examples. Reflections were shown as two sided multiplications involving a line segment and its inverse. Rotations were shown to be sequential reflections or as two sided products involving the sum of a scalar and plane segment along with the inverse of the sum. Finally, reversion was demonstrated as a rule list that enabled a recipe for finding the norm of any object in the algebra.

With a bit of experience with these three operations, a student will have enough of the tools they need to begin using geometric algebras to represent physical objects. Properties and property currents form the foundations of physical theories, so experience with geometric objects and the tools used to manipulate them are necessary before traveling further into the physics we can express using geometric algebras.

----Problems for Section 2----

6: Reflect the line segment (2e1 - e2 + 3e3 ) with the mirror described by ( e12 + e13 + e23 )

7: Rotate the line segment (2e1 - e2 - 3e3 ) around the 1-axis a total of 60 degrees.

8: Rotate the line segment (2e1 - e2 ) a total of 120 degrees around an axis defined by e1 + e3.

9: Find the norm of (5e12 + 12 e23).

10: Find the norm of 1/2(e + e3).

 Solutions by adiffer on Wed Sep 18th, 2002 at 06:40:37 PM EST
 6: Reflect the line segment (2e1 - e2 + 3e3 ) with the mirror described by ( e12 + e13 + e23 ) Hint: Find a line segment perpendicular to the mirror. It helps split the mirror into its parts, at least in my opinion. 7: Rotate the line segment (2e1 - e2 - 3e3 ) around the 1-axis a total of 60 degrees. A rotation around the 1-axis is a rotation in the 23-plane. So B in our rotation operation will be e23. R = cos (30) e + sin(30) e23 and R-1 = cos (30) e - sin(30) e23 Then L' = R-1 L R = (cos (30) e - sin(30) e23) (2e1 - e2 - 3e3 ) (cos (30) e + sin(30) = [(cos (30) e - sin(30) e23) 2e1 (cos (30) e + sin(30) e23)] - [(cos (30) e - sin(30) e23)e2(cos (30) e + sin(30) e23)] - [(cos (30) e - sin(30) e23) 3e3 (cos (30) e + sin(30) e23)] = [ 2e1(cos (30) e - sin(30) e23) (cos (30) e + sin(30) e23)] - [e2(cos (30) e + sin(30) e23)(cos (30) e + sin(30) e23)] - [ 3e3(cos (30) e + sin(30) e23) (cos (30) e + sin(30) e23)] = 2e1(cos2 (30) e - sin2(30) e2323) - (e2 + 3e3) (cos2(30) e + sin2(30) e2323 + 2cos(30)sin(30)e23) = 2e1(cos2 (30) e + sin2(30) e) - (e2 + 3e3) (cos2(30) e - sin2(30) e + sin(60)e23) = 2e1 - (e2 + 3e3) ((cos2(30) - sin2(30)) e + sin(60)e23) = 2e1 - (e2 + 3e3) (cos(60) e + sin(60)e23) = 2e1 - (cos(60)e2 + 3cos(60)e3+sin(60)e223 + 3sin(60)e323) = 2e1 - (cos(60)e2 +sin(60)e3) - 3(cos(60)e3 - sin(60)e2) 8: Rotate the line segment (2e1 - e2 ) a total of 120 degrees around an axis defined by e1 + e3. Hint: Figure out which plane segment gets used as B and then find the part of the line segment that is in that plane. 9: Find the norm of (5e12 + 12 e23). ~(5e12 + 12 e23) (5e12 + 12 e23) = (-5e12 - 12 e23) (5e12 + 12 e23) = -25e1212 - 60 e2312 -60e1223 - 144 e2323 = 25e + 60 e13 -60e13 + 144 e = 169e So the norm is 13. 10: Find the norm of 1/2(e + e3). ~1/2(e + e3) 1/2(e + e3) =1/2(e + e3) 1/2(e + e3) =1/4(e + e3 + e3 + e33 ) =1/4(2e +2 e3 ) =1/2(e + e3 ) The coefficient of the scalar part is the square of the norm, so the norm is the square root of 0.5. -Dream Big. --Grow Up.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.      Clifford Algebra to Geometric Calculus: A Unified Language for Mathematics and Physics (Fundamental Theories of Physics). This book is intended for mathematicians and physicists rather than programmers, it is very theoretical. It covers the algebra and calculus of multivectors of any dimension and is not specific to 3D modelling.      New Foundations for Classical Mechanics (Fundamental Theories of Physics). This is very good on the geometric interpretation of this algebra. It has lots of insights into the mechanics of solid bodies. I still cant work out if the position, velocity, etc. of solid bodies can be represented by a 3D multivector or if 4 or 5D multivectors are required to represent translation and rotation.

Other Math Books