Lecture 1: Basics of Geometric Algebra
Joan Lasenby
[with thanks to: Chris Doran & Anthony Lasenby (book), Hugo
Hadfield & Eivind Eide (code), Leo Dorst (book)........ and of
course, David Hestenes]
Signal Processing Group, Engineering Department, Cambridge, UK
and
Trinity College, Cambridge
[email protected], www-sigproc.eng.cam.ac.uk/ ∼ jl
July 2018
1 / 41
Contents: GA Course I, Session 1
The geometric product: and how it relates to the inner and
outer products.
The mathematical framework: versors and multivectors;
reversion; inversion; reflections and rotations .
Rotations in more detail – the GA concept of a rotor.
Reciprocal frames and how they are used.
The contents follow the notation and ordering of Geometric
Algebra for Physicists [ C.J.L. Doran and A.N. Lasenby ] and the
corresponding course the book was based on.
2 / 41
Notation
We will see, as the course goes on, that we will be dealing
with many sorts of geometric objects, not just scalars and
vectors.
Therefore, we will not, in general, use bold for vectors or
any other objects (though sometimes there are exceptions).
Use lower case roman letters for vectors, and generally
lower case greek letters for scalars.
3 / 41
The Inner Product
To start with, let us assume a Euclidean space (all basis vectors
square to +1). The inner or dot product between two vectors a
and b is written as a · b. If a, b 6= 0
a · a = a2 > 0 and b · b = b2 > 0
....the inner product can then be used to define the angle (θ)
between a and b:
a · b = |a||b| cos θ
In any space, we define an inner product via its basis vectors
(for now assume they are orthogonal)
a · b = ai bi
[repeated indices mean sum: ∑i in this case] 4 / 41
The Cross Product
For two vectors a and b the cross product of the two is written
as a × b and only exists in 3-d space.
a × b = |a||b| sin θ n̂
where n̂ is a unit vector perpendicular to the plane containing a
and b.
For a right handed orthonormal set of basis vectors {e1 , e2 , e3 },
we have
e3 = e1 × e2 , e2 = e3 × e1 , e1 = e2 × e3
5 / 41
The Exterior, Outer or Wedge Product
The cross product fails in higher dimensions as there is no
longer the concept of a unique vector perpendicular to the
plane. It therefore seems sensible to geometrically encode the
plane itself.
We write the wedge product between two vectors a and b as
a∧b
......an oriented plane – we call this a bivector
6 / 41
Properties of the Wedge Product
a ∧ b = −b ∧ a, so the product is antisymmetric.
a ∧ a = 0 as there is no plane swept out.
The wedge product is distributive over addition
a ∧(b + c) = a ∧ b + a ∧ c
We will see how the wedge and cross products are connected
(in 3d) later.
7 / 41
The Geometric Product
Clifford’s amazing idea was to combine the inner and outer
product into a new geometric product. For two vectors a and b,
we write the geometric product as ab
ab = a · b + a ∧ b
...the sum of a scalar and a bivector.
The geometric product is non-commutative since
ba = b · a + b ∧ a ≡ a · b − a ∧ b
...recall, complex numbers also involve the addition of two
fundamentally different quantities.
8 / 41
Inner and Outer Products from the Geometric Product
Since ab = a · b + a ∧ b and ba = a · b − a ∧ b, we can write
1
a·b = (ab + ba) {symmetric}
2
and
1
a∧b = (ab − ba) {antisymmetric}
2
In an axiomatic approach to GA, we can start with the
geometric product and define the inner and outer products
from this.
9 / 41
The Geometric Product is Invertible
Suppose we are given c = a · b. If we are then given a, we cannot
recover b uniquely.
Similarly, suppose we are given c = a ∧ b. If we are then given a,
we cannot recover b uniquely.
However, suppose we are given c = ab. If we are then given a,
we can recover b uniquely:
1
b= ac
a2
This invertibility is the key to much of the power of GA.
10 / 41
Higher Order Objects
In 2d, the highest order element we can have is a plane [or
bivector].
In 3d, imagine sweeping a bivector b ∧ c along a vector a to form
a volume, a ∧(b ∧ c)
..the same as sweeping bivector a ∧ b along the vector c
Thus the volume or trivector formed is
a ∧ b ∧ c = (a ∧ b)∧ c = a ∧(b ∧ c)
11 / 41
An Algebra of Geometric Objects
In an n-d space, we therefore have scalars, vectors, bivectors,
trivectors,....., n-vectors.
A general linear combination of these objects is called a
multivector:
M = hMi0 + hMi1 + hMi2 + .....hMin
where we use the notation hMir to mean the r-vector part of the
multivector M.
A product of vectors is called a versor:
a1 a2 a3 . . . am
The highest grade object in a space, the n-vector, is unique up
to scale - the ‘unit’ n-vector is called the Pseudoscalar and
written as In .
12 / 41
Manipulating Multivectors
We can add, subtract and multiply multivectors using the
geometric product.
Before we look more at this, we need to distinguish between an
r-vector and an r-blade.
An r-blade, which we will call Ar , is something which can be
written as the wedge product of r vectors:
Ar = a1 ∧ a2 ∧ . . . ∧ ar
An r-vector, which we will call Mr , is something which can be
written as a linear combination of r blades:
Mr = α1 A1r + α2 A2r + . . . + αm Amr
13 / 41
Multiplying Multivectors
The geometric product is distributive over addition, so we can
reduce the product of two multivectors to a sum of the
products of blades, e.g.
P = a + (b ∧ c) Q = d + (e ∧ f )
P Q = ad + a(e ∧ f ) + (b ∧ c)d + (b ∧ c)(e ∧ f )
..note the order matters due to the non-commutativity.
Therefore, if we understand how to multiply blades, we can
multiply multivectors.
14 / 41
The Geometric Algebra of 2d Euclidean Space
Consider a plane spanned by 2 orthonormal vectors e1 , e2 , such
that
e1 2 = e2 2 = 1 and e1 · e2 = 0
The pseudoscalar in this 2d al-
gebra is the bivector e1 ∧e2 – it is
a directed ‘volume’ element.
We call this full algebra G2 (sometimes written as G(2,0,0) ); it has
22 = 4 elements:
1 {e1 , e2 } e1 ∧ e2
1 scalar 2 vectors 1 bivector
15 / 41
The Geometric Algebra of 2d Euclidean Space cont....
Note that, as e1 · e2 = 0:
e1 e2 = e1 · e2 + e1 ∧ e2 = e1 ∧ e2
and
e2 e1 = e2 · e1 + e2 ∧ e1 = e2 ∧ e1 = −e1 e2
..an example of the property that orthogonal vectors
anticommute.
Now see what effect multiplying by I2 = e1 ∧ e2 = e1 e2 has on
vectors:
e2
Left (e1 e2 )e1 = −e1 e1 e2 = −e2
(e1 e2 )e2 = e1 e2 e2 = e1
π/2
Right e1 (e1 e2 ) = e1 e1 e2 = e2 − e1 e1
rotation!
e2 (e1 e2 ) = −e2 e2 e1 = −e1
−e2 16 / 41
The Bivector e1 ∧ e2 in 2d
Note:
I2 2 = (e1 e2 )(e1 e2 ) = −e1 e2 e2 e1 = −1
We therefore have a real object, the unit bivector, that:
rotates by 90◦ clockwise via left multiplication
rotates by 90◦ anticlockwise via right multiplication
squares to -1
17 / 41
Complex Numbers and the the 2d Geometric Algebra
Recall that the unit imaginary, i, of complex numbers, squares
to -1 and performs 90◦ rotations of points in the Argand plane
i(x + iy) = −y + ix so that (x, y) −→ (−y, x)
So, in G2 , our position vector is p = xe1 + ye2 which we can
write as:
p = e1 (x + e1 e2 y) = e1 (x + I2 y) =⇒ e1 p = x + I2 y
So multiplication on the left by e1 [which picks out the real
axis] maps our position vector onto something which is
analogous to the complex numbers!
(x, y)
(−y, x)
18 / 41
Rotations in 2d
Im To rotate a complex num-
reiθ ber Z = reiθ anticlockwise
φ
through an angle φ in the Ar-
rei(θ +φ) gand plane we take
Re
Z = reiθ −→ Z0 = rei(θ +φ) = eiφ Z
Now look at analogously taking p = e1 Z → e1 Z0
p0 = e1 eIφ Z = e−Iφ e1 Z = e−Iφ p
since I anticommutes with vectors [Exercise]. Giving us
p0 = e−Iφ p ≡ peIφ ≡ e−Iφ/2 peIφ/2
We will see that this final form is the most general – ie extends
to higher dimensions.
19 / 41
The Geometric Algebra of 3d Euclidean Space
Now let our orthonormal basis vectors be e1 , e2 , e3 . Our 3d
geometric algebra, G3 , now has 23 = 8 elements (with
i, j = 1, 2, 3, i 6= j):
1 { ei } { ei ∧ ej } e1 ∧ e2 ∧ e3
1 scalar 3 vectors 3 bivectors 1 trivector
The sizes of the sets of elements are given by the binomial
coefficients.
20 / 41
Vectors and Bivectors in 3d
Basis bivectors are {e1 e2 , e2 e3 , e3 e1 } – all square to -1 and
generate 90◦ rotations in their plane.
Now consider the product
aB, with a a vector and B a
bivector.
aB = (a⊥ + ak )B
Now write B = ak ∧ b, with b in the B plane and orthogonal to
ak , so that
ak B = ak (ak ∧ b ) = ak (ak b ) = ak 2 b
a⊥ B = a⊥ (ak ∧ b ) = a⊥ ∧ ak ∧ b
21 / 41
Vectors and Bivectors in 3d cont....
...we can write this as
aB = a · B + a ∧ B
with dot and wedge now meaning the lowest and highest
grade parts of the geometric product.
We therefore see that a · B projects onto the components of a in
the plane, rotates by 90◦ and dilates by |B|.
..and that a ∧ B projects onto the perpendicular component of a
and forms a trivector.
22 / 41
The Pseudoscalar in 3d
The highest grade element is I3 = e1 e2 e3 [right handed set] – let
us just use I here. It is easy to show that I2 = −1.
Now take ei I:
e1 I = e1 e1 e2 e3 = e2 e3
Similarly, e2 I = e3 e1 , e3 I = e1 e2 .
This is an example of a duality transformation: multiplication
by I maps an r-vector onto an (n − r)-vector [here r = 1, n = 3].
Check that I commutes with all elements of our 3d algebra.
23 / 41
Cross Product vs Wedge Product
We are now able to see the connection between a × b and a ∧ b.
Consider the product of a basis bivector and the 3d
pseudoscalar, I, eg
I (e1 ∧ e2 ) = e1 e2 e3 e1 e2 = −e3
...ie minus the vector perpendicular to the e1 ∧ e2 plane.
We can easily generalise this to give:
a × b = −I (a ∧ b)
We can see, therefore, that the conventional concept of axial
vector or pseudovector is encoding the fact that you are
actually dealing with a bivector.
24 / 41
Reversion
Reversion is an important operation – it reverses the order of
vectors in any product.
We denote the reverse of A via a tilde, eg Ã.
While this operation can be performed in an algebra of any
dimension, in 3d we have
(e1 e2 )˜ = e2 e1 = −e1 e2
Ĩ = (e1 e2 e3 )˜ = e3 e2 e1 = −e1 e2 e3 = −I
Since scalars and vectors remain unchanged under reversion,
we have, for a general 3d multivector M
M = α + a + B + βI
M̃ = α + a − B − βI
25 / 41
Rotations in 3d
We would like a 3d version of the rotation formulae in the
plane (recall that Hamilton spent many years of his life looking
for such a thing – he finally came up with the quaternions!).
Recall that to rotate a 2d vector a through θ in the e1 e2 plane to
a0 , we take (double-sided form shown)
a0 = e−e1 e2 θ/2 a ee1 e2 θ/2
..in 3d, this works for any a in the e1 e2 plane and additionally
leaves e3 unchanged.
Note: e3 commutes with e−e1 e2 θ/2 [Exercise]
This is why we need the two-sided formula.
26 / 41
Rotations in 3d cont....
Let us now rotate a general
vector a through θ in the B̂
plane (such that B̂2 = −1).
First let a = ak + a⊥ :
e−B̂θ/2 (ak + a⊥ ) eB̂θ/2 = a0k + a⊥ = a0
Let R = e−B̂θ/2 , then we can write our 3d rotation as
a0 = RaR̃
We call this exponentiation of a bivector, a rotor.
Note: RR̃ = e−B̂θ/2 eB̂θ/2 = 1
27 / 41
Rotors in 3d
A rotor is the exponential of a bivector and rotates vectors via a
double-sided formula:
a0 = RaR̃
In 3d R = e−B̂θ/2 is a scalar + bivector:
θ θ
e−B̂θ/2 = cos − sin B̂
2 2
Can we also rotate bivectors(planes) in a similar way? Let
B = a∧b
B0 = a0 ∧ b0 = RaR̃ ∧ RbR̃
1
= RaR̃RbR̃ − RbR̃RaR̃
2
1
= R(ab − ba)R̃ = R(a ∧ b)R̃
2
In fact, we can rotate any multivector via this formula!
28 / 41
Rotors in Euclidean GAs
In fact, this formula of
Rotor = exponential of bivector
performs rotations in any dimension and of any object in the
algebra.
We will see in future sessions, that if we do not have a
euclidean space, these rotors always form transformations of a
fundamental nature.
Much of the power of GA lies in its ability to nicely deal with
rotations.
29 / 41
Reciprocal Frames
Many problems in mathematics, physics and engineering
require a treatment of non-orthonormal frames.
Take a set of n linearly independent vectors {fk }; these are not
necessarily orthogonal nor of unit length.
Can we find a second set of vectors (in the same space), call
these {f k }, such that
f i · fj = δji
30 / 41
Reciprocal Frames
31 / 41
Reciprocal Frames cont....
We call such a frame a reciprocal frame. Note that since any
vector a can be written as a = ak fk ≡ ∑ ak fk (ie we are adopting
the convention that repeated indices are summed over), we
have
f k · a = f k ·(aj fj ) = aj (f k · fj ) = aj δjk = ak
Similarly, since we can also write a = ak f k ≡ ∑ ak f k
j
fk · a = fk ·(aj f j ) = aj (fk · f j ) = aj δk = ak
Thus we can recover the components of a given vector in a
similar way to that used for orthonormal frames.
So how do we find a reciprocal frame?
32 / 41
Finding a Reciprocal Frame
To illustrate the process, we will find the reciprocal frame in 3d
for a non-orthonormal set of basis vectors {f1 , f2 , f3 }.
Consider the quantity f 1 = α(f2 ∧ f3 )I:
f1 · f 1 = αf1 ·(f2 ∧ f3 I ) = α(f1 ∧ f2 ∧ f3 )I = αE3 I
(this uses a useful GA relation a ·(BI ) = (a ∧ B)I) where
E3 = f1 ∧ f2 ∧ f3
Since E3 = βI, we see that α = −1/β, with E3 2 = − β2 :
1
f1 = − (f2 ∧ f3 )I
|E3 |
and similarly for f 2 , f 3 .
33 / 41
Example: Recovering a Rotor in 3-d
As an example of using reciprocal frames, consider the problem
of recovering the rotor which rotates between two 3-d
non-orthonormal frames {fk } and {fk0 }, ie find R such that
fk0 = Rfk R̃
It is not too hard to show that R can be written as
R = β(1 + fk0 f k )
where the constant β ensures that RR̃ = 1.
A very easy way of recovering rotations.
34 / 41
Reflections
Take a vector a and a unit vector n (n2 = 1) – to resolve a into
parts perpendicular and parallel to n we do the following:
a = n2 a = n(na) = n(n · a + n ∧ a)
= (n · a )n + n (n ∧ a ) ≡ ak + a⊥
If we reflect a in the plane or-
thogonal to n we get a0 given
by
a0 = a⊥ − ak
= −n(a ∧ n) − (a · n)n
= −n(a · n + a ∧ n) = −nan
a0 = −nan is a very compact formula, afforded by the
geometric product. We will see later that sandwiching like this
is a very general formula for reflecting one object in another. 35 / 41
Generalising the Geometric Product
It can be shown (in a more general treatment) that the
geometric product of an r-blade, Ar and an s-blade, Bs is given
by:
Ar Bs = hAr Bs i|r−s| + hAr Bs i|r−s|+2 + . . . + hAr Bs ir+s
We then use the dot and wedge to mean the lowest and highest
grades terms in this expansion:
Ar · Bs = hAr Bs i|r−s|
Ar ∧ Bs = hAr Bs ir+s
Using the above, can make many identities very easy to prove.
36 / 41
Geometric Algebra on Azure Notebooks
1 Sign up for an Azure Notebook account if you don’t have
one (note, sometimes it does not like it if you logon with
an institutional email, if your institution already has
accounts with Azure – I sign on with gmail).
2 go to
https://notebooks.azure.com/hugohadfield/libraries/azure-clifford
and ‘clone’ the azure-clifford library (there is a ‘clone’
button).
3 go back to your Azure page and you should now see the
azure-clifford library. Open
clifford example.ipynb
4 try running these examples.
5 these notebooks use the clifford package – for info on
syntax, conventions etc, see
https://clifford.readthedocs.io/en/latest/index.html
37 / 41
Exercises 1
1 Set up two vectors a, b, form c = a × b, the cross product.
Now form B = a ∧ b and its dual IB, and show that c = −IB.
2 Consider the bivector B = a ∧ b. By writing
a ∧ b = ab − a · b and a ∧ b = −b ∧ a = −(ba − b · a)
show that B2 is always positive.
3 For {f1 , f2 , f3 } = {e1 , e1 + 2e3 , e1 + e2 + e3 } show, using
the given formulae, that the reciprocal frame is given by
1 1
{f 1 , f 2 , f 3 } = {e1 − (e2 + e3 ), (e3 − e2 ), e2 }
2 2
38 / 41
Exercises 2
1 The quaternion algebra of Hamilton (1805-1865) has three
‘unit imaginaries’, i,j,k, which satisfy the following
equations:
i2 = j2 = k2 − −1 and ijk = −1
Show that if we equate the quaternion imaginaries with
unit bivectors as follows:
i = e2 e3 j = −e3 e1 k = e1 e2
the above relations are satisfied.
2 Using the Taylor expansion, show that a rotor of the form
R = eB̂θ/2 (where B̂ is a bivector which squares to -1) can be
written as
R = cos θ/2 + B̂ sin θ/2
39 / 41
Exercises 3
1 By considering the fact that any bivectors in 3d which are
not the same, must have a common line of intersection,
show that all bivectors in 3d are blades.
2 In a 4d Euclidean space, give an example of a bivector
which cannot be written as a blade.
3 We define the exponentiation of a multivector via its
Taylor series and the geometric product, ie
M M2
eM = 1 + + +...
1! 2!
Using this, verify the 2d identity used earlier,
e1 eIφ = e−Iφ e1
40 / 41
Exercises 4
1 Show that a·(BI ) = (a∧B)I, with a a vector and B a bivector.
2 Now show that Ar ·(Bs I ) = (Ar ∧ Bs )I.
[Hint: make use of the fact that Ar ·(Bs In ) = hAr Bs In i|r−(n−s)| ].
41 / 41