Professional Documents
Culture Documents
Quaternions I
Quaternions I
Part I
Luis Ibanez
August 13, 2001
This document was created using LYX and the LATEX Seminar style.
Introduction
Quaternions are commonly used to represent rotations.
They were introduced by William Hamilton (1805-1865) [1]
Quaternions were conceived as Geometrical Operators
A Complete Calculus of Quaternions was introduced by Hamilton [2]
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q q r r s s
q r s
lim q 0 r 0 s 0 M
dq dr ds
Definition of Vector
q
s
q2
dh
dq
Vector applied dw
to
Point
dx
dy
Given :
Point M and a Vector V
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
Unique Point N
0 r
qrs
r s s
q r s
0 s 0 M
dq dr ds
M
V
N
V
y
h
w
q
s
q2
Quaternion applieddh
to Vector
dq
In the same way, Hamilton wanted
that given
q
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q q r r s s
q r s
lim q 0 r 0 s 0
dq dr ds
Q
V
Quatenion Rationale
A vector is completly defined by
Length
Orientation
In order to define a vector in terms of another vector
a Quaternion has to represent
Relative Length
Relative Orientaton
dq
q dq
q dq 1
dq q dq 1 Definition of Scalar
q dq q dq 1
A Scalar is zdefined
f x as
y
f xthe
y lengths of two PARALLEL vectors A and B
The ratio between
qrs
q q r r s s
q r s
lim q 0 r 0 s 0
dq dr ds
B
A
S = Scale
B
A Scalar S is the Quotient between two PARALLEL vectors A and B
A
S B
dy
dq 1
q dq
q dq 1
1
dq q dqDefinition
of a Versor
q dq q dq 1
A Versor is defined as
z f xy
The quotient between
f xtwo
y non-parallel vectors of EQUAL LENGTH
q r sA
q q r r s s
q r s
lim q 0 r 0 s 0
dq dr ds
10
B
A Versor V is the Geometric Quotient between two non-parallel vectors
of EQUAL LENGTH A and B
A
dx
dy
dq 1
q dq
q dq 1 Right Versors
dq q dq 1
A Right Versor is a Versor that applies a 90 rotation
q dq q dq 1
z f xy
V
f xy
qrs
q q r r s s
q r s
lim q 0 r 0 s 0
dq dr ds
12
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
r 0 s 0
dq dr ds
Composing Versors
A
V3
V2
V2
V1 C
V2 V1 C
V3 C
V1
Versor composition is the
consecutive application of
two versors operators.
C
V3
V2 V1
13
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s B
q r s
0 s 0
dq dr ds
A
A
V V
V V
14
Definition of Quaternion
A
B
A Quaternion is the Geometrical Quotient of two vectors A and B
A
Q B
Quaternion Characteristics
Axis(Q) = Unit Vector perpendicular to the plane of rotation
Angle(Q) = Angle between the vectors in the quotient
Index(Q) = In a Right Quaternion is the Axis(Q) multiplied by the
length ratio of the two vectors in the quotient.
16
Representation of Quaternions
Quaternion = A set of Four
From
the Latin Quaternio
the Greek
The combined operation of Scalar and Versor requires 4 numbers:
1 for Scale
1 for Angle
2 for Orientation (common plane)
Quaternion = Scalar combined with Versor
17
dh
dq
dw
dx
Opposite Quaternions
dy
dq 1
has an Opposite quaternion O Q
q dq The quaternion Q
q dq 1
dq q dq 1
A
A
Q
O
Q
Q
dq q dq 1
B
B
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
A
dq dr ds
B
O(Q)
Q
18
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
A
dq dr ds
Angle O Q
Axis O Q
B
O(Q)
Q
19
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
A
qrs
q r r s s
q r s
0 r 0 s 0
dq dr ds
Reciprocal Quaternions
B
B
The quaternion Q has a Reciprocal
quaternion R Q
R(Q)
Q
RQ
A
Their composition (one quaternion
applied after the other) is
Q RQ
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q q r r s s
q r s
0 r 0 s 0
dq dr ds
dq
dw
dx
Conjugate Quaternion
dy
dq 1
q dq
The geometric reflection of vector
B
q dq 1
B (the denominator) over vector
dq q dq 1
A (the numerator) will be vector
1
q
dq
q
dq
Q
C
z f xy
f xy
C
Given the pair of vectors A and B
qrs
and their quotient
q q r r s s
q r s
A
Q lim q 0 r 0 s 0
B
dq dr ds
21
B
A
Q
dq
q dq
q dq 1
dq q dq 1
q dq q dq 1
Conjugate Quaternion
z f xy
f xy
The Conjugate of Quaternion Q is
C
defined as the quotient K Q
qrs
q
A
K Q
lim qC
q r
0 r
r s s
q r s K(Q)
0 s 0
dq dr ds
Angle Q
Angle K Q
Axis Q
Axis K Q
22
B
A
Q
dw
dx
dy
Norm ofdq
a Quaternion
1
q dq
The Norm is the composition of 1a Quaternion with its Conjugate
q dq
dq q dq 1
N Q
Q K Q
q dq q dq 1
B
A
Q
z f xy
A
f xy
Q
B
N Q
qrs
C
K Q q q r r s s
A
q r s
lim q 0 r 0 s 2 0
A dr ds
dq
A C
C
B
23
K(Q)
dw
dx
dy
dq 1
dq
Norm of qa Quaternion
q dq 1
dq q dq 1
The rotation of the Conjugate
q dqK qQ dq 1
A
compensates the rotation of the
z f xy
quaternion Q.
f xy
K(Q)
qrs
q q r r s s
The operator N Q produce a q r s
limhence
q N0 r
parallel vector,
Q is 0 s 0
dq dr ds
always a positive Scalar operator
24
q2
dh
dq
dw
dx
dy
The Square
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q q r r s s
q r s
q 0 r 0 s 0
dq dr ds
Square of a Quaternion
of a Quaternion is defined as :
Applying the quaternion twice
Q C
Q B
Q C
Q Q C
C
Q Q
Q
25
C
C
q q dq 1
z f xy
f xy
qrs
r s s
q r s
0 s 0
dq dr dsB
D
E
Versor of a Quaternion
Versor of a Vector = Unit vector parallel to the vector
A
U A
A
Versor of a Quaternion = Quotient of the Versors of the vectors
U Q
U A
U B
27
Tensor of a Quaternion
Tensor of a Vector = Length of the vector
T
T Q
28
29
U A
T Q
T Q
U A
U B
U Q
30
dx
dy
dq 1
q dq
q dq 1
Vector - Arcs
dq q dq 1
q dq q dq 1
Versors can be represented on the
z f xy
surface of a unit sphere.
f xy
qrs
A
V
B q q r r s s
q r s
Application of versor V will
lim q 0 r 0 s 0
move point B to point A
dq dr ds
V
A
31
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
r 0 s 0
dq dr ds
Vector arcs can freely slide along the great circle
and still represent the SAME Versor.
32
dx
dy
dq 1
Composition of qBiplanar
Versors
dq
q dq 1
dq q dq 1
A q dq q dq 1
VBA
B
z f xy
A
composed with
f xy
qrs
B
VCB
Cq q r r s s
q r s
results in the versor
lim q 0 r 0 s 0
dq dr ds
A B
A
VCA
B C
C
33
VBA
VCA
B
VCB
dw
dx
dy
Multiplication and Division
dq 1 of Diplanar Versor
q dq
dq 1to define versor operations
The Spherical Triangle ABCqis used
dq q dq 1is used for vector operations
analogously to how the parallelogram
q dq q dq 1
Multiplication of Versors as
z f xy
A
f xy
VCA VBA VCB
VBA
qrs
q q r r s s
Division of Versors as
q r s
V
VBA
lim qVCA
0 r 0 s 0
CB
like the difference of vectors dq dr ds
like the sum of vectors
34
VCA
B
VCB
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
A
q r s
r 0 s 0
dq dr ds
C
A
A
C
35
dw
dx
dy
dq 1
q dq
Composition of two Orthogonal
Right Versors
q dq 1
dq q dq 1
The multiplication of twoq dq q dq 1
A
orthogonal Right Versors produce
z af x y
Right Versor orthogonal to them f x y
36
w
q
s
q2
dh
dq
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q q r r s s
q r s
im q 0 r 0 s 0
dq dr ds
i i=i
37
i = 1
1 Operator
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
0 s 0
dq dr ds
Elementary Versors
Composition of Elementary Versors
j
right-hand
i
k
38
self
i j
i i
j k
j j
k i
k k
dh
dq
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
r 0 s 0
dq dr ds
S<1
S=1
S>1
39
Sum of Versors
Versors are Quotients.
They can be summed ONLY when they have
a COMMON DENOMINATOR
VBC
VBA
C
B
A
B
VBC
VBA
A
B
40
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
dq dr ds
B
VBA
D
A
VDC
C
VBA
VDC
41
C
D
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s A
q r s
0 r 0 s 0
dq dr ds
B
B
A
C
Until their origins coincide
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
dq dr ds
In order to get a common denominator
43
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
dq dr ds
Finally get the new Quotient
44
dq
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
0 s 0
dq dr ds
H/2 H/2
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
0 s 0
dq dr ds
H/2 H/2
H/2
H/2
46
q2
dh
dq
dw
dx
dy
dq 1
q dq
q dq 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
r 0 s 0
dq dr ds
S<1
S=1
S>1
dq
dw
dx
Right Versor in terms of Orthogonal Right Versor
dy
dq 1
If the three Orthogonal Right Versors i j k are multiplied by Scalars x y z
q dq
q dq 1 Q x i y j z k
x2 y2 z2 1
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
q r r s s
q r s
0 r 0 s 0
dq dr ds
dy
dq 1
q dq
q dq 1
dq q dq 1
1
Scalarqand
of Quaternions
dqRight
q dqParts
z f xy
A Quaternion operator
f x y applied to a vector B
performs an operation that
produces another vector A
qrs
A
Q q q r r s s
B
q r s
lim q 0 r 0 s 0
dq dr ds
A Q B
49
A
Q
B
q dq
q dq 1
f xy
f xy
qrs
r s s
q r s B R
0 s 0
dq dr ds
BS
BR
BS
50
q dq 1
z f xy
f xy
qrs
r s s
q r s
0 s 0
dq dr ds
A
BR
B
BS
B S is obtained by applying
an Scalar Operator to B
B R is obtained by applying
a Right Quaternion to B
51
q dq
dq q dq 1
dq q dq 1
z f xy
f xy
qrs
r r s s
q r s
r 0 s 0
dq dr ds
A
V
T
BT
B
BT
52
BT
BT
53
dq q dq 1
1
qQuaternions
dq q dq
as Four Coefficients
z f xy
f between
x y vectors A and B is L
Let L be the Ratio of lenghts
The Scalar factor
qrs
q qBrS r s s
S
q r s B R
B
lim q should
0 be
requal to0 s 0
dq dr ds
L cos
54
A
B
BS
dq q dq 1
1
qQuaternions
dq q dq
as Four Coefficients
z f xy
f between
x y vectors A and B is L
Let L be the Ratio of lenghts
The Tensor of he Right part
qrs
q qBrR r s s
R
q r s B R
B
lim q should
0 be
requal to0 s 0
dq dr ds
L sin
55
A
B
BS
xi
yj
zk
Where
x2
y2
L cos
z2
L sin
yj
56
Product of Quaternions
Two quaternions Q1 and Q2 are composed by
Q1 Q2
T Q1 U Q1
T Q2 U Q2
That is equivalent to
Q1 Q2
T Q1 T Q2 U Q1
57
U Q2
Product of Quaternions
Given a Quaternion Q resulting from the composition
Q
Q1 Q2
Its Tensor is
T Q
T Q1 T Q2
Its Versor is
U Q
U Q1
58
U Q2
xp i
yp j
zp k
wp
xq i
yq j
zq k
wq
P Q
LPQ
wp
zp
zp
wp
xp
yp
xp
yp
59
yp
xp
xq
xp
yp
yq
wp
zp
zq
zp
wp
wq
xp i
yp j
zp k
wp
xq i
yq j
zq k
wq
P Q
RQP
wq
zq
zq
wq
yq
xq
60
yq
xq
xp
xq
yq
yp
xq
wq
zq
zp
yq
zq
wq
wp
q v q
x2
y2
2xy
2wz
2xz
2wy
0
z2
2xy
w2
2wz
x2
y2
2yz
z2
w2
2wx
0
2xz
2wy
2yz
2wx
x2
y2
0
61
z2
0
w2
x2
y2
z2
References
[1] W.R. Hamilton. Elements of Quaternions, volume I. Chelsea
Publishing Company, third edition, 1969. The original was published
in 1866.
[2] C.J. Joly. A Manual of Quaternions. MacMillan and Co., Limited,
1905.
62