An introduction to Clifford algebra

Clifford algebra is the language that enables the Velar engine. This mathematical framework is used regularly to accelerate calculations in robotics, electromagnetics, and other fields. We use it to encode the field equations of physics and solve them directly on GPU hardware.

This short course provides an introduction to Clifford Algebra, what makes it so powerful, and specifically why it is useful for representing physics at the atomic scale. We will cover the mathematical underpinning Clifford's geometric algebra assuming a basic understanding of vector algebra. The course should take 10 to 30 minutes depending on your background knowledge.

Two ways to multiply vectors

You already know two ways to combine vectors.

The dot product takes two vectors and produces a number:

a · b = |a| |b| cos θ

This measures how much the vectors point in the same direction.

The cross product takes two vectors and produces another vector:

a × b = |a| |b| sin θ n̂

This produces a vector perpendicular to both, with magnitude equal to the area of the parallelogram they span.

This situation invites a question. Why do we need two separate operations, and why does the cross product only work in three dimensions? Clifford algebra provides a single unified product that contains both and works in any number of dimensions.

The geometric product

The geometric product of two vectors a and b is written simply as ab. It is defined by one fundamental rule.

v² = |v|² The fundamental rule: for any vector v, the product of v with itself equals a scalar, the squared length.

This single rule, combined with the requirement that the product distributes over addition, generates everything else in the algebra. What follows are consequences derived from this one rule.

What squared length means

Before going further, a natural question. If 10 m × 10 m = 100 m², is that an area? It depends on the geometry, because the units m² can mean different things.

  • Area, from perpendicular directions. Multiply 10 m going east by 10 m going north and you get the area of a square: 100 m² of surface.
  • Squared length, from the same direction. Multiply 10 m east by 10 m east and you are going along a line both times. The result is a squared length, a different kind of quantity from area.

The difference is geometric. Perpendicular directions span a plane; parallel directions span only a line.

What question does squared length answer?

The dot product a · b answers: how much does a point along b? So a · a answers: how much does a point along itself? Completely, with perfect alignment, so you get |a|².

This squared magnitude appears throughout physics: kinetic energy E = ½mv², the Pythagorean theorem c² = a² + b², wave intensity proportional to amplitude squared, field energy density ½(E² + B²). Nature repeatedly bills us for the square of quantities, and the rule v² = |v|² builds this directly into the algebra.

Perpendicular vectors, and bivectors

What happens when we multiply different vectors? Consider two perpendicular unit vectors α1 pointing east and α2 pointing north. From the fundamental rule:

1 + α2)² = |α1 + α2|² = 2

Expanding the left side:

1 + α2)² = α1² + α1α2 + α2α1 + α2² = 1 + α1α2 + α2α1 + 1

For these to be equal, α1α2 + α2α1 = 0, and therefore:

α1α2 = −α2α1

Perpendicular vectors anticommute: their product changes sign when you swap the order. This property follows inevitably from the fundamental rule.

What is α1α2?

The product α1α2 is a new kind of object: a bivector. Geometrically it represents an oriented plane, the plane spanned by α1 and α2, with a sense of rotation.

OperationResult
Same direction × same directionScalar (squared length)
Perpendicular × perpendicularBivector (oriented plane)

This is your intuition about area, now built into the algebra.

The full product: scalar plus bivector

For two general vectors a and b, the geometric product splits into two parts:

ab = a · b + a ∧ b scalar part + bivector part

The dot product, or inner product, extracts the scalar part, measuring how aligned the vectors are. The wedge product, or outer product, extracts the bivector part, the oriented plane they span.

For perpendicular vectors the dot product vanishes, leaving only the bivector. For parallel vectors the wedge product vanishes, leaving only the scalar. The geometric product packages both into one operation, and this decomposition is a consequence of the fundamental rule applied to general vectors.

Building higher grades

We can continue multiplying. In three dimensions, with basis vectors α1, α2, α3, the product of all three is a trivector:

α1α2α3 = α123

This represents an oriented volume: the unit cube with a handedness.

The pattern

In n dimensions we get 2n independent basis elements.

GradeNameGeometric meaningCount in 3D
0ScalarMagnitude, point1
1VectorDirected line3
2BivectorOriented plane3
3TrivectorOriented volume1
Total basis elements8

The count follows the binomial pattern 1 + 3 + 3 + 1 = 8 = 2³, reflecting the number of ways to choose k basis vectors from n to form a grade-k element. In four-dimensional spacetime we get 2⁴ = 16 basis elements: 1 scalar, 4 vectors, 6 bivectors, 4 trivectors, and 1 quadrivector.

Why bivectors are distinct from vectors

