Relativistic Quaternions

Eric Lengyel   •   December 24, 2024

In relativity, physical quantities in 3D space like position and velocity pick up an extra coordinate in time. A position \((x, y, z)\) in space becomes \((ct, x, y, z)\) in spacetime, where \(c\) is the speed of light. A velocity \((u_x, u_y, u_z)\) in space becomes \((\gamma c, \gamma u_x, \gamma u_y, \gamma u_z)\) in spacetime, where \(\gamma\) is given by

\(\gamma = \dfrac{dt}{d\tau} = \dfrac{1}{\sqrt{1 - u^2/c^2}}\)

and accounts for things like time dilation between coordinate time \(t\) and proper time \(\tau\). There are other types of quantities like angular momentum and the electromagnetic field that become six-component quantities in spacetime, but we’re not going to talk about those right now. The goal of this post is to explore the correct way to apply quaternions and dual quaternions in a relativistic setting.

A proper understanding of quaternions in relativity, even for nothing more than basic rotations about the origin, requires that we work in the five-dimensional projective geometric algebra \(\mathbb R(3,1,1)\). This algebra takes the 4D rigid geometric algebra \(\mathbb R(3,0,1)\) and adds a time dimension. There are five vector basis elements \(\mathbf e_0\), \(\mathbf e_1\), \(\mathbf e_2\), \(\mathbf e_3\), and \(\mathbf e_4\), where the vectors \(\mathbf e_1\), \(\mathbf e_2\), and \(\mathbf e_3\) correspond to 3D space with \(\mathbf e_i \cdot \mathbf e_i = +1\) for \(i = 1,2,3\), the vector \(\mathbf e_0\) corresponds to time with \(\mathbf e_0 \cdot \mathbf e_0 = -1\), and the vector \(\mathbf e_4\) is the projective dimension with \(\mathbf e_4 \cdot \mathbf e_4 = 0\). This means that our metric tensor \(\mathfrak g\) looks like

\(\mathfrak g = \begin{bmatrix} -1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ \end{bmatrix}.\)

There are 32 total basis elements in the exterior algebra of \(\mathbb R(3,1,1)\). Half of them are the 16 basis elements from \(\mathbb R(3,0,1)\), and the other half are those 16 basis elements multiplied by the time direction \(\mathbf e_0\). All of the operators in \(\mathbb R(3,0,1)\) are multiplied by \(\mathbf e_0\) when we transfer them to \(\mathbb R(3,1,1)\) because time is an invariant of any rigid spatial motion.

Using the basis vectors of \(\mathbb R(3,1,1)\), the spacetime position r of a particle is expressed as

\(\mathbf r = ct\,\mathbf e_0 + x\,\mathbf e_1 + y\,\mathbf e_2 + z\,\mathbf e_3 + \mathbf e_4\),

and its velocity u is expressed as the derivative with respect to proper time \(\tau\), given by

\(\mathbf u = \dfrac{d\mathbf r}{d\tau} = \gamma c\,\mathbf e_0 + \gamma\dot x\,\mathbf e_1 + \gamma\dot y\,\mathbf e_2 + \gamma\dot z\,\mathbf e_3\),

where a dot above a variable means derivative with respect to coordinate time \(t\).

In the projective spacetime algebra \(\mathbb R(3,1,1)\), a conventional quaternion \(\mathbf q = q_x\,\mathbf i + q_y\,\mathbf j + q_z\,\mathbf k + q_w\) is represented by the motion operator

\(\mathbf q = q_x\,\mathbf e_{410} + q_y\,\mathbf e_{420} + q_z\,\mathbf e_{430} + q_w\,\unicode{x1D7D9}\),

and a position r (or any other quantity) is transformed by the sandwich product \(\mathbf q \mathbin{\unicode{x27C7}} \mathbf r \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{q}}},\) using the geometric antiproduct just as it would be in \(\mathbb R(3,0,1)\).[1] Such a quaternion can also be expressed as[2]

\(\mathbf q(\tau) = (a_x\,\mathbf e_{410} + a_y\,\mathbf e_{420} + a_z\,\mathbf e_{430})\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) + \unicode{x1D7D9}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right)\),

where \(\mathbf a = (a_x, a_y, a_z)\) is the unit-length axis of rotation, and \(\dot\phi = d\phi/dt\) is the angular velocity.

