Maths - Clifford / Geometric Algebra

Types of Clifford Algebra

This section introduces whole classes of algebras that can be defined in multiple dimensions. We will call an element in this algebra a multivector. These algebras have different types of multiplication that can be applied to a given multivector.

These classes of algebras are summarised in the following table.

Type Metric Description
Grassmann
Algebra
  This introduces a new vector multiplication (exterior product) denoted by '/\' which anticommutes and quantities square to zero. This creates a graded structure from the bases to create higher order bases. So in addition to the dimension of the underlying vector algebra the algebra also has a 'rank' which is the maximum size of these higher order bases. This Grassmann algebra provides a framework for Clifford algebra.
Orthogonal inner and
Clifford
products.
orthogonal space

In addition to the exterior product from Grassmann product we add a inner product (which may be denoted '•' or '\/' to denote a duality with the exterior product) where unit quantities square to +1 or -1. The Clifford product can then be defined from a combination of exterior and inner products. There are also other flavors of the inner product such as the left '|_' or right '_|' contraction products.

This form of Clifford product contains algebras such as complex numbers and quaternions.

This can be applied to rotation in 'n' dimensional Euclidean space or in spaces such as Minkowski where some dimensions square to -ve.

Quadratic
Form
quadratic

In addition to allowing dimensions to square to +ve or -ve we now allow these dimensions to be rotated. For example at some point between squaring to +ve and -ve there will be a case where the dimension squares to zero.

This is is useful geometrically because it allows us to combine rotations and translations and into a single transform using this form of the Clifford multiplication. There are a number of spaces such as projective and conformal space which allow us to do this. This is the main application of Clifford algebra on this site.

Bilinear
Form
bilinear This makes the inner product even more general and so it is not constrained to be a quadratic form but can be any bilinear form. Analysis of this case can be found in papers by Rafal Ablamowicz and Bertfried Fauser.

Geometric Algebra (GA)

We will start with Geometric Algebra (GA).

Its always difficult to learn a new type of algebra, at first it feels like learning a lot of arbitrary rules and its only when this hard work is done that the relationship to other algebras becomes apparent. I think the effort in learning Geometric Algebra (GA) could be worthwhile both, because of the way that it generalises both vector algebra and quaternions, also in terms of the subject matter of this site because of the potential to provide more powerful tools for working out solid body mechanics problems.

There are a number of different ways to think about this algebra, different people might react differently to the ways to describe Geometric Algebra (GA), an approach that may not help one person may just help the whole thing 'click' with another person. I have therefore included pages to describe the following approaches:

Geometric Algebra is as an extension of Vector Algebra

When we discussed vector algebra we had two types of multiplication:

Having two types of multiplication which give outputs that are not vectors is not altogether satisfactory. these operations are useful in that they have lots of practical applications. However, in mathematical terms, it would be better if we had a vector algebra that was 'closed' that is the outputs of the operations have the same form as the inputs.

This is not possible for vector algebra but it is possible if our elements are a superset of scalars, vectors, bivectors and higher order components. We can then define a general multiplication which is a combination of cross and dot multiplication.

As a first stage imagine a 3D vector as a linear sum of base vectors e1, e2 and e3.

v = a1 e1 + a2 e2 + a3 e3

where:

Now we could extend this to made a new type of quantity

m = a0 + a1 e1 + a2 e2 + a3 e3

where:

This means that the dot, cross and scalar products mentioned above now have both inputs and output as members of this new type of extended vector. However the operations are still not general in that these operations only apply to a subset of the multivectors.

We will now define a new type of product, which is more general, it is called the outer product and it is denoted by '/\'. This type of multiplication has similar properties to the vector cross product but it applies to any number of dimensions. When we use it to multiply a vector, say e1, by a different vector, say e2, then this generates a new type e1/\e2 which can't be further simplified. If we then multiply by another vector, say e3, then this will produce yet a further new type e1/\e2/\e3 and so on.

At first sight it would seem that this will potentially produce an infinite number of types, but that is not so, an algebra based on vectors of dimension 'n' will generate 2n scalar elements in a multivector (including the scalar and the original vector). The reason that the number of types does not keep growing is that the above rules only apply if the vectors are different, if we multiply the vector by itself the result is zero so: e1/\e1 = 0. This type of algebra, where a quantity is not zero, but squaring it makes it zero is known as a grassmann algebra. If we have an element, say e1/\e2, and we multiply it by an element that is already included in the first, say e2, then these two e2s will cancel out and we will be left with e1. If the duplicate terms are not adjacent then there may be a sign change (+ to - or - to +) because the '/\' operator is antisymmetric.

So the quantities in this algebra consist of 2n scalar values (some of which may be zero and therefore not written) .In the same way that vector algebra may be different depending on the dimension of the vectors, geometric algebra depends on the dimension of the vectors contained in it. The elements (equivalents to numbers - i.e. the object we are manipulating) in geometric algebra are known as multivectors (or alternatively monads). in other words:

