Wolfram Alpha:
Search by keyword:
Astronomy
Chemistry
Classical Physics
Climate Change
Cosmology
Finance and Accounting
General Relativity
Lagrangian and Hamiltonian Mechanics
Macroeconomics
Mathematics
Microeconomics
Particle Physics
Probability and Statistics
Programming and Computer Science
Quantum Field Theory
Quantum Mechanics
Semiconductor Reliability
Solid State Electronics
Special Relativity
Statistical Mechanics
String Theory
Superconductivity
Supersymmetry (SUSY) and Grand Unified Theory (GUT)
test
The Standard Model
Topology
Units, Constants and Useful Formulas
Quaternions

Quaternions are a number system that extends the
complex numbers.
They are represented in the form:
q = a + bi + cj + dk
Where i^{2} = j^{2} = k^{2} = ijk = 1
They are cyclic, i.e.
i ij = k ji = k
^ \ jk = i ik = j
/ v ki = j etc.
k < j
Proof:
ijk = 1
iijk = i
jk = i
jk = 1
Quaternions can be decomposed into scalar and vector
parts:
q = (a,b,c,d) = (a,v)
^ 
 ^
scalar \
vector
A quaternion (0,v) is called a PURE quaternion.
A UNIT quaternion is a quaternion of modulus one.
(q = q/√(a^{2} + b^{2} + c^{2} + d^{2})
The Quaternion Group, Q_{8}

Quaternions form a group, Q_{8} = {1,1,i,i,j,j,k,k}
Operations: + or .
Closure: q_{1} + q_{2/} = q_{3}
q_{1}.q_{2} = q_{3}
Inverse: q_{1} + (q_{1}) = 0
q_{1}.q_{1}* = 1
Identity: 0 + q_{1} = q_{1}
1.q_{1} = q_{1}
Associativity: q_{1} + (q_{2} + q_{3}) = (q_{1} + q_{2}) + q_{3})
(q_{1}q_{2})q_{3} = q_{1}(q_{2})q_{3}q_{2})
Commutativity: q_{1} + q_{2} = q_{2} + q_{1}
q_{1}.q_{2} ≠ q_{2}.q_{1}
[i,j] = ij  ji = k  (k) = 2k
Subgroups: {1,1,i,i} {1,1,j,j} {1,1,k,k}
{1,1} = center (kernel)
{1}
Quaternion Multiplication

q_{1} = (a,b,c,d)
q_{2} = (e,f,g,h)
q_{1}q_{2} = (ae  bf  cg  dh,
af + be + ch  dg,
ag  bh + ce + df,
ah + bg  cf + de)
This can also be written in terms of real matrices
as follows:
   
 a b c d  e 
 b a d c  f 
 c d a b  g 
 d c b a  h 
   
Example:
(1,2,3,6)(0,1,0,0)
     
 1 2 3 6  0   2 
 2 1 6 3  1  =  1 
 3 6 1 2  0   6 
 6 3 2 1  0   3 
     
Individual elements are given by:
 
 1 0 0 0 
(1,0,0,0) =  0 1 0 0 
 0 0 1 0 
 0 0 0 1 
 
 
 0 1 0 0 
(0,1,0,0) =  1 0 0 0 
 0 0 0 1 
 d 0 1 0 
 
etc.
Extracting the Dot and Cross Products

Let q_{1} = (a,x) and q_{2} = (b,y)
q_{1}q_{2} = (ae  (bf + cg + dh),
af + be + ch  dg,
ag  bh + ce + df,
ah + bg  cf + de)
(ae  x.y,ay + ex + x ^ y)
Vector Rotation (Perpendicular Axis)

n ^ v
^

 v' ☉ means out of screen
 /
 /
 /
/θ
n ☉> v
v' = vcosθ + (n ^ v)sinθ
Quaternion Rotation (Perpendicular Axis)

q = (0,v)
q is the PURE quaternion corresponds to the
vector being rotated.
q' = (0,v')
q_{n} = (0,n)
n is the unit vector coming out of the screen
corresponding to the axis of rotation, and q_{n}
is the correponding pure quaternion. We need
to figure out what n ^ v equals. Try,
q_{n}q = (0,n)(0,v) = (0  n.v, 0v + 0n + n ^ v)
= (0,n ^ v)
= n ^ v
Therefore, analagous to the vector forn, we can
write:
q' = qcosθ + (q_{n}q)sinθ
= (cosθ + q_{n}sinθ)q
Now,
q_{n}^{2} = (0,n)(o,n)
= (0  n.n,n ^ n)
= (n^{2},0)
= (1,0)
= 1
So q_{n} is analagous to i so we can write the
quaternion form of Euler's equation as:
exp(q_{n}θ) = (cosθ + q_{n}sinθ) ... 1.
and,
q' = exp(q_{n}θ)q
Example:
q = (0,0,1) = k
q_{n} = (0,1,0) = j
θ = π/2
z

^ q


> y
/ q_{n}
/
v q'
/
x
q' = exp(θq_{n})q
= exp(πj/2)k
= jk
= i
= (1,0,0)
Vector Rotation (Arbitrary Axis)

v = v_{∥} + v_{⊥}
v' = v_{∥}' + v_{⊥}'
= v_{∥} + v_{⊥}'
= v_{∥} + cosθv_{⊥} + sinθ(n ^ v_{⊥})
= v_{∥} + cosθ(v  v_{∥}) + sinθ(n ^ v_{⊥})
n = n_{x}i + n_{y}j + n_{z}k is a unit vector corresponding
to the arbitrary axis of rotation.
(n ^ v_{⊥}) = n ^ (v  v_{∥})
= n ^ v  n ^ v_{∥}
= n ^ v
_{ }
v' = (1  cosθ)v_{∥} + cosθv + sinθ(n ^ v)
Now,
v_{∥} = (v.n)n projection of v onto n
v' = (1  cosθ)(v.n)n + cosθv + sinθ(n ^ v)
This is the RODRIGUES ROTATION FORMULA.
Example:
n = (0,0,1) v = (1,0,0) θ = π/2
v' = (1  cosθ)(v.n)n + cosθv + sinθ(n ^ v)
= 0 + 0 + (0,0,1) ^ (1,0,0)
= (0,1,0)
Quaternion Rotation (Arbitrary Axis)

q = (0,v)
q_{∥} = (0,v_{∥})
q_{⊥} = (0,v_{⊥})
q_{⊥}' = (0,v_{⊥}')
q_{n} = (0,n)
Where,
q_{n} = (0,n_{x}i,n_{y}j,n_{z}k) is now a pure quaternion
corresponding to the arbitrary axis of rotation,
n. As before,
q' = q_{∥} + q_{⊥}'
= q_{∥} + exp(θ.q_{n})q_{⊥}
= q_{∥} + (cosθ + sinθn_{x}i + sinθn_{y}j + sinθn_{k}k)q_{⊥}
Now exp(θ.q_{n})q_{⊥} = q_{⊥}exp(θ.q_{n})
Proof:
(cosθ,sinθn)(0,v_{⊥}) = (0,v_{⊥})(cosθ,sinθn)
(0,cosθv_{⊥} + sinθ(n ^ v_{⊥})) = (0,cosθv_{⊥}  sinθ(v_{⊥} ^ n))
(0,cosθv_{⊥} + sinθ(n ^ v_{⊥})) = (0,cosθv_{⊥} + sinθ(n ^ v_{⊥})) Q.E.D.
Likewise,
exp(θ.q_{n})q_{∥} = q_{∥}exp(θ.q_{n})
Proof:
[q_{1},q_{2}] = 2(v_{1} ^ v_{2})
q' = exp(θq_{n}/2)exp(θq_{n}/2)q_{∥} + exp(θq_{n}/2)exp(θq_{n}/2)q_{⊥}
Using exp(θq_{n}/2)q_{∥} = q_{∥}exp(θq_{n}/2) and exp(θ.q_{n})q_{⊥} =
q_{⊥}exp(θ.q_{n}) from above gives:
q' = exp(θq_{n}/2)q_{∥}exp(θq_{n}/2) + exp(θq_{n}/2)q_{⊥}exp(θq_{n}/2)
= exp(θq_{n}/2)(q_{∥} + q_{⊥})exp(θq_{n}/2)
= exp(θq_{n}/2)qexp(θq_{n}/2)
In terms of sin and cos this is:
g = exp(θq_{n}/2)
= cos(θ/2) + sin(θ/2)n_{x}i + sin(θ/2)n_{y}j + sin(θ/2)n_{k}k
g* = exp(θq_{n}/2)
= cos(θ/2)  sin(θ/2)n_{x}i  sin(θ/2)n_{y}j  sin(θ/2)n_{k}k
Therefore, we can write:
q' = gqg* = gqg^{1}
Example:
q_{n} = (0,0,0,1) q = (0,1,0,0) θ = π/2
g = cos(π/4) + sin(π/4)n_{z}k
= √2/2 + (√2/2)k
= (1 + k)/√2
q' = gqg*
= [(1,0,0,1)/√2](0,1,0,0)[(1,0,0,1)/√2]
= (0,0,1,0)
Why the conjugate? Consider:
q' = gq
= [(1,0,0,1)/√2](0,1,0,0)
= (0,1/√2,1/√2,0)
This is a rotation of 45°. Therefore, the product
gq does not accomplish the full rotation. by itself.
Quaternion Rotation Matrix

A quaternion rotation:
q' = gqg* = gqg^{1}
With
q = w + xi + yj + zk and qq* = 1 = w^{2} + x^{2} + y^{2} + z^{2}
Can be algebraically manipulated (not proven here)
into a matrix rotation q' = Rq, where R is the
rotation matrix given by:
 
 1  2y^{2}  2z^{2} 2xy  2zw 2xz + 2yw 
R =  2xy + 2zw 1  2x^{2}  2z^{2} 2yz  2xw 
 2xz  2yw 2yz + 2xw 1  2x^{2}  2y^{2} 
 
This is a rotation around the vector n = (x,y,z)
(or equivalently q_{n} = n_{x}i + n_{y}j + n_{z}k) by an angle
2θ. We will demonstrate this using the previous
example where q_{n} = (0,0,0,1) q = (0,1,0,0) θ = π/2
∴ 2θ = π. Plugging the numbers in gives:
     
 1 0 0  1   1 
 0 1 0  0  =  0 
 0 0 1  0   0 
     
This is indeed a rotation of π!
The 2:1 nature is apparent since both q_{n} and q_{n}
map to the same R, i.e. the z^{2} is always positive.
Relation Between SU(2) and SO(3)

Instead of the 4 x 4 real matrices shown before,
we can also write quaternions as 2 x 2 complex
matrices as follows:
q = a + bi +cj + dk
= (a + bi) + (c + di)j ij = k
= z + wj
We can then write this as a matrix in the same
way that we can write a complex number as a
matrix.
   
 z w  =  a + bi (c + di) 
 w* z*   c + di a  bi 
   

Digression:
Complex Numbers as Matrices

Consider the 2 complex numbers.
(a + bi)(c + di) = ac  bd + (ad + bc)i
This can be written as the matrix:
   
 a b  c 
 b a  d 
   
The matrix on the LHS enables us to write.
   
1 =  1 0  and i =  0 1 
 0 1   1 0 
   
Euler's formula can then be written as:
exp(iθ) = cosθ + isinθ
   
exp( 0 θ ) =  cosθ sinθ 
 θ 0   sinθ cosθ 
   
Differentiating both sides w.r.t. θ gives:
iexp(iθ) = sinθ + icosθ
     
 0 1  cosθ sinθ  =  sinθ cosθ 
 1 0  sinθ cosθ   cosθ sinθ 
     

Example:
(1,2,3,6)(0,1,0,0)
   
 (1 + 2i) (3 + 6i)  (0 + i) (0 + 0i) 
 (3  6i) (1  2i)  (0  0i) (0  i) 
   
 
=  (2 + i) (6  3i) 
 (6 + 3i) (2  i) 
 
 
 2 
=  1 
 6 
 3 
 
Which is exactly the same result from before.
The following matrices satisfy these conditions:
       
I =  1 0  i =  0 1  j =  0 i  k =  i 0 
 0 1   1 0   i 0   0 i 
       
= iσ_{2} = iσ_{1} = iσ_{3}
It is easy to check that the matrices satisfy the
quaternion identites. In addition, all have
determinnt = 1 and i^{†} = i, j^{†} = j, k^{†} = k.
These are the Pauli matrices of SU(2) that are
isomorphic to the quaternions of unit norm.
Given the 2:1 correspndence between rotations of
R and qqg^{1}, it implies that there is a 2:1
homomorphism from SU(2) to SO(3). This has very
important consequences in the physics of spin.
The unit quaternions can also be thought of as
the group corresponding to the 3sphere, S^{3}, that
gives the group Spin(3), which is isomorphic to
SU(2) and also the double cover of SO(3).