The quaternion \(\mathbf q(\tau)\) performs a rotation about the axis a in space, but it has no effect on time coordinates, so the rotation happens instantaneously. This can’t represent a physical motion because the object being rotated must arrive at its new orientation at some point in the future. To make this physical, we need to combine the quaternion with a temporal translation.

A general translation through spacetime is performed by the motion operator

\(\mathbf T(\tau) = \dfrac{1}{2}\gamma\tau\,(-c\,\mathbf e_{321} + \dot x\,\mathbf e_{230} + \dot y\,\mathbf e_{310} + \dot z\,\mathbf e_{120}) + \unicode{x1D7D9}\).

Notice that the trivector part of this operator is \(\frac{1}{2}\tau (\mathbf e_4 \wedge \mathbf u)^\unicode{x2606}\) for a four-velocity u, where the dualization applies the metric and causes the temporal component to be negated. To translate through time but not space, we need only the \(\mathbf e_{321}\) term, so the operator for a purely temporal translation is simply

\(\mathbf S(\tau) = \unicode{x1D7D9} - \dfrac{1}{2}\gamma c\tau\,\mathbf e_{321}\).

When we multiply this by the quaternion \(\mathbf q(\tau)\), we obtain a motion operator that performs both a rotation in space and a translation in time. (The two operators commute, so the order of multiplication doesn’t matter.) The combined operator is given by

\(\mathbf Q(\tau) = \mathbf q(\tau) \mathbin{\unicode{x27C7}} \left(\unicode{x1D7D9} - \dfrac{1}{2}\gamma c\tau\,\mathbf e_{321}\right)\),

and this expands to

\(\begin{align} \mathbf Q(\tau) &= (a_x\,\mathbf e_{410} + a_y\,\mathbf e_{420} + a_z\,\mathbf e_{430})\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) + \unicode{x1D7D9}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) \\ &- \dfrac{1}{2}\gamma c\tau(a_x\,\mathbf e_1 + a_y\,\mathbf e_2 + a_z\,\mathbf e_3)\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) - \dfrac{1}{2}\gamma c\tau\,\mathbf e_{321}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right). \end{align}\)

If we set \(\tau = t/\gamma\) for some time \(t\), then the sandwich product \(\mathbf Q(\tau) \mathbin{\unicode{x27C7}} \mathbf r \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}(\tau)\) rotates the position r through the angle \(\dot\phi t\) in space and adds \(ct\) to its time coordinate. This is our relativistic quaternion, and it’s an operator with eight components that we can write generically as

\(\mathbf Q = q_x\,\mathbf e_{410} + q_y\,\mathbf e_{420} + q_z\,\mathbf e_{430} + q_w\,\unicode{x1D7D9} + s_x\,\mathbf e_1 + s_y\,\mathbf e_2 + s_z\,\mathbf e_3 + s_w\,e_{321}\).

These eight components are not independent because each of the four \(s\) coordinates is just a copy of a corresponding \(q\) coordinate multiplied by \(-\frac{1}{2}\gamma c\tau\), so we haven’t added any new degrees of freedom.

The operator \(\mathbf Q\) is equivalent to the \(5 \times 5\) matrix \(\mathbf m\) given by

\(\mathbf m = \begin{bmatrix} 1 & 0 & 0 & 0 & -2(q_x s_x + q_y s_y + q_z s_z + q_w s_w) \\ 0 & 1 - 2q_y^2 - 2q_z^2 & 2(q_x q_y - q_w q_z) & 2(q_z q_x + q_w q_y) & 0 \\ 0 & 2(q_x q_y + q_w q_z) & 1 - 2q_z^2 - 2q_x^2 & 2(q_y q_z - q_w q_x) & 0 \\ 0 & 2(q_z q_x - q_w q_y) & 2(q_y q_z + q_w q_x) & 1 - 2q_x^2 - 2q_y^2 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix}\),

and the sandwich product \(\mathbf Q \mathbin{\unicode{x27C7}} \mathbf r \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}\) is equivalent to the matrix product \(\mathbf{mr}\), treating \(\mathbf r\) as a column vector.[3] The middle \(3 \times 3\) portion of this matrix performs the conventional quaternion motion in space, and the upper-right entry performs the temporal translation. The sandwich product \(\mathbf Q \mathbin{\unicode{x27C7}} \mathbf x \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}\) not only transforms position vectors but any multivector \(\mathbf x\) in the entire algebra. The matrix equivalents that transform bivectors, trivectors, and quadrivectors are given by the second, third, and fourth compound matrices of \(\mathbf m\).

