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.
You already know two ways to combine vectors.
The dot product takes two vectors and produces a number:
This measures how much the vectors point in the same direction.
The cross product takes two vectors and produces another vector:
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 of two vectors a and b is written simply as ab. It is defined by one fundamental rule.
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.
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.
The difference is geometric. Perpendicular directions span a plane; parallel directions span only a line.
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.
What happens when we multiply different vectors? Consider two perpendicular unit vectors α1 pointing east and α2 pointing north. From the fundamental rule:
Expanding the left side:
For these to be equal, α1α2 + α2α1 = 0, and therefore:
Perpendicular vectors anticommute: their product changes sign when you swap the order. This property follows inevitably from the fundamental rule.
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.
| Operation | Result |
|---|---|
| Same direction × same direction | Scalar (squared length) |
| Perpendicular × perpendicular | Bivector (oriented plane) |
This is your intuition about area, now built into the algebra.
For two general vectors a and b, the geometric product splits into two parts:
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.
We can continue multiplying. In three dimensions, with basis vectors α1, α2, α3, the product of all three is a trivector:
This represents an oriented volume: the unit cube with a handedness.
In n dimensions we get 2n independent basis elements.
| Grade | Name | Geometric meaning | Count in 3D |
|---|---|---|---|
| 0 | Scalar | Magnitude, point | 1 |
| 1 | Vector | Directed line | 3 |
| 2 | Bivector | Oriented plane | 3 |
| 3 | Trivector | Oriented volume | 1 |
| Total basis elements | 8 |
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.
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.
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.
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:
Consider a displacement in spacetime, dx = α0dt + α1dx + α2dy + α3dz. Its square is:
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.
| Type | Condition | Physical meaning |
|---|---|---|
| Timelike | (dx)² > 0 | Slower than light, massive particles |
| Spacelike | (dx)² < 0 | Faster than light, forbidden for matter |
| Lightlike, null | (dx)² = 0 | Exactly 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.
Rotations become simple. A rotation in the xy-plane is generated by the bivector α12. The rotation of a vector v by angle θ is:
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:
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.
Clifford algebra is built from one idea: vectors square to scalars. From that single rule:
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.
The Velar engine encodes the field equations of physics in this algebra and solves them directly on GPU hardware.