In 3D there are three independent bivectors: α23 for the yz-plane, α31 for the zx-plane, and α12 for the xy-plane. Three independent components, just like vectors. That coincidence is why we can represent bivectors using vectors in 3D, which is exactly what the cross product does.

But this is an accident of three dimensions. In 4D, vectors have 4 components and bivectors have 6. They are fundamentally different objects. The cross product works only in 3D, while the wedge product generalizes to any dimension.

Physical consequence

The magnetic field B is taught as a vector, but it is a bivector: it represents circulation in a plane, a different concept from a direction in space. In 3D we can get away with treating it as a vector perpendicular to that plane, so the xy-plane is associated with the z-direction, and so on.

In 4D spacetime there are six independent bivectors and only four vectors, and the correspondence breaks down. This is why electromagnetism looks awkward in standard vector notation and becomes elegant in Clifford algebra: the electric and magnetic fields are unified as a single bivector field, the Faraday bivector F, with six independent components, three for E and three for B.

Spacetime: when squares can be negative

So far we have assumed v² = |v|² > 0. Special relativity demands a richer structure. In spacetime, with time direction α0 and space directions α1, α2, α3:

α0² = +1
α1² = α2² = α3² = −1 Time squares to positive, space squares to negative. This is the metric signature.

The interval

Consider a displacement in spacetime, dx = α0dt + α1dx + α2dy + α3dz. Its square is:

(dx)² = dt² − dx² − dy² − dz²

This is the spacetime interval, the quantity all observers agree on regardless of their motion. The mixed signature emerges automatically from the algebra. The cross terms vanish because different basis vectors anticommute, so only the squared terms survive, each weighted by its signature.

Three types of displacement

TypeConditionPhysical meaning
Timelike(dx)² > 0Slower than light, massive particles
Spacelike(dx)² < 0Faster than light, forbidden for matter
Lightlike, null(dx)² = 0Exactly light speed

For light, dt² = dx² + dy² + dz², so the interval is zero. Light accumulates zero length in spacetime, which is why photons experience zero proper time.

Ok, it simplifies things. So what?

Rotations become simple. A rotation in the xy-plane is generated by the bivector α12. The rotation of a vector v by angle θ is:

v → e−(θ/2)α12 v e+(θ/2)α12

The bivector specifies which plane to rotate in, and the angle specifies how much. The same formula works for Lorentz boosts in spacetime: replace α12 with a spacetime bivector such as α01.

Complex numbers and quaternions are included. The subalgebra {1, α12} behaves exactly like {1, i}, because α12² = −1. Quaternions appear as {1, α23, α31, α12}. These familiar number systems are pieces of a larger whole.

Maxwell's equations simplify. All four Maxwell equations can be written as one:

dF = J d is the vector derivative and F is the electromagnetic bivector field.

What appears in standard notation as four separate equations with curls and divergences is revealed to be a single geometric statement: the derivative of the field equals the source. The algebra handles the bookkeeping that humans otherwise do by hand. This simplicity translates directly to computational complexity, enabling us to compute the relevant physics at scales meaningful to engineering products.

Summary: one rule, all of geometry

Clifford algebra is built from one idea: vectors square to scalars. From that single rule:

  • Perpendicular vectors anticommute, generating bivectors, which are planes
  • Continuing generates trivectors, which are volumes, and beyond
  • The geometric product unifies the dot and wedge products
  • Rotations and boosts are simple exponentials of bivectors
  • Complex numbers and quaternions emerge as subalgebras
  • Physics equations become geometric and coordinate-free

The machinery of Clifford algebra may seem elaborate at first. It is simply the metric, the rule for measuring lengths and angles, taken seriously at the level of multiplication. Once you do, the rest follows inevitably.

Selected further reading

  • Hestenes, D. (2003). Oersted Medal Lecture 2002: Reforming the mathematical language of physics. American Journal of Physics 71(2), 104–121. The case for the reformulation, made to physics teachers.
  • Doran, C. & Lasenby, A. (2003). Geometric Algebra for Physicists. Cambridge University Press. The standard graduate treatment.
  • Hestenes, D. & Sobczyk, G. (1984). Clifford Algebra to Geometric Calculus. Reidel. The comprehensive mathematical reference.
  • Hestenes, D. (2015). Space-Time Algebra, 2nd ed. Birkhäuser. Spacetime and relativity, the algebra our engine is built in.
  • Macdonald, A. (2011). Linear and Geometric Algebra. A gentle undergraduate introduction, if the above are heavy going.

Where we take this

The Velar engine encodes the field equations of physics in this algebra and solves them directly on GPU hardware.