A dual quaternion performs a general rigid motion in 3D space, and it has an eight-component representation in \(\mathbb R(3,0,1)\). In the projective spacetime algebra \(\mathbb R(3,1,1)\), a dual quaternion becomes the motion operator[4]

\(\mathbf d(\tau) = \boldsymbol l\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) + \unicode{x1D7D9}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) - \left(\dfrac{1}{2}\gamma\tau\dot\delta\,\boldsymbol l^\unicode["segoe ui symbol"]{x2606} \wedge \mathbf e_0\right)\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) - \dfrac{1}{2}\gamma\tau\dot\delta\,\mathbf e_0 \sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right)\).

Here, \(\boldsymbol l\) is an arbitrary unitized line that may not contain the origin, \(\dot\phi\) continues to be the angular velocity, and \(\dot\delta = d\delta/dt\) is the rate of displacement along the axis of rotation. When \(\dot\delta = 0\), the last two terms vanish, and when the line \(\boldsymbol l\) also passes through the origin, the dual quaternion \(\mathbf d(\tau)\) reduces to the quaternion \(\mathbf q(\tau)\).

As before, the dual quaternion \(\mathbf d(\tau)\) performs an instantaneous motion under the sandwich product \(\mathbf d \mathbin{\unicode{x27C7}} \mathbf r \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{d}}}\), so we again need to combine it with the temporal translation \(\mathbf S(\tau)\) to produce a physical motion given by

\(\mathbf D(\tau) = \mathbf d(\tau) \mathbin{\unicode{x27C7}} \left(\unicode{x1D7D9} - \dfrac{1}{2}\gamma c\tau\,\mathbf e_{321}\right)\).

Expanding this product, we can write

\(\begin{align}\mathbf D(\tau) &= \boldsymbol l\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) + \unicode{x1D7D9}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) - \left(\dfrac{1}{2}\gamma\tau\dot\delta\,\boldsymbol l^\unicode["segoe ui symbol"]{x2606} \wedge \mathbf e_0\right)\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) - \dfrac{1}{2}\gamma\tau\dot\delta\,\mathbf e_0 \sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) \\ &- \dfrac{1}{2}\gamma c\tau \left[\boldsymbol l\sin\left(\dfrac{1}{2}\gamma\tau\dot\phi\right) + \unicode{x1D7D9}\cos\left(\dfrac{1}{2}\gamma\tau\dot\phi\right)\right] \vee \mathbf e_{321}. \end{align}\)

This is our relativistic dual quaternion, and it has picked up the same additional four components that we got for the quaternion \(\mathbf Q(\tau)\). The 12 components can be written generically as

\(\begin{align} \mathbf D &= q_x\,\mathbf e_{410} + q_y\,\mathbf e_{420} + q_z\,\mathbf e_{430} + q_w\,\unicode{x1D7D9} + m_x\,\mathbf e_{230} + m_y\,\mathbf e_{310} + m_z\,\mathbf e_{120} + m_w\,\mathbf e_0 \\[1ex] &+ s_x\,\mathbf e_1 + s_y\,\mathbf e_2 + s_z\,\mathbf e_3 + s_w\,e_{321}.\end{align}\)

Each of the four \(s\) coordinates is a copy of a corresponding \(q\) coordinate multiplied by \(-\frac{1}{2}\gamma c\tau\) in the same way that it was for the quaternion \(\mathbf Q(\tau)\).[5]

The bulk norm of a relativistic dual quaternion is given by

\(\left\Vert\mathbf D\right\Vert_\unicode["segoe ui symbol"]{x25CF} = \sqrt{\mathbf D \mathbin{\unicode["segoe ui symbol"]{x2022}} \mathbf D \vphantom{s_y^2}} = \sqrt{s_x^2 + s_y^2 + s_z^2 + s_w^2 - m_x^2 - m_y^2 - m_z^2 - m_w^2}\),

where \(\mathbin{\unicode["segoe ui symbol"]{x2022}}\) is the inner product induced by the metric tensor \(\mathfrak g\). Assuming that \(\mathbf D\) is unitized, which means \(q_x^2 + q_y^2 + q_z^2 + q_w^2 = 1\) in this case, we know that \(m_x^2 + m_y^2 + m_z^2 + m_w^2\) is the square of half the distance that a particle starting at the origin gets moved through space when it’s transformed by \(\mathbf D\).[6] Since the \(s\) coordinates are just multiples of the \(q\) coordinates, we have

