Introduction to Geometric Algebra, Part 1

Ivar Thorson bio photo By Ivar Thorson

Geometric Algebra (GA) is one of those things that we should have all learned in high school because it would have made physics and mathematics in college so much easier.

The fact that we did not learn it in high school is probably because GA appears to only have been known by mathematicians studying Clifford Algebras. Mathematicians may be 100 years ahead of everybody else in so many ways, but they are not always the best at communicating their subject to non-mathematicians. The physics community, at least, seems to have figured out that GA is useful, and since physicists are 20 years ahead of the rest of the sciences in the adoption of good tools and methods, it seems safe to predict that in the future engineers will start seeing GA in school in a couple of decades, or even sooner!

Geometric Algebra could be taught in high school immediately after basic algebra. Not only is GA not particularly difficult to learn, it provides a unified perspective for several areas:

  • GA lets you easily perform 2D and 3D vector transformations. It is simpler to perform spatial rotations than using matrices, sines, and inverse trigonometric operations, and it generalizes to more dimensions in a straightforward way.
  • GA gives a clear geometric meaning to the imaginary number – or all 3 imaginary numbers, in the case of quaternions.
  • GA replaces div, grad, curl, with a single vector derivative. To an electrical engineer like myself, it is frankly amazing to see the four Maxwell Equations reduced into a single equation!
  • GA is coordinate-free and can let you make analytic conclusions without first choosing a basis
  • GA is a framework applicable to dozens of different fields of physics and engineering, including classical and quantum mechanics.

While I am far from being an expert in Geometric Algebra, I wanted to write an accessible, bare-bones introduction to the subject so that people can follow my use of it in a future post on hyperbolic geometry. For this reason, this post will just focus on 2D operations, and perhaps in a later post I can talk about rotations in 3D space or 4D spacetime, differential equations, Maxwell’s Equations, and other applications.

Preparation: Basic Concepts

Before introducing Geometric Algebra, I’m going to briefly review coordinate systems, basis vectors, and the inner and outer products. As an engineer and not a mathematician, I will focus on examples and developing intuition rather than rigor, entirely symbolic notation, or the capacity to generalize expressions. Checking correctness with a proof must follow the intuition that there is something there to prove!

Concept: Properties of Algebras

Most people have a vague idea what algebra is: it is a set of rules to add and multiply objects of different quantities, often represented in school using the variables \(x\) and \(y\). The operations you perform usually satisfy the properties of being

  • associative, meaning that you can reorder operations \((qr)s=q(rs)\); and
  • distributive, meaning that you can expand like \(q(r+s)=qr+qs\).

The algebra you learned in school had one other property:

  • commutative multiplication, meaning that you can reorder terms \(qr = rq\).

This is not so in Geometric Algebra and matrix algebras, in which the ordering of terms being multiplied matters and generally speaking \(qr \ne rq\).

If you are wondering why some operations are not commutative, consider where you would end up navigating if you start in a given orientation and:

  • Walk forward 100 paces (\(q\)) and then turn right (\(r\)); or
  • Turn right (\(r\)) and then walk forward 100 paces (\(q\)).

Another example is to consider the commutivity of addition and subtraction: \(4+3=3+4\), but does \(4-3=3-4\)?

Concept: Coordinate System and References

To introduce GA we need to define a coordinate system with two things:

  1. A way to measure distance (hopefully evenly!)
  2. Reference directions (hopefully independent!)

Let us consider our options first. If we are drawing on a sheet of paper, we could measure distances using the number of marks passed on a grid. This grid could be:

coord-arb Arbitrary or Curvilinear coordinates. We could draw any bunch of curved lines unevenly over the page in a wavy grid as long as the lines parallel to each other did not intersect. This sounds crazy, but sometimes you need to account for some distortion in a space and this type of coordinate system can be very useful as a transformation. In most cases, however, it would be a poor choice for most problems because one unit of distance is not exactly “equal” to another unit elsewhere on the page.
coord-polar Polar. We could use we could use an angle (from a reference direction) and a distance or angle from an origin to define where a point is, as is often done on spherical surfaces like the surface of the Earth. While useful in certain circumstances, but again suffer from the problem that distances at different areas on the page are not easily compared.
coord-rect Rectangular Coordinates. Known as the familiar “XY” coordinate system for most people, we could (and will!) use a grid of straight, parallel lines to find the coordinates of a point. Most problems that are not on highly distorted surfaces are most simply considered in this way – and even on curved surfaces, if you “zoom in” far enough, most surfaces begin to look “locally flat” and begin to resemble straight lines.

