Everyone's introduction to quaternions always has the same math one-liner:

$i^2=j^2=k^2=ijk=-1$

This blog will dive into an issue that has bothered me for years, namely that the line assume the only coordinate system that can be used for quaternions are both normal and orthogonal.  It is the later property that stumped me, and I made a small step forward I will report on.

It is convenient to work in orthonormal coordinates.  Really, really convenient.  Without anyone bothering to state as much explicitly, being orthonormal is assumed.  What happens if the coordinates are neither orthogonal nor are the normal?  Nothing should change but some details.  Either way, so long as the basis spans the space, every point within the space, every function within the space, and every differential or integral equation can be described using the basis.  It is important to know how to get the details right, but there must be a way to do it.  Too bad for me I didn't know it.

Here is a quaternion written with a general basis (the e's):

$V = (t e_0, x e_1, y e_2, z e_3)$

Define a few part, the quaternion scalar and the quaternion vector:

$\\ QScalar(V) = (V + V^*)/2 = (t e_0, 0, 0, 0)\\ \\ QVector(V) = (V + V^*)/2 = (0, x e_1, y e_2, z e_3)$

Please note that the phrase "quaternion scalar" and "quaternion vector" carry no inherent implications for how something transforms under say a Lorentz boost.  The fifth power of a quaternion, V5, also has a quaternion scalar and quaternion vector that together constitute all that is inside a quaternion.  The quaternion scalar is always a real number.  The quaternion vector is always imaginary.  The quaternion vector always has three slots, no more no less.

Quaternions come with a constellation of constraints.  This is why I am not going around calling them 4-vectors which have been discussed recently by David Halliday.  With 4-vectors, there is freedom to use real or complex numbers within the 4-vector.  One gets to decide even if the 4-vector has a dot product.  With quaternions, one must make due with what happens to be there.

To be honest, I really wanted to work with quaternions and metrics to get along with the other much cooler and smarter physics kids.  It looks like I will have to leave metrics behind and make due.

The way to calculate a norm is the same as the complex numbers: form a product of a quaternion with its conjugate, an operation that flips the sign of the quaternion vector but not the quaternion scalar.  Do this for each of element of the basis so see if the norm is equal to one:

\begin{align*} (e_0, 0, 0, 0)^* \times (e_0, 0, 0, 0) &= (e_0, 0, 0, 0) \times (e_0, 0, 0, 0) \\ &= (e_0^2, 0, 0, 0) \\ (0, e_1, 0, 0)^* \times (0, e_1, 0, 0) &= (0, -e_1, 0, 0) \times (0, e_1, 0, 0) \\ &= (e_1^2, 0, 0, 0) \\ (0, 0, e_2, 0)^* \times (0, 0, e_2, 0) &= (0, 0, -e_2, 0) \times (0, 0, e_2, 0) \\ &= (e_2^2, 0, 0, 0) \\ (0, 0, 0, e_3)^* \times (0, 0, 0, e_3) &= (0, 0, 0, -e_3) \times (0, 0, 0, e_3) \\ &= (e_3^2, 0, 0, 0) \\ \end{align*}
[technical note: to ease calculations, the signs used for products will be the same as those in the quaternion definition one-liner, but the magnitudes can be different from unity.]

All the work of being a quaternion is done by the basis.  If the first square equals one, while the others equal minus one, that the basis is normal, otherwise not.

The bigger challenge was to consider non-orthogonal coordinates.  Those are inconvenient so are not used unless absolutely necessary.  I get the impression crystallographers are the only ones that need to confront this issue.  What this means is the basis elements are not at right angles to each other, so moving along one basis element may add or subtract from the values along another basis element. Yuk!  None of my reading on quaternions ever suggested a way to deal with this situation.  All sources I have read so far do the orthonormal one-liner and leave it at that.

I was reminded of the necessity of confronting this issue based on comments recently.  It is one of these issues I mumble to myself a dozen times over periods of time that stretch into years, and then mumbling it again a step appears.  In this case, it is starting with two basis elements that are every bit as orthogonal as everyone else uses, then rotating one basis.  The newly rotated basis will no longer be at a right angle to the other.

The most general rotation will have three separate angles.  I will make the rotation a bit easier by only using one angle like so:

$\\ U = (\cos \alpha, \sin \alpha/\sqrt{3},\sin \alpha/\sqrt{3},\sin \alpha/\sqrt{3}) \\ \\ U^* \times U = (\cos^2 \alpha + 3 (\sin^2 \alpha)/3, \vec{0}) = (1, \vec{0})$

A quaternion vector is rotated by forming a triple product with a unitary matrix, multiplying before by U and after by the conjugate of U, U':

\begin{align*} E \rightarrow E_{rot} &= U \times E \times U^* \\ &= (e_0, \\ &\;\frac{1}{3}(e_1 + e_2 + e_3 +(2 e_1 - e_2 - e_3) \cos 2 \alpha - \sqrt{3} (e_2 - e_3) \sin 2 \alpha),\\ &\;\frac{1}{3}(e_1 + e_2 + e_3 +(2 e_2 - e_3 - e_1) \cos 2 \alpha - \sqrt{3} (e_3 - e_1) \sin 2 \alpha),\\ &\;\frac{1}{3}(e_1 + e_2 + e_3 +(2 e_3 - e_1 - e_2) \cos 2 \alpha - \sqrt{3} (e_1 - e_2) \sin 2 \alpha)) \end{align*}

Sorry I didn't break that calculation into smaller, bite size parts, but at least one can check if it is reasonable.  If alpha is zero, then the sine is zero while the cosine is one.  You can check that the unrotated basis is the same as what one started with.

Take this little algebraic monster and multiply it with a non-rotated basis quaternion.  Since the only term that matters for this discussion is the quaternion scalar, write it down explicitly:

$QScalar[U \times E \times U^* \times E]\\ = (e_0^2 - \frac{1}{3}(e_1^2 + e_2^2 + e_3^2 + 2 e_1 e_2 + 2 e_1 e_3 + 2 e_2 e_3) \\+ (e_1^2 - e_2^2 - e_3^2 - 2 e_1 e_2 - 2 e_1 e_3 - 2 e_2 e_3) \cos 2 \alpha, 0, 0, 0)$

If the angle is zero, then the cross terms all drop, leaving only the squares of the basis elements:

$\\ QScalar[U \times E \times U^* \times E] = (e_0^2 - e_1^2 - e_2^2 - e_3^2, 0, 0, 0) \\ if \;\;\alpha=0$

There are two ways to generalize the result.  One is to use three angles for the rotation instead of one angle.  Every one of these factors will be there, but the coefficients will change.  The results will look more complicated in form, but remain similar in structure.

The other way to generalize this result is to note that both basis quaternions are in the same inertial reference frame.  One needs to accelerate one of the basis quaternions in a general way, then form the product of the boosted and unboosted basis.  Who knows what it will look like, but the question is well-defined.

Doug

Snarky puzzle: Take one basis, boost it along three axes with the same velocity.  Form the product with an unboosted basis.  Report back.

Next Monday/Tuesday: Smore Snarky Puzzle Answers