\(s_x^2 + s_y^2 + s_z^2 + s_w^2 = \dfrac{1}{4}\gamma^2 c^2\tau^2\),

which is the square of half the distance that a particle gets moved through time. For a physically possible motion in which a particle starting at the origin moves to a new location at less than the speed of light, the distance it is moved through time by a relativistic dual quaternion \(\mathbf D\) must be greater than the distance it is moved through space. This is nicely captured by the requirement that the bulk norm \(\left\Vert\mathbf D\right\Vert_\unicode["segoe ui symbol"]{x25CF}\) has a real value.

When \(\dot\phi = 0\), there is no rotation, and the dual quaternion \(\mathbf D(\tau)\) reduces to a translation operator having exactly the form of the operator \(\mathbf T(\tau)\) introduced earlier in this post. Taking the bulk norm, we have

\(\left\Vert\mathbf T(\tau)\right\Vert_\unicode["segoe ui symbol"]{x25CF} = \dfrac{1}{2}\gamma\tau \sqrt{c^2 - \dot x^2 - \dot y^2 - \dot z^2}\),

and this makes it a lot more obvious that a real bulk norm corresponds to a subluminal velocity. Setting \(dt = \gamma\tau\), \(dx = \dot x\,dt\), \(dy = \dot y\,dt\), and \(dz = \dot z\,dt\), we can rewrite this as

\(\left\Vert\mathbf T(\tau)\right\Vert_\unicode["segoe ui symbol"]{x25CF} = \dfrac{1}{2} \sqrt{c^2\,dt^2 - dx^2 - dy^2 - dz^2}\).

This spacetime interval is a Lorentz invariant having the same value for all inertial observers. Interestingly, the \((+,-,-,-)\) signature has appeared in the bulk norm despite the fact that we are using the \((-,+,+,+)\) signature in our metric tensor \(\mathfrak g\). The appropriate change in signature arises naturally within the algebra to give us real values for physically meaningful quantities.

Notes

[1] As discussed in PGA Illuminated, Section 3.9.3, quaternions have two representations in projective geometric algebra. In the case of \(\mathbb R(3,1,1)\), we could also express a quaternion as \(\mathbf q = q_w\mathbf 1 - q_x\,\mathbf e_{23} - q_y\,\mathbf e_{31} - q_z\,\mathbf e_{12}\), and it would transform a position r with the sandwich product \(\mathbf q \mathbin{\unicode{x27D1}} \mathbf r \mathbin{\unicode{x27D1}} \mathbf{\tilde q}\). However, this form of a quaternion does not belong to the Poincaré group containing the temporal translations that we need.

[2] This is the exponential \(\mathbf q(\tau) = \exp_\unicode{x27C7}\left(\frac{1}{2}\gamma\tau\dot\phi\,\boldsymbol l\right)\), where \(\boldsymbol l = a_x\,\mathbf e_{410} + a_y\,\mathbf e_{420} + a_z\,\mathbf e_{430}\) is a line containing the origin.

[3] If you’re familiar with how 4D homogeneous coordinates represent points in 3D space, then you can think of this matrix as operating on 5D homogeneous coordinates representing points in 4D spacetime.

[4] This is the exponential \(\mathbf d(\tau) = \exp_\unicode{x27C7}\left[\frac{1}{2}\gamma\tau(\dot\delta \mathbf e_0 + \dot\phi{\large\unicode{x1D7D9}}) \mathbin{\unicode{x27C7}} \boldsymbol l\right]\), where \(\boldsymbol l\) is an arbitrary unitized line. The expanded operator is equivalent to Equation (3.93) in PGA Illuminated, multiplied by \(\mathbf e_0\), where \(\phi\) and \(\delta\) have been replaced by rates \(\frac{1}{2}\gamma\tau\dot\phi\) and \(\frac{1}{2}\gamma\tau\dot\delta\).

[5] The set of 12-component relativistic dual quaternions \(\mathbf D(\tau)\) is closed under the geometric antiproduct. We get the complete set of 16-component motion operators in \(\mathbb R(3,1,1)\) when we add Lorentz boosts to the mix, but that’s a story for another time.

[6] See PGA Illuminated, Section 3.6.1.

Additional Resources