Now that we are measuring distances evenly with a Cartesian grid, we need to choose a basis, which are essentially the directions that we reference. The choice of the directions is partly arbitrary, and partly not. For example, we can rotate the grid to be in any orientation and still get the same results. What other options do we have?

coord-skewed Non-orthogonal basis. We could choose any two directions to draw our parallel lines in, which would probably our grid skewed, but we would soon notice that moving along \(x\) also moves you along \(y\) in some important sense. This seems like a problem, so we must add another constraint!
coord-rectangular Orthogonal. If we make the two vectors orthogonal (i.e. 90 degrees to each other) we can now move independently in each direction. But what if we accidentally spaced our parallel lines different distances apart along each axis? If we do not add a constraint that both reference directions be of the same magnitude, we might accidentally measure distances along X in units of meters and distances along Y in distances of feet.
coord-cartesian Orthonormal. If your basis is orthogonal and are equal in magnitude (i.e. distances on each are measured in the same way), we call the basis “orthonormal”.

One of the advantages of GA is that the exact choice of basis often does not matter – it could be rotated to any number of crazy angles or different scales – and that you can find relationships without choosing a basis at all.

Concept: Vectors

Using our new coordinate space, let us now draw two example vectors \(a\) and \(b\), which are mixtures of the basis directions \(e_1\) and \(e_2\). We will use these same two vectors over and over again to keep the number of symbols low.

Rather than than using matrices or vector notation, which would do more harm than good because they would obfuscate important quantities, we will instead use simple algebraic forms to express vectors. Let us define

\[\begin{eqnarray*} a & = & 2e_1 + 1e_2\\ b & = & 3e_1 + 4e_2 \end{eqnarray*}\]

example-vectors

In plain english, the vector \(a\) means a direction that, for each two units you move along \(e_1\), you must also move one unit along \(e_2\). Note that we cannot “add” apples \(e_1\) and oranges \(e_2\); the \(+\) symbol here means something like the word “and” for the terms with different basis vectors. We can reduce expressions with \(e_1\), but not combine them with \(e_2\) in a way that is further reduced than this notation.

Example: Vector Addition

What is \(a + b\)?

\[\begin{eqnarray*} a + b & = & (2e_1 + 1e_2) + (3e_1 + 4e_2) \\ & = & 2e_1 + 3e_1 + 1e_2 + 4e_2 \\ & = & (2+3)e_1 + (1+4)e_2 \\ & = & 5e_1 + 5e_2 \end{eqnarray*}\]

Concept: Vector Magnitude

Since trigonometry is familiar to most people, we will define the magnitude of a vector \(a=\alpha_1 e_1 + \alpha_2 e_2\) in the same way as was used the Pythagorean Theorem.

\[\|a\| = \sqrt{\alpha_1^2 + \alpha_2^2}\]

Example: Vector Magnitudes

What are the magnitudes of \(a\) and \(b\)?

vector-magnitude

\[\begin{eqnarray*} \|a\| & = & \sqrt{2^2 + 1^2} = \sqrt{5}\\ \|b\| & = & \sqrt{3^2 + 4^2} = \sqrt{25} = 5\end{eqnarray*}\]

Concept: Projections and the Inner Product

Let us ask a very simple question about these vectors:

If you move along \(a\), how much do you also move along \(b\)?

The answer to this question is given by the inner product (a.k.a. dot product). It is called the “inner” product because the answer is “inside” or “along” the vector to which you are projecting.

Most people remember trigonometry pretty well, in which case the single most important thing to remember about the inner product is:

