TUTORIAL on QUATERNIONS
Part II
Luis Ibáñez
August 13, 2001
This document was created using LYX and the LATEX Seminar style.
1
Contents
Differentials of Quaternions
Developments of Functions of Quaternions
2
Differentials of Quaternions
The difficult point in defining Differentials over Quaternions is
Lack
of the Conmutative Property.
P Q Q P
3
Adopted Definition
Following Newton’s definition of Fluxions
Hamilton [2] defined Simultaneous Differentials as
Limits of Equi-multiples of
Simultaneous and Decreasing Differences.
4
What it means ?
Given a system of connected Quaternions
q r s
the symbols
q r s
represent their Simultaneous Differences
5
What it means ?
The sums
q q r r s s
are a New system of Quaternions
satisfying the Same Laws of connexion as the Old system.
6
dq q dq 1
q dq q dq 1
p q
p q
u v
u va What it means ?
r α
z f xy
The differences ∆q ∆r ∆s start at an arbitrary size
f xy
θ
∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
7
dq q dq 1
q dq q dq 1
p q
p q
u v
u va What it means ?
r α
z f xy
Then, they are simultaneously decreased by a factor
f xy
θ
∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
8
dq q dq 1
q dq q dq 1
p q
p q
u v
u va
What it means ?
r α
z f Integer
x y multiples of the new differences are considered
f xy
2x 3x
θ
1x
∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
9
dq q dq 1
q dq q dq 1
p q
p q
u v
u va
What it means ?
r α
z f xy ...the factor is further decreased
f xy
3x
θ
2x
1x
∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
10
dq q dq 1
q dq q dq 1
p q
p q
u v
u va What it means ?
r α
z f xy ...and decreased...
f xy
θ
3x
2x
1x ∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
11
dq q dq 1
q dq q dq 1
p q
p q
u v
u va What it means ?
r α
z f xy
...and decreased...
f xy
θ 3x
2x
1x ∆q ∆r ∆s
m ∆q 0 ∆r 0 ∆s 0
dq dr ds q r s q ∆q r ∆r s ∆s
12
dq q dq 1
q dq q dq 1
p q
p q
u v
u va What it means ?
r α
z f xy
...and taken to the limit !
f xy
θ
3x
2x
∆q ∆r ∆s 1x dq dr ds
m ∆q 0 ∆r 0 ∆s 0
qrs q ∆q r ∆r s ∆s
13
Definition Revisited
If all the multiples n∆ converge to the same value
when the factor ∆ is decreased,
Then the Limit of ∆ ’s exist and they are called
Simultaneous Differentials
dq dr ds
Again....
Limits of Equi-multiples of
Simultaneous and Decreading Differences.
14
q q dq 1
q q dq 1
p q
p q Consequence of this Definition
u v
u va The Surface Differentials of this black Rectangle w h
r α
z f xy
f xy
dh
θ
qrs
dS w dh h dw
∆r s ∆s
∆q ∆r ∆s h
0 ∆s 0
dq dr ds w dw
is the sum of shaded rectangles at the sides h dw and w dh
15
Lies my Calculus Teacher told me...
Differentials are infinitesimally small...
16
The Truth is
What they have to be is linearly related
dS h dw w dh
NOT because
dw dh 0
BUT because
dw dh
is NOT LINEAR with respect to a factor applied
simultaneously to dh, dw and dS
17
dq q dq 1
q dq q dq 1
p q
p q
Differentials as Linear Approximations
u v
u va
Differentials don’t need to be SMALL
r α
z f xy They are a LINEAR APPROXIMATION [1].
f xy
θ dy
qrs
q ∆q r ∆r s ∆s
∆q ∆r ∆s
im ∆q 0 ∆r 0 ∆s 0
dq dr ds dx
dy A dx B
18
dw
dx
dy
dq 1
q dq
q dq 1 Differentials as Linear Approximations
dq q dq 1
q dq q dq 1
In ap 2D
q function z f xy the Linear Approximation is a Plane.
p q
u v
u va
r α
z f xy
f xy
θ
qrs
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0 y
dq dr ds x
19
dq
dw
dx
dy
dq 1
q dq Differentials as Linear Approximations
q dq 1
dq q dq 1
q dq q dq 1
p q dz A dx B dy C
p q
u v
u va
r α
z f xy
f xy
θ
qrs
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0 y
dq dr ds x
20
Differentials as Linear Approximations
The Differentials
dx dy dz
Can be as Large as you want
but
They have to be related by a Linear Equation
21
Differential of Functions of Quaternions
Let Q be a Function of the Quaternion variables q, r,...
Q F qr
and let
dq dr
be any Simultaneous Differentials of q, r, ...
22
Differential of Functions of Quaternions
The Simultaneous Differential of function Q is
dq dr
dQ lim n F q r F qr
n ∞ n n
where n
is an integer multiple of a particular real value.
23
Differentials in one Dimension
The well known equation
df x f x h f x
lim
dx h 0 h
Expressed according to the new definition
dx
df x lim n f x f x
n ∞ n
24
Example
2
f x x
2
dx 2
df x lim n x x
n ∞ n
2 dx dx 2
df x lim n x 2x x2
n ∞ n n2
dx 2
df x lim 2 x dx 2 x dx
n ∞ n
25
Differential of a Function of One Variable
The Differential dx is like another variable
df x g x dx
for example, given
f x x2
the differential is a function of Two Independent Variables x and dx
df x g x dx 2 x dx
26
Differentials of Functions of Quaternions
Quaternions composition (multiplication) is NOT commutative
f q q2 q q
The differential
2
dq 2
df q lim n q q
n ∞ n
Results in
df q q dq dq q
27
Differentials of Functions of Quaternions
The Quotient
df q 1
df q dq
dq
For the current example f q q2
df q 1 1
q dq dq dq q dq
dq
df q 1
q dq q dq
dq
Which is a function of q and dq
28
Comparison with Traditional Differentials
Function Quotient of Differentials
df x
Scalars f x x2 dx 2x
df q
Quaternions f q q2 dq q dq q dq 1
The Quotient of Quaternion Differentials is a new Function
of TWO INDEPENDENT variables :
q and dq
29
q dq q dq
p q
p q
u v Geometric Interpretation of the
u va Differential of the Square Function
r α
z f xy
q
f xy q C
q2
θ q dq
B
qrs s
q
∆q r ∆r s ∆s
∆q ∆r ∆s A
0 ∆r 0 ∆s 0
dq dr ds
q A B
q2 A q dq dq
B C C s 1
q q
a variation in q is represented by the Differential dq
30
q dq q dq 1
p q
p q
u v Geometric Interpretation of the
u va Differential of the Square Function
r α
z f xy
f xy q
q dq
θ
qrs s s
∆q r ∆r s ∆s
S
∆q ∆r ∆s
∆r 0 ∆s 0
dq dr ds
In order to find the Differential dq, the vector S corresponding to
the chord of Vector-Arc s is taken and shifted to the origin of the sphere.
31
q dq q dq
p q
p q
u v Geometric Interpretation of the
u va Differential of the Square Function
r α
z f xy
A A
f xy
dq
θ
qrs s S dq
∆q r ∆r s ∆s
∆q ∆r ∆s S
0 ∆r 0 ∆s 0
dq dr ds
The Quotient between vectors
S
S and A is the Quaternion dq dq
A
32
dq q dq 1
p q
p q
Geometric Interpretation of the
u v
Differential of the Square Function
u va
r α
z f xy
q dq
f xy A
dq
θ
1
qrs q
q r ∆r s ∆s dq
q 1
dq
∆q ∆r ∆s 1
∆r 0 ∆s 0
dq q dq 1
dq dr ds
q is composed with dq 1 by The resulting Vector-Arc q dq 1
forming a spherical triangle with can be further composed with dq
their corresponding Vector-Arcs by using another spherical triangle.
33
p q
p q Geometric Interpretation of the
u v Differential of the Square Function
u va
r α
z f xy
f xy
θ
qrs 1
1
q r ∆r s ∆s dq dq
q q
∆q ∆r ∆s dq dq
r 0 ∆s 0 q dq q dq 1
dq dr ds q q
The sum of q and dq q dq 1 is performed by finding first a common
denominator vector, then adding the two vector in the numerator.
34
Sum of Reciprocals (a property)
1 1
Rq q
q
1 1 1 1
R p Rq p q
p q
1 1 1 1 1 1 1 1
q p p q
p q q p q p q p
1 1 1 1
p q
p q q p
35
Differential of the Reciprocal
1
f q Rq q
1
dq 1
df q lim n q q
n ∞ n
1
dq dq 1
df q lim n q q q q
n ∞ n n
1 1 1 1
df q q dq q q dq q
36
Comparison with Traditional Differentials
Function Quotient of Differentials
1 df x 2
Scalars f x x dx x
1 df q 1 1 1
Quaternions f q q dq q dq q dq
The Quotient of Quaternion Differentials is a new Function
of TWO INDEPENDENT variables :
q and dq
37
Quotient of Differentials
The Quotient between two Differentials can be separated in
Tensor and Versor parts
df q T df q U df q
dq T dq U dq
The Differentials d f q and dq are Equi-Multiples,
so scaling dq will scale d f q by the same factor.
Quotients of Differentials are Invariant to Scale changes in their Tensors
38
Quotient of Differentials
In the example f q q2
The Quotient of Differentials
df q 1
q dq q dq
dq
Can be reduced to
df q 1
q U dq q U dq
dq
That only depends on dq ’s Direction represented by the Versor U dq
39
Partial Differentials
Given a function of several quaternion variables
Q f qrs
Its Differential satisfies
dQ dq Q dr Q ds Q
each Partial Differential dx Q is obtained by differentiating
with respect to x as if the other variables were constant.
40
Succesive Differentials
For example, given the Quaternion function
f q q2 q q
The first Differential is
df q q dq dq q
Taking the Differential of this last expression,
where q and dq are considered as two independent variables
d2 f q dq dq q d2q d2q q dq dq
41
Successive Differentials
The Second Differential of
f q q2
is then reduced to
d2 f q q d2q d2q q 2 dq dq
Which is a function of THREE independent Quaternion variables
q dq d 2 q
None of them necessarily SMALL
42
Taylor’s Series Extended to Quaternions
Having that
dm f q d dm 1
f q
The Taylor’s Series Expansion can be applied to functions of Quaternions
df q d2 f q d3 f q d4 f q
f q dq f q
1! 2! 3! 4!
Where f q dq will be a function of q dq d 2 q d 3 q Quaternion
variables NOT necessarily SMALL
43
Taylor’s Series Approximation
The Tensor of the Quaternion Variables
q dq d 2 q d 3 q
can be scaled by a Scalar factor x to produce an Approximation
x x2 2 x3 3
Fx f q xdq f q df q d f q d f q
1! 2! 3!
44
dq q dq
q dq q dq 1
Operations
p q in Versor Space
u v
u va
Composition of Versors is equivalent to
r α
z f xy
f xy
q
θ p q
qrs
q ∆q r ∆r s ∆s
p
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
sum of their Vector-Arcs on the Unit Sphere Surface.
This is a Non-Commutative operation
45
dx
dy
dq 1
q dq
q dq 1 Operations in Versor Space
dq q dq 1
q dq q dq 1
p q Increments of Versor’s Angle is equivalent to Exponentiation
p q
for example, in order to double the angle
u v
u va the versor is applied twice, which is q q q2
r α
z f xy
f xy
θ
qrs
q ∆q r ∆r s ∆s q q
q q q1 2
∆q ∆r ∆s
0 ∆r 0 ∆s 0 q2 q1 5
dq dr ds
Like in Complex numbers
eiθ cosθ isinθ
46
q dq 1
dq q dq 1
dq q dq 1
p q Operations in Versor Space
u v Subtraction of Vector-Arcs is equivalent to
u va
a Quotient of Versors
r α
z f xy p 1
p q
f xy q
q
θ p
qrs p 1
q p q q
q r ∆r s ∆s q
p q
∆q ∆r ∆s p q 1
q
∆r 0 ∆s 0
p
dq dr ds
47
dq q dq
dq q dq 1
p q
Versor Spherical Linear Interpolation
u v
u va
Sperical Linear Interpolation (Slerp)
z f xy α
p
q 1 r α q
f xy q
q
θ p
qrs p q r 0 q
q r ∆r s ∆s r 1 p
∆q ∆r ∆s r α
α 01
∆r 0 ∆s 0
dq dr ds
The Quotient qp produce the Quaternion that relates p with q.
Exponent α allows to regulate how much of this Quotient is applied
48
dq q dq 1
q dq q dq 1
p q
Optimization
p q of Versor Functions
u v
u v a of Quaternions is restricted to Versors
If the Space
r α
z f xy
f xy q
B
θ
qrs
q ∆q r ∆r s ∆s A
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
The only valid operations are those that keep the end of vectors
in the surface of the Unit Sphere
49
dq q dq 1
q dq q dq 1
p q
Optimization
p q of Versor Functions
u v
a
u vThe Versor Space is a 2D Space
r α
z f xy
f xy
q
θ
qrs
q ∆q r ∆r s ∆s
u v
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
In order to enforce that Variations of a Versor result in another versor,
the only valid operations are compositions with Versors, (e.g. u and v )
50
q dq 1
dq q dq 1
dq q dq 1
p q Optimization of Versor Functions
p q
u v
u va Gradient Descent-like Optimization Method
r α
z f xy
f xy q
q q
θ r
qrs
r ∆r s ∆s v v v
u u u
∆q ∆r ∆s
0 ∆s 0 v/u (v/u)^a (v/u)^a
dq dr ds
v α f u q
r u q a
u f u q f v q
51
References
[1] C. T. J. Dodson and T. Poston. Tensor Geometry. Graduate Texts in
Mathematics. Springer-Verlag, second edition, 1990.
[2] W.R. Hamilton. Elements of Quaternions, volume I. Chelsea
Publishing Company, third edition, 1969. The original was published
in 1866.
52