These multivectors are made up of blades and each blade has a grade as well as a dimension.

When blades of different grade are added the result cannot be simplified further and the multivector is just the sum of these with the '+' sign left in. This is the same principle as the notation for complex numbers or quaternions which might be denoted by say the number 2+i3 which cannot be further simplified.

Hopefully this will become clearer later when we derive multivectors from different dimension vectors.

Perhaps we can start here with three dimensional vector algebra, the rules are changed slightly, in a way that generalises the result.

We replace the dot, cross and scalar products of vector algebra with the following operations for geometric algebra:

The small change in the rules is that the outer product of two vectors results in a new entity called a bivector, there may also be tri-vectors and so on. depending on the dimension of the vectors. Multiplying by a vector using the outer product increases the grade of the result by 1, multiplying by a vector using the inner product decreases the grade of the result by 1, so these operations have a nice symmetry.

The outer product is denoted by /\ When two independent base vectors are outer multiplied, for instance e1/\ e2, we cant further simplify the result so we just leave the result as: e1/\ e2.

Note: in Hestenes the base vectors are denoted by sigma (σ12, etc.) but these are a bit more difficult to write in web pages and programming languages so I am using e1, e2, etc. to denote base vectors.

In the general case a multivector may contain all possible combinations (not permutations) of the base vectors. In other words we only need to include e1/\ e2 or e2/\ e1 but not both. This is because the /\ operator anti-commutes (e1/\ e2 = - e2/\ e1) so if we choose e1/\ e2 as the bivector then if we have any e2/\ e1 terms we can use minus the e1/\ e2 term instead . Also we don't have any terms occurring more than once. If a term such as e1/\ e1 occurs then this can be replaced by a scalar value, this is because e1/\ e1 = 1 or -1 depending on how it is defined. By the anti-commute rule then e1/\ e1 = - e1/\ e1 which would only be true if e1/\ e1=0 but this can give the desired result as explained here.

Geometric Product

The outer product gives zero if there are two, or more, of any particular base, for instance,

(e2/\e1)/\e1=0

The geometric product does not produce zero unless the operands are zero, for instance,

(e2/\e1)*e1=e2

So this geometric product has properties much more like other algebras and it can generate algebras which are equivalent to complex numbers, quaternions, etc.

When we are working with vectors the geometric product is a sum of the inner and outer products:

e1*e2 = e1/\e2 + e1•e2

Does this work with general multivectors x and y:

x*y = x/\y + x•y

This does not necessarily work for all multivectors, although it seems to work for a bivector times a vector:

(e2/\e1)*e2 = (e2/\e1)/\e2 + (e2/\e1)•e2 = 0-e1= -e1

So this seems to work provided that (e1/\e2).e2 = e1/\(e2.e2) ? It would be good to define when this holds, obviously it depends what type of inner product we use. I would like to understand more about the rules for inner and outer products.

So with the geometric product, if the same base occurs on both sides of the product it cancels out to '1' so:

e1*e1=1

but there may be a sign change, the rules for calculating the sign are explained on this page.

Choice of bases

If we want to have a standardised representation of multivectors then we need to choose:

Possible options for factor ordering are:

where:

Textbooks (such as Hestenes) choose pseudoscalar 'I' such that it has the orientation specified by a right-handed set of vectors in 3D. The dual function alone does not define the factor ordering, we can still swap factors and invert the sign. We need to use the determinant as explained here.

Possible options for element ordering are:

The advantage of bitwise ordering is that a grade 3 multivector is just an extension of a grade 2 multivector and so on.

Geometric Algebra of 2 Dimensional Vectors

For example, say we are working with 2 dimensional vectors, so any vector can be defined by a linear sum of two basis vectors e1 and e2. So, using this new rule, if we multiply out all combinations of these basis vectors we get 4 elements (e, e1, e2and e1/\e2) as follows: clifford 2d

Here we have chosen e1/\ e2 as the bivector, as explained above, we don't need e2/\ e1, e1/\ e1 or e2/\ e2 permutations because if such terms occur in a calculation they can be rewritten in terms of the other combinations.

basis grade
e scalar
e1,e2 vector
e1/\e2 bivector (in this case a scalar value)

We can define a general 'number' in this algebra as a linear sum of these basis:

a + b e1 + c e2+ d e1/\e2

We will call this 'number' a multivector, and for 2D vectors is is defined by the 4 scalar values here denoted by a,b,c and d.

2D multivector algebra is further developed here.

Geometric Algebra of 3 Dimensional Vectors

For 3 dimensions we can do the same thing, this time the results can be generated by 3 basis vectors, e1, e2and e3. Now multiplying out gives the following combinations: 3d clifford