\[a\cdot b=\|a\|\|b\|\cos\theta\]

inner-product-and-magnitude

What can we discover about the consequences of this equation?

  • The inner product must be commutative (\(a\cdot b = b \cdot a\)), because the cosine function is symmetric (a.k.a “even”), which is the property that \(\cos(\theta)=\cos(-\theta)\). All this means is that the value of \(\cos(...)\) will be the same whether we measure from \(a\) to \(b\), which is \(\cos(\theta)\), or from \(b\) to \(a\), which is \(\cos(-\theta)\).

cosine-fn

  • If \(\|a\|=1\), then \(a \cdot a = 1\) because there is zero angle between \(a\) and itself, and \(\cos(0)=1\). We will use this property for basis vectors extensively, specifically that \(e_1 \cdot e_1 = 1\) and \(e_2 \cdot e_2 = 1\).

  • Orthogonal things must have an inner product of zero, because if \(\theta=\pm 90^\circ\), \(\cos(\pm 90^\circ)=0\), and thus \(a\cdot b=0\). This definitely applies to our basis vectors, where we see that \(e_1 \cdot e_2 = e_2 \cdot e_1 = 0\).

  • The inner product must be related closely to magnitudes. It is easy to prove that \(\|a\| = \sqrt{a \cdot a}\); can you see why? Geometrically, we could think of this definition of magnitude as being akin to “What do we get if we move in the direction of \(a\) by a number of units equal to the length of \(a\)? The magnitude of \(a\).”

Pause a moment and pretend the dot product is a black box. What are the types of the objects that enter and exit it, and what do those types intuitively mean? Well, the two “inputs” were vectors and the “output” was a scalar that measures the how much you move along one if you move along the other.

Example: Inner Product

What is \(a \cdot b\) using the above values of \(a\) and \(b\)?

\[\begin{eqnarray*} a \cdot b & = & (2e_1 + 1e_2) \cdot (3e_1 + 4e_2) \\ & = & 2e_1\cdot 3e_1 + 2e_1\cdot 4e_2 + 1e_2\cdot 3e_1 + 1e_2 \cdot 4e_2 \\ & = & 6e_1\cdot e_1 + 8e_1\cdot e_2 + 3e_2\cdot e_1 + 4e_2 \cdot e_2 \\ & = & 6 (1) + 8 (0) + 3 (0) + 4 (1) \\ & = & 10 \end{eqnarray*}\]

Concept: Rotations and the Outer Product

Let us ask another very simple question about these vectors:

If you start pointed in the direction of \(a\), how much do you need to rotate to point in the direction of \(b\)?

The outer product (a.k.a. wedge product) is what gives us the answer to this question.

As before, the easiest way to understand this is via trigonometry, in which case the most important fact is:

\[a\wedge b=\|a\|\|b\|\sin\theta\]

outer-product-and-sine2

This equation has several important consequences:

  • The outer product is not commutative. In fact, the outer product is a kind of multiplication that is called anti-symmetric, which means that commuting the inputs flips the sign (\(a\wedge b = - b \wedge a)\). This is fundamentally because \(\sin()\) is an odd function and \(\sin(\theta)=-\sin(-\theta)\). There are also geometric reasons for rotations to not be commutative: if we start at \(a\), we need to rotate counterclockwise to get to \(b\), but we start at \(b\), we need to rotate clockwise to get to \(a\). The choice of which reference direction you measure from matters to the sign of the answer.

sine-fn

  • The outer product is closely related to rotation by 90 degrees, because that is the point at which \(\sin(\theta)\) is maximized and minimized. This is so important that we will right now assign the symbol \(R\) to a 90 degree counterclockwise rotation. We can think of smaller or larger rotations as being \(R\) multiplied by some scalar to adjust “how big” the rotation is. Under this idea, a 45 degree counterclockwise rotation would be \(0.5R\), and a 90 degree clockwise rotation would be \(-R\).

