Quaternions On Reflection
Quaternions On Reflection
Quaternions On Reflection
Scot Parker
June 19, 2016
Abstract
It has been said that quaternions are about rotations, and cant be used for reflections
(mirror images). This becomes an obvious falsity when one realizes that simply conjugating
an ordinary complex number produces its reflection about the real axis. We then develop a
formula for mirroring vectors. We easily equate this with the Argand formula, and prove that
this formula also works for quaternions in general. We start with a brief review of quaternion
algebra in an attempt to make this treatment self-contained
(1)
Now we have three imaginary entities instead of one, i, j, ij k. We know that real numbers
are insufficient; complex numbers are necessary to make polynomials an algebraically closed field.
If we wish to extend this notion further we need to give up an algebraic property. This is readily
accomplished by making i and j non-commutative, and therefore i, j, and k. We are motivated to
complete the multiplication table:
i
j
k
1
i 1
k
?
j
? 1
?
k
?
?
?
The only thing that makes sense group-wise is
i
j
k
1
i 1
k j
j k 1
i
k
j i 1
(2)
The object (1) subject to the above multiplication table is a quaternion, typically represented in
the following form
Q = a + bi + cj + dk
(3)
Where a is the real or scaler part and bi + cj + dk is the imaginary, or vector part
Hamiltons Definition
A quaternion is a number with one real, and three associative, anti-commuting imaginary components, i, j, k, such that
i2 = j 2 = k 2 = ijk = 1
Coordinate notation
The imaginaries i, j, k are commonly associated with the xyz Cartesian axis and so can be written
as x
, y
,
z
The product of two quaternions P and Q is
PQ = (p0 + p1 i + p2 j + p3 k)(q0 + q1 i + q2 j + q3 k) =
(p0 q0 p1 q1 p2 q2 p3 q3 )+
(p0 q1 + p1 q0 + p2 q3 p3 q2 )i+
(p0 q2 + p2 q0 + p3 q1 p1 q3 )j+
(p0 q3 + p3 q0 + p1 q2 p2 q1 )k
In what follows below, we call the boldface numerals 0, 1, 2, 3 individually as pips, or in terms as
singlets. If they are doubled up, as 00, 01, 12, 33 etc., doublets. And groups of three as triplets,
etc. We can subsume p & q in the above and write this in shorthand notation as
PQ = (0 + 1i + 2j + 3k)(0 + 1i + 2j + 3k) =
(00 11 22 33) +
(01 + 10 + 23 32)i+
(02 13 + 20 + 31)j+
(03 + 12 21 + 30)k
This can be written as the product of a single row array. . .
00 11 22 33 01 + 10 + 23 32 02 13 + 20 + 31
with the single column array
1
i
j
k
But its much more convenient to write this as
00 11 22 33
01 + 10 + 23 32
02 13 + 20 + 31
03 + 12 21 + 30
>
1
i
j
03 + 12 21 + 30
To make it even more convenient, we can drop the transpose symbol ( > ) and the column array
on the right, and simply write the product in a shorthand notation as
00 11 22 33
01 + 10 + 23 32
PQ =
02 13 + 20 + 31
03 + 12 21 + 30
To call it a matrix could lead to confusion, so we will call it a product chart. This notation is
entirely context based.
The product of three quaternions can then be written as the chart
000011022033101110123+132202+213220231303312+321330
001+010+023032+100111122133+203+212221+230302+313320331
002013+020+031103112+121130+200211222233+301+310+323332
003+012021+030+102113+120+131201210223+232+300311322333
(4)
Example: lets prove that aba is a vector. We can do this by showing that the top row is zero. We
begin by deleting any triplets which contain a 0;
[123 + 132 + 213 231 312 + 321]
Since a occupies the first and last position in the product aba, the first and third pips commute.
Commuting these if the last pip in the triplet is less than the first, we have
[123 + 132 + 213 132 213 + 123]
This sum is zero, which proves that aba is a vector.
Subscript Notation
It will prove convenient to use subscript notation for the imaginaries as well. For example, we make
the substitution
1 e0 ,
i e1 ,
j e2 ,
k e3
(Note that alternatively, in coordinate notation, we can use x
instead of e )
A quaternions may be then expressed as
Q = q0 e0 + q1 e1 + q2 e2 + q3 e3 =
3
X
q e
=0
Following Einsteins convention, we assume that summations are implied for repeated indices
and write simply,
Q = q e
To indicate terms (no sum), we can write braces around at least one of the subscripts,
q() e()
3
Or simply write
q e
(no sum)
(5)
Where is the binary XOR operator, the indices on the left are not repeated, so are not summed,
so neither are the indices on the right. Equation 5 then answers the question. . .
Why 0, 1, 2, 3? Why not 1, 2, 3, 4?
When we use binary subscripts, the multiplication rule is XOR. To illuminate this fact we can adopt
the notational shorthand. . .
e0 = e00 00,
e1 = e01 01,
e2 = e10 10,
e3 = e11 11
(6)
1
1
1
1
1 1
1 1
=
1 1 1
1
1
1 1 1
The product on the left side of equation 5 can be expressed another way as:
e e =
e
0
[]
2
[]
1
0
0
0
0 1
0
0
=
0
0 1
0
0
0
0 1
0
0
1
0
0
0
0 1
=
1
0
0
0
0
1
0
0
1
[]
3
[]
Notice that,
X
[]
=
0
1
0
1
0
0
=
0
0
0
0
0 1
0
0
0
0
0
1
=
0 1
0
1
0
0
0
0
1
0
1
0
0
0
We re-iterate the product of two quaternions P and Q using the subscript notation
(p0 e0 + p1 e1 + p2 e2 + p3 e3 )(q0 e0 + q1 e1 + q2 e2 + q3 e3 ) =
(p0 q0 p1 q1 p2 q2 p3 q3 )e0 +
(p0 q1 + p1 q0 + p2 q3 p3 q2 )e1 +
(p0 q2 + p2 q0 + p3 q1 p1 q3 )e2 +
(p0 q3 + p3 q0 + p1 q2 p2 q1 )e3
(7)
= p0 q0 pq + q0 p + p0 q + p q
Where the first two terms is the real or scaler part and the last three terms comprise the imaginary
or vector part.
The Conjugate: In similar fashion to ordinary complex numbers we find that
(p0 e0 p1 e1 p2 e2 p3 e3 )(p0 e0 + p1 e1 + p2 e2 + p3 e3 ) =
p20 + p21 + p22 + p23
So we carry forth the same terminology; Given the quaternion
P = p0 e0 + p1 e1 + p2 e2 + p3 e3
we define the conjugate quaternion P as
P = p0 e0 p1 e1 p2 e2 p3 e3
Where the product P P = P P = p20 + p21 + p22 + p23 is always a positive real number
From the above, we are motivated to define the unit quaternion: A is a unit quaternion iff A A = 1.
This also defines the unit vector
If A is a unit quaternion, we will signify with a hat, A.
a as one
in which
a
a = 1. By rights i, j, and k should be written in boldface with hats, but it is not the
usual custom to do so.
Conversion of a Quaternion to an ordinary complex number
Given a quaternion
P = p0 + p1 i + p2 j + p3 k
we form the unit imaginary
p1 i + p 2 j + p 3 k
= p 2
p1 + p22 + p23
Whose square is 1. P can then be expressed as
P = p0 + p
is
The polar form of a unit quaternion A
= cos + (i cos + j cos + k cos ) sin = e
A
Where 2 = 1, = 1, and cos2 + cos2 + cos2 = 1, so the terms in parenthesis is a unit
vector.
, , are the angles between the vector part and the x, y, z, axis, respectively; the cosines of
which are called direction cosines.
Notice that for a unit vector
a
a2 = 1
Binary Products
From 7 we have
PQ = p0 q0 pq + q0 p + p0 q + p q
While
QP = p0 q0 pq + q0 p + p0 q p q
So we are motivated to define the symmetric and antisymmetric products. . .
P Q = 21 (PQ + QP)
P Q = 12 (PQ QP)
Where obviously,
QP=PQ
Q P = P Q
Notice this gives us
PQ = P Q + Q P
QP = P Q Q P
Comment: This notation seems backwards, since the points down (-), and the points up (+),
but the wedge notation is already very well entrenched.
Lets continue. We have. . .
P Q = p0 q0 pq + q0 p + p0 q
PQ=pq
p q = 12 (pq qp) = p q
The symmetric vector product is the negative of the dot or scaler product and the antisymmetric
vector product is also known as the cross product. One should note that the product of two vectors
is not a vector, but a quaternion:
pq = pq + p q
(8)
But as we have previously shown, pqp is a vector. This is essential, as it ensures us that the vector
reflection or rotation of a vector is still a vector.
Polar and Exponential Representations
Let be the unit vector orthogonal to p and q; that is in the direction of p q, and let be the
angle between them. Then equation 8 becomes
So
(9)
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
j=
1
0
0 1
1
0
0
0
0
1
0
0
1
0
1=
0
0
0
1
i=
0
0
0
0
k=
0
1
q0
q1
q2
q3
q1
q0 q3
q2
q2
q3
q0 q1
q3 q2
q1
q0
7
1
0
0
0
0
0
0
0
0 1
1
0
0
0
0 1
1
0
0
0
1
0
0
0
j=
0
1
1
0
i
0
1
k=
1
0
0
i
i
0
(11)
q0 + q1 i
q2 + q3 i
q2 + q3 i
q0 q1 i
(12)
3 = z =
1
0
0 1
Which are not quaternions, since their square is +1. However, they do become exactly the quaternion basis (11) above when we multiply the Paulis by i .
Geometric Representations
Reflections and Rotations in the Argand Plane
i
X0
1
X0
X
To Mirror X about O we
can rotate by , perform
the conjugate, then rotate
back to
X 0 = ei ei X
So,
X 0 = ei X ei = e2i X
This equation reveals an equivalent way to view our expression of reflection; X is reflected about
the real axis, then rotated back by 2 .
We know that in Euclidean 3-space, the line that bisects X and X 0 is really a plane, which is
represented by a vector which is orthogonal to it (of either direction). So in the Argand plane, let
A be a unitary number perpendicular to O, either of
A iei
Our equation of reflection in the Argand plane becomes
X 0 = A2 X
Applying the democratic process we see that there is a contribution from each of A and A (a
couple)
A
X 0 = AX
(13)
We interpret this equation in the following way: X is converted to its default mirror image by
A couple then rotates this mirror image into its expected orientation.
conjugation. The A,
Two Reflections is a Rotation
We can perform another Argand reflection to obtain the equation of rotation
0 B
= B(
AX
A)
B
X 00 = BX
So
A X A B
= e2i() X RX
X 00 = B
2
(X
a
)a
pla
ne
de
fin
e
by
X0
X00
plane defined by b
3 -Vector Reflections/Rotations
a and b
out of the paper, i.e. is a
unit vector in the direction
of
ab
9
(14)
The above formula is perfectly valid for vector reflections, but in the interest of unification, we
compare this with the equation for reflection of complex numbers, equation 13, and we realize that
we may write (14) the same way, i.e.
X0 =
aX
a
As with the Argand plane, the ambiguity of the pair of plane vectors is resolved here. X = X
is an inversion; reflection through a point rather than a plane as in the Argand case. We didnt
directly use this fact in our diagrammatic derivation. Nontheless, we can give our formula the
following interpretation: X is converted to its inversion center (= mirror image) by conjugation.
The
a,
a couple acts on this, rotating it to its expected orientation.
Quaternion Reflections/Rotations
The Validity of equation 13 generally for Quaternions
. . . is shown by taking the reflection of the reflection of X (now a quaternion) . . .
AX
A)
A
=A
A
XA
A
=X
A(
(15)
Rotations
we will arrive at a rotation. To rotate the quaternion
By reflecting X0 by another unit quaternion B
00
0 B
= B(
AX
A)
B
=B
A
XA
B
X00 = BX
(16)
Note that X
a is positive
10