This can lead to quantities that are quite tedious to write out therefore, in some cases, I will use the following abbreviations to make them easier to read and write:

grade base value numerical value
full
shortened
0=unit scalar 1 e
1=unit length base vectors e1 e1
e2 e2
e3 e3
2=unit length base bivectors e1/\ e2 e12 e12
e3/\ e1 e31 e31
e2/\ e3 e23 e23
3=unit length base tri-vector e1/\ e2/\ e3 e123 e123

In the above table the base values are all unit length, they are like the 'i' operator in complex numbers or quaternions, these base values can then be multiplied by the numerical value which gives the actual value. Therefore any 3D multivector can be specified with these 8 numerical values which are just real (scalar) numbers.

In the case of 3D vectors the base values e1, e2and e3 could be thought of as unit vectors in the x,y and z direction. We could have used the notation ex, ey and ez but this might not fit so well when we work with higher dimensions. For this geometrical interpretation e1, e2and e3 could be any 3, mutually perpendicular, unit length vectors. In fact they don't have to be mutually perpendicular provided they are not all in one plane.

There are 3 combinations of outer products which cant be further reduced: e1/\ e2, e3/\ e1 and e2/\ e3 , we could have chosen other combinations as base values but these are consistent and make the multiplication tables, below, more symmetrical. We can think of these as unit length base bivectors.

The order, starting at the scalar at the top down to the tri-vector at the bottom, also keeps the tables as symmetrical as possible, if we start from the top we are adding e1, e2and e3 if we start from the bottom we are removing e1, e2, e3 and this is important as explained in further pages.

So, using this notation, the general case of a 3D multivector is written:

e + e1 e1 + e2 e2 + e3 e3 + e12 e12 + e31 e31 + e23 e23 + e123 e123

This is similar to a complex number a + i b where:

The multivector just has more parts to it.

In this case the bivector is 3D the same number of dimensions as the vector, the bivector has the same properties as the vector except that a•a is a negative number for bivectors but it is a positive number for vectors (we will discuss multiplication rules later).

In this case the tri-vector has 1 dimension as for the scalar.

So in this case the multivector is made up of 8 scalar values.

3D multivector algebra is further developed here.

Geometric Algebra of 4 Dimensional Vectors

For 4 dimensions can be generated by 4 basis vectors, e1, e2, e3 and e3 

clifford 4d

grade base value numerical value
full
shortened
0=unit scalar 1 e
1=unit length base vectors e1 e1
e2 e2
e3 e3
e4 e4
2=unit length base bivectors e1/\ e2 e12 e12
e3/\ e1 e31 e31
e2/\ e3 e23 e23
e1/\ e4 e14 e14
e4/\ e2 e42 e42
e3/\ e4 e34 e34
3=unit length base tri-vector e1/\ e2/\ e3 e123 e123
e2/\ e1/\ e4 e214 e214
e1/\ e4/\ e3 e143 e143
e2/\ e3/\ e4 e234 e234
4=unit length base tri-vector e1/\ e2/\ e3/\ e4 e1234 e1234

So in this case the number of dimensions is:

In this case the number of scalar values in the multivector is 16 = (1+4+6+4+1)

4D multivector algebra is further developed here.

Other Dimensional Vectors

We could go on, whenever we increase the dimension of the vector it will increase the size and number of these types generated, known as blades. It is always in this symmetrical pattern, starting at 1 for the scalar value, rising to the maximum value for the middle blade, the same dimensions occur on the other side going down to 1 for the highest blade. This symmetry occurs because we could determine the dimensions it the reverse order by starting at the top by including all the basis vectors, and then reversing by choosing which basis vectors to leave out rather than choosing which to include.

5D multivector algebra is further developed here.

Addition Rules

We just add corresponding terms. When adding blades of different grade then we cant reduce it further and we leave the + in the number.

For example:

3 + 4 e1 + 5 e23

added to

5 + 4 e1 + 3 e23

gives

8 + 8 e1 + 8 e23

Multiplication Rules

As an example, we will use 3D vectors:

The main type of multiplication, which is described here, is geometric multiplication. This is the sum of the inner and outer products, as described here.

So if we have a general case of a 3D multivector:

a.e + a.e1 e1 + a.e2 e2 + a.e3 e3 + a.e12 e1/\ e2 + a.e31 e3/\ e1 + a.e23 e2/\ e3 + a.e123 e1/\ e2/\ e3

and a second multivector:

b.e + b.e1 e1 + b.e2 e2 + b.e3 e3 + b.e12 e1/\ e2 + b.e31 e3/\ e1 + b.e23 e2/\ e3 + b.e123 e1/\ e2/\ e3

Since * is distributive over + we can multiply out the terms:

(a.e + a.e1 e1 + a.e2 e2 + a.e3 e3 + a.e12 e1/\ e2 + a.e31 e3/\ e1 + a.e23 e2/\ e3 + a.e123 e1/\ e2/\ e3) * (b.e + b.e1 e1 + b.e2 e2 + b.e3 e3 + b.e12 e1/\ e2 + b.e31 e3/\ e1 + b.e23 e2/\ e3 + b.e123 e1/\ e2/\ e3)

Each term can be calculated as follows, for example when working out the 5th term in the first multivector a.e12 e1/\ e2 multiplied by the 6th term in the second multivector b.e31 e3/\ e1 we get the magnitude a.e12*b.e31 and the type e1/\ e2 * e3/\ e1 which can be calculated as follows:

The type of each term can be calculated by following these rules:

  1. Write down the indices of both terms, the indices of the left hand multiplicand followed immediately by the indices of the right hand multiplicand without a space. If either of the terms is negative then put a negative sign in front, if both terms are negative then the composite is positive.
  2. If this contains any duplicate numbers, then swap any two numbers to make the duplicate numbers adjacent, every swap inverts the sign.
  3. Adjacent duplicate numbers can then be removed, if the dimention squares to negative then invert, if the dimention squares to zero then zero the whole term, repeat step 2 until all duplicate terms are removed.
  4. If the remaining numbers are not in the same order as the base values then swap any two numbers, as before every swap inverts the sign.
  5. If there are no numbers left the result is e (or -e if negative).

As an example, using 3D vectors, we can use the above rules to calculate a table showing all possible combinations:

The result for 3D multivectors is calculated here.

In the same way we can derive results for here for 2D multivectors and here for 4D multivectors

Inner and Outer products

trasitions

In addition to the geometric product there are two more types of multiplication used in Geometric Algebra. These extend and generalise the 'dot' and 'cross' products used in 3D vector algebra.

Inner product by a vector reduces the grade of a multivector. It is related to the dot product.

Outer product by a vector increases the grade of a multivector. It is related to the cross product.

The topic of Inner and Outer products is developed here.

Representing Transforms

One way to use multivectors is to represent transforms, to do this we need to show how to use it to map one point (vector) onto another point (vector), this table shows different ways to

Translation type possible representation how to transform point
translation vector p + t
orthogonal (rotation)

quaternion

3*3 matrix

q p q'

[m]v

isometries (rotation + translation) multivector A p A -1
linear (rotation, translation, scale (different for each dimension), reflection, shear, etc.) 4*4 matrix [m]v

The various types of transformation are described on this page.

So in the case of multivectors we are proposing to translate the vector pin into the vector pout by using the equation:

pout = A pin A -1

where:

Not every multivector has an inverse so, in order for this to work, we need to work with a subset of A that A -1 always exists (and solid body movement will always have an inverse). One condition that will ensure that an inverse always has an inverse is:

A A†= 1

where:

This is similar to unit length quaternions, where q conj(q) = 1 or orthogonal matrices where [m][m]t = 1

Another requirement is that if p is a vector then A p A -1 will also be a vector.

Are these two requirements related? Can we use this identity to relate them:

(A B)† = B† A†

Representing 3D solid bodies

So a geometric algebra, based on three dimensional vectors, has multivectors which have 8 scalar values (1 scalar, 3 vector, 3 bivector, 1 tri-vector). This would appear ideal for representing 3D solid bodies which have 6 degrees of freedom (3 for translation, 3 for orientation). Unfortunately however, the arithmetic of 3d multivectors can't be used to represent isometries (transforms representing translation and rotation). I guess that we could invent new operations to represent isometries with 3d multivectors but this would loose the properties described on this page. In order to represent 3D solid bodies using geometric algebra we need to use 4D multivectors as will be described on further pages. This means that we need 16 scalar variables to represent isometries, the same as a 4x4 matrix, which can also represent isometries and most people find matrices easier to understand.

We can represent 2D rotations and translations using the G 0,1,1 algebra (which is equivelent to dual complex numbers) explaind on this page.

We can represent 3D rotations and translations using the G+ 3,0,1 algebra (which is equivelent to dual quaternions) explaind on this page.

Perhaps a taste of the power of geometric algebra in this area can be found when we include the time variable as the scalar variable, this fits very well as the space we experience has 3 dimensions of distance and one dimension of time, using this we can derive the constants including energy and momentum, in one equation, as shown here.

sfmulti3d

On these pages will be developing a class sfmulti3d (full listing here) which holds a rotation and encapsulates operations such as combining two rotations, in addition to coding the rotation as a quaternion it can also be coded as euler or axis angle and can convert between these formats.

index

 


Further Reading

You may be interested in other means to represent orientation and rotational quantities such as:

Or you may be interested in how these quantities are used to simulate physical objects:


metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

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.

flag flag flag flag flag flag 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.

 

flag flag flag flag flag flag 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

Terminology and Notation

Specific to this page here:

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.