bivectors outer-product-half-rotation

  • The outer product of two orthonormal vectors must be either \(1R\) or \(-1R\). Why? Because if \(\theta=\pm 90^\circ\), then \(\sin(\pm 90^\circ)=\pm 1\). For the basis vectors, this means that \(R = e_1 \wedge e_2\) is a 90 degree counterclockwise rotation, and \(-R = e_2 \wedge e_1\) is a 90 degree clockwise rotation.

Once again, it will help to consider the black box specification of the outer product operation. The two “inputs” were vectors and the “output” is a scaled amount of a 90 degree rotation \(R\), which is neither a vector nor a scalar. What, exactly, is the type of this output object? After defining the geometric product, we will give it a better name.

Example: Outer Product

What is \(a \cdot b\) using the above values of \(a\) and \(b\)?

\[\begin{eqnarray*} a \wedge b & = & (2e_1 + 1e_2) \wedge (3e_1 + 4e_2) \\ & = & 2e_1\wedge 3e_1 + 2e_1\wedge 4e_2 + 1e_2\wedge 3e_1 + 1e_2 \wedge 4e_2 \\ & = & 6e_1\wedge e_1 + 8e_1\wedge e_2 + 3e_2\wedge e_1 + 4e_2 \wedge e_2 \\ & = & 6 (0) + 8 (+R) + 3 (-R) + 4 (0) \\ & = & 5R \end{eqnarray*}\]

Geometric Algebra

With the preliminaries out of the way, we can now define the geometric product and actually start doing geometric algebra!

The Geometric Product

In the same way that we introduced the inner and outer products by asking a question, we will introduce the geometric product by asking a very general question:

How do you transform \(a\) into \(b\)?

Or equivilently, in terms of what we already know,

How much do you need to rescale and rotate \(a\) so that it is equal to \(b\)?

The intuition that we need both a rotation and a rescaling is key to understanding the geometric product. We will write the geometric product of \(a\) and \(b\) as \(ab\), as we would write scalar multiplication of two variables in high school algebra. We can define the geometric product as:

\[ab = a \cdot b + a \wedge b\]

But in some ways, this definition puts the cart before the horse! We can discover this equation if just try to multiply \(a\) and \(b\) together and be very careful about how we do so. Let us explore what happens when we try to compute \(ab\) using high school rules of algebra (sans commutative multiplication of nonscalars).

\[\begin{eqnarray*} ab & = & (2e_1 + 1e_2) (3e_1 + 4e_2)\\ & = & (2e_1)(3e_1) + (2e_1)(4e_2) + (1e_2)(3e_1) + (1e_2)(4e_2)\\ & = & 6 e_1 e_1 + 8 e_1 e_2 + 3 e_2 e_1 + 4 e_2 e_2\\ \end{eqnarray*}\]

Hmm. What should we do with the products of the unit vectors \(e_1 e_1, e_1 e_2, e_2 e_1, e_2 e_2\)? We can reason it out:

  • \(e_1 e_1\) asks, “How do I transform \(e_1\) into \(e_1\)?”. The answer, of course, is that nothing needs to be done! We can express this by scaling by one, the identity object, and write that \(e_1 e_1 = 1\). If we recall the properties of dot and wedge products for unit length vectors, \(e_1\cdot e_1=1\) and \(e_1\wedge e_1=0\), then this assumption also agrees with our definition of the geometric product, \(e_1e_1=e_1\cdot e_1 + e_1 \wedge e_1 = 1 + 0R = 1\). No rotation was needed.

  • \(e_2 e_2\) must also equal 1, for the same reasons.

  • \(e_1 e_2\) is asking how do I transform \(e_1\) into \(e_2\)? We know that our basis vectors are orthonormal, so this must equal a 90 degree clockwise rotation \(R\). \(e_1e_2=e_1\cdot e_2 + e_1 \wedge e_2 = 0 + 1R = R\), and no rescaling is needed.

  • \(e_2 e_1\) must thus equal \(-R\), using similar reasoning.

We can now finish the simplification process.

\[\begin{eqnarray*} ab & = & 6 e_1 e_1 + 8 e_1 e_2 + 3 e_2 e_1 + 4 e_2 e_2\\ & = & 6 (1) + 8(R) + 3 (-R) + 4 (1)\\ & = & 10 + 5R\\ \end{eqnarray*}\]

If you compare this results to what we found earlier (\(a\cdot b=10\) and \(a\wedge b=5R\)), we can indeed see that in this case \(ab=a\cdot b + a\wedge b\). Now that you have the intuition, it would be a good time to prove this to yourself more generally for all \(a,b\).

Speaking of intuition, what does the result \(ab=10+5R\) really mean? Does it mean that we should scale vector \(a\) by 10 times and go 5 quarter turns counterclockwise to end up at \(b\)? That seems obviously incorrect! So our interpretation has led us slightly astray.

We will correct this intuition of this just a moment, but now is a good time to introduce some simplying notation that will carry us beyond just two dimensions.

Simplifying Geometric Products of Basis Vectors

For brevity, if you have fewer than 10 dimensions, it is often convenient to combine the subscripts of basis vectors. That is, with this notational convention, \(e_1 e_2 = e_{12}\), or \(e_1 e_2 e_3 = e_{123}\).

To simplify a geometric product expressions with orthonormal vectors, we have already learned the only two rules that we need to know:

  1. \(e_i e_i = e_{ii} = 1\).
  2. \(e_i e_j = e_{ij} = - e_{ji}\).

That’s it! Let’s try an example to make sure this is completely obvious.

Example: Simplifying Geometric Products

Simplify the quantity \(e_2 e_3 e_2 e_1 e_3 e_2 e_2\).

\[\begin{eqnarray*} e_2 e_3 e_2 e_1 e_3 e_2 e_2 & = & e_2 e_3 e_2 e_1 e_3 e_2 e_2\\ & = & e_2 e_3 e_2 e_1 e_3 (1) \\ & = & e_2 (-e_2 e_3) e_1 e_3\\ & = & -(1) e_3 e_2 e_1 e_3 \\ & = & -(1) e_3 e_2 e_1 e_3 \\ & = & - (- e_2 e_3) e_1 e_3 \\ & = & e_2 (- e_1 e_3) e_3 \\ & = & - e_2 e_1 (1) \\ & = & e_1 e_2 \\ & = & e_{12} \end{eqnarray*}\]

Blades, Grades and Bivectors

Let us make a table of the different types of objects we have seen up to this point, and add a new column called grade that more or less describes the dimensionality of the object.

Object (a.k.a. Blade ) Examples Basis Grade Relates to
Scalar 1,2,3,4,5… 1 0 Magnitude
Vector \(a,b\) \(e_1, e_2\) 1 Direction
Bivector / Rotation \(5R\) \(e_{12}\) 2 Rotation

Common parlance is to call \(e_{12}\) a bivector, and when we get to 3D, \(e_{123}\) is the trivector.

The meaning of Geometric Products

Let us look one more time at the vectors \(a\) and \(b\), but this time let us include all four of the basis vectors we have seen thus far: \(1, e_1, e_2, e_{12}\).

\[\begin{eqnarray*} a & = & 0(1) + 2e_1 + 1e_2 + 0e_{12}\\ b & = & 0(1) + 3e_1 + 4e_2 + 0e_{12}\end{eqnarray*}\]

In general, we will call this new compound object a “Multivector”. Multivector \(a\) has four components:

  • An amount of “0” of a scalar quantity
  • An amount of “2” in direction \(e_1\)
  • An amount of “1” in direction \(e_2\)
  • An amount of “0” is the bivector (90 degree rotation) direction

As we know by now, we cannot simplify this expression any further, because we must continue to track each type of object independently. All four objects are independent, different measurement units: the scalar values, the two basis values, and the bivector (\(e_{12}\)) value. Like a local fruit stand taking inventory, we need to keep independent counts of apples and oranges and pears and bananas, not a count of all the fruit together.

The only thing left to do in this post is to explore a few examples.

Example: On the Order of Multiplication (\(ab\) vs \(ba\))?

What is the relationship between \(ab\) and \(ba\)?

\[\begin{eqnarray*} ba & = & (3e_{1}+4e_{2})(2e_{1}+1e_{2})\\ & = & 6e_{11}+3e_{12}+8e_{21}+4e_{22}\\ & = & 6+3e_{12}-8e_{12}+4\\ & = & 10-5e_{12}\\ & = & (ab)^{\dagger} \end{eqnarray*}\]

where \(^{\dagger}\) means the complex conjugate. In physical terms, this means rotating clockwise instead of counterclockwise, which is consistent with our understanding thus far.

Example: How do we move from \(a\) to \(b\)?

If \(ab\) represents a transformation from \(a\) to \(b\), how do we show it? Keeping in mind that geometric product operations are not commutative, should we pre- or post- multiply \(a\) with \(ab\) to transform it into \(b\)?

If we pre-multiply,

\[\begin{eqnarray*} aba & = & (ab)a\\ & = & (10+5e_{12})(2e_{1}+1e_{2})\\ & = & 20e_{1}+10e_{2}+10e_{121}+5e_{122}\\ & = & 20e_{1}+10e_{2}-10e_{2}+5e_{1}\\ & = & 25e_{1} \end{eqnarray*}\]

Which is not equal to \(b\). Perhaps we should try post-multiplying?

\[\begin{eqnarray*} aab & = & a(ab)\\ & = & (2e_{1}+1e_{2})(10+5e_{12})\\ & = & 20e_{1}+10e_{112}+10e_{2}+5e_{212}\\ & = & 20e_{1}+10e_{2}+10e_{2}-5e_{1}\\ & = & 15e_{1}+20e_{2}\\ & = & 5(3e_{1}+4e_{2})\\ & = & 5b \end{eqnarray*}\]

Aha! That is just \(b\) multiplied by a factor of 5. Where did that factor of 5 come from? Well, If we normalized \(a\) and \(b\) to have unit length (i.e. \(\frac{a}{\|a\|}\) and \(\frac{b}{\|b\|}\)), then the factor of 5 disappears. Now is a good time to grab a sheet of paper and a pen and prove that \(aab=b\) for unit length vectors, and then read on:

\[\begin{eqnarray*} r&=&\frac{a}{\|a\|}\frac{b}{\|b\|}\\ &=&...\end{eqnarray*}\] \[\|r\|=1\]

If you can see that \(r\) represents a pure rotation (a.k.a. a rotor), then the transform from \(a\) to \(b\) could be described as: “normalize \(a\), rotate by \(r\), and then scale by \(\|b\|\) to reach \(b\). In math, this is quite simply several products written from left to right:

\[\begin{eqnarray*} a\frac{1}{\|a\|}r\|b\| & = & a\frac{1}{\|a\|}\frac{ab}{\|a\|\|b\|}\|b\|\\ & = & \frac{aab}{\|a\|^{2}}\\ & = & b \end{eqnarray*}\]

And we can see that the factor of 5 we saw earlier came from the fact that \(\|a\|^2=5\). The true way to go from \(a\) to \(b\) is thus to multiply \(a\) by \(\frac{ab}{\|a\|^2}\).

Conclusion

For those with prior experience in engineering and physics, you have probably noticed by now that the bivector \(e_{12}\) is playing the role of the imaginary number \(i=\sqrt{-1}\), and that this is all just complex mathematics in another form. However, you may agree after seeing the results in higher dimensions that it is perhaps more valid to say that complex mathematics is just a special case of geometric algebra!

References

I found the following papers useful while learning about Geometric Algebra. Ordering from easiest to hardest,

  • Geometric Algebra Primer, by Jaap Suter.
  • Imaginary Numbers are not Real – the Geometric Algebra of Spacetime, by Stephen Gull, Anthony Lasenby, and Chris Doran.
  • A Survey of Geometric Algebra and Geometric Calculus, by Alan Macdonald.
  • Oersted Medal Lecture 2002: Reforming the Mathematical Language of Physics by David Hestenes.
  • An Introduction to Geometric Algebra and Calculus, by Alan Bromborsky.
  • Geometric Algebra, by Eric Chisolm.
  • Spacetime Physics with Geometric Algebra 1, by David Hestenes.