You are on page 1of 7

Talk at the MIP group, IWR, Univ.

of Heidelberg

A Very Short Introduction to Quaternions


M. Plaue Oct. 2006

1 Complex numbers
As the quaternionic numbers can be dened in a fashion comparable to the denition of the complex numbers Ill provide a quick review of the latter.

1.1 Denition and basic properties of complex numvers


Denition 1.1. The complex numbers C are dened as R2 = R R together with the componentwise addition x1 x2 x1 + y1 + := y2 x2 + y2 y1 and the multiplication x1 y1 Proposition 1.1. C is a eld.1 Proof. One has to identify the neutral and inverse elements, respectively, and verify the eld axioms. For example, (1, 0) serves as the neutral element for the multiplication. Observe that x1 0 x2 0 = x1 x2 , 0 x2 y2 := x1 x2 y1 y2 . x1 y2 + x2 y1

so the real numbers are naturally isomorphic2 to the complex numbers with vanishing imaginary part. Scalar multiplication is also consistent with this notion: r x 0 y = rx ry =r x . y

Also observe that (0, 1)2 = (1, 0) 1. Thus by dening i = (0, 1) and writing = (x, y) = x + iy, one arrives at the usual representation of the complex numbers.

1.2 Complex numbers and rotations in the plane


Proposition 1.2. Identify3 R2 with C. For each R, the map of the Euclidian plane R2 onto itself dened by r ei r is a rotation by the angle .
Roughly speaking, a eld is an algebraic structure the elements of which can be multiplied and added like real or rational numbers. Commutativity, associativity and distributivity hold, as well as the existence of the neutral and inverse elements for both the addition and multiplication. (Of course there is no multiplicative inverse for the neutral element of addition, namely zero. 2 Two elds K and L are called isomorphic if there exists a bijective map : K L such that for all x, y K it holds that (x + y) = (x) + (y) and (x y) = (x) (y). Such a map is called an isomorphism. In general, isomorphisms are maps preserving the structure of a space. In topology, isomorphisms are continous bijective maps with continous inverse (and in this case also called homeomorphisms); for vector spaces, isomorphisms are bijective linear maps etc. 3 Identifying amounts to suppressing given isomorphisms in the notation of formulas.
1

Proof. Let r = (x, y) R2 . Then, ei r ei (x + iy) = (cos + i sin )(x + iy) = (cos x sin y) + i(sin x + cos y). = The corresponding element in R2 can be written as cos sin sin cos x . y

2 Quaternionic numbers
2.1 Denition and properties of quaternionic numbers
Denition 2.1. The quaternionic numbers H are dened as R4 R R3 together with = the componentwise addition as well as the multiplication t1 r1 t2 r2 := t 1 t 2 r1 r2 . t 1 r2 + t 2 r1 + r1 r2

Here, the usual dot product on R3 is denoted by ; stands for the cross product. Analogously to the complex numbers, the rst component of a quaternionic number is called the real part of that number. The vector comprising the remaining components is called the imaginary part. Like complex numbers, quaternionic conjugation q q is 1 dened by reversing the sign of the imaginary part, the magnitude is |q| = (q q ) 2 . Proposition 2.1. (Hamilton 1855) H is a skew eld4 (but not a eld.) Proof. Verify the axioms for a skew eld. (Multiplication of (0, 1, 0, 0) and (0, 0, 1, 0) does not commute.) Now x n R3 with Euclidian norm n = 1 and consider the two dimensional subspace of all quaternions with imaginary part parallel to n. Multiplying two elements of this subspace yields: t1 t2 t1 t2 u 1 u 2 = . u1 n u2 n (t1 u2 + t2 u1 )n Thus, for each n, these subspaces are isomorphic to the complex numbers, giving the following inclusions (up to isomorphism): R C H. Proposition 2.2. (Frobenius 1877) The above skew elds are (up to isomorphism) the only ones containing R.
4

Same as a eld, but commutativity of the multiplication generally does not hold.

Proof. Left to the reader. ;-) Proposition 2.3. For all q1 , q2 H, the following holds: |q1 | = q1 , q1 q2 = q1 q2 , |q1 q2 | = |q1 ||q2 |. Proof. Straightforward. Like the standard representation of complex numbers, one can dene i = (0, e1 ), j = (0, e2 ), and k = (0, e3 ) with (e1 , e2 , e3 ) being the standard basis of R3 . It holds that i2 = j 2 = k 2 = ijk = 1. All other combinations can be computed from these relations, e. g. ij = ijkk 1 = k 1 = (k) = k.

2.2 Quaternionic numbers and rotations in Euclidian 3-space


Proposition 2.4. Identify R3 with the space of purely imaginary quaternions. The map of Euclidian 3-space R3 onto itself given by r exp q q r exp 2 2

with q H being purely imaginary is well-dened and a rotation by the angle = |q| q with rotation axis given by n = |q| (if = 0). Proof. This is the main result of this little introduction, so Ill give a complete proof (with some geometric handwaving.) The exponential of a quaternion is well-dened by the usual power series as the multiplication preserves the norm. The theorem certainly holds for q = 0, so only the case of non-vanishing q has to be considered. You will also see that the range of the map is in fact R3 (the real part of any image vanishes.)

First observe that for each purely imaginary q, one has q 2n = (1)n |q|2n . This is certainly true for n = 0 and holds for all n N by induction: q 2(n+1) = q 2n+2 = q 2n q 2 = (1)n |q|2n q 2 = (1)n+1 |q|2n q(q) = (1)n+1 |q|2n q q = (1)n+1 |q|2n |q|2 = (1)n+1 |q|2n+2 = (1)n+1 |q|2(n+1) . Making use of this fact one is able to write down an Euler formula for the quaternions:
k=0

qk k!

=
k=0

q 2k + (2k)!

=
k=0

k=0 k |q|2k (1)

q 2k+1 (2k + 1)!


k=0

(2k)! (1)k |q|2k

+ + q |q|

(1)k |q|2k q (2k + 1)!


k=0

(2k)! q sin |q|. = cos |q| + |q|


k=0

(1)k |q|2k+1 (2k + 1)!

(It is easy to see that the limit for q 0 exists and delivers the expected result of exp(0) = 1 so in this sense, the formula also holds for q = 0.) Observe that exp maps the purely imaginary quaternions onto the unit quaternions which are topologically the 3-sphere S 3 . (S n1 = {x Rn | x = 1}) Now decompose r into parts parallel and perpendicular to n: r = r + r , r n = 0, r n.

One expects the component parallel to the rotation axis to be invariant under the map, whereas the perpendicular component is rotated in the plane perpendicular to the rotation axis spanned by n.

For the parallel component, one computes: exp q q r exp 2 2 = = = = = cos 2 sin n 2 r r r 0 r 0 r cos 2 sin n 2 0 n cos 2 sin n 2 0 n

cos 2 sin n 2 cos 2 sin n 2 0 n r . =

cos 2 sin n 2

Here the fact was used that the multiplication of quaternions with parallel imaginary part is just the multiplication of complex numbers (and in particular, commutative.) For the perpendicular component one computes: cos 2 sin n 2 cos 2 sin n 2 cos2 r 2 cos 2 = sin n 2 0 cos r sin (r n) 2 2 0 r cos
2

= 0
2

sin

2 (r

n) + sin

cos (n r ) sin2 (n (r n)) 2 2

Using the formula for the double cross product a (b c) = (a c)b (a b)c and the double-angle identities for sine and cosine, one nally arrives at q q exp r exp = cos r + sin (n r ). 2 2 One readily sees that (r, n r ) is an orthogonal basis for the plane perpendicular to n, with respect to which r has the coordinates (1, 0). Both basis vectors have the same length and the basis vectors can thus be normalized by a single factor. Thus, r rotated by an angle has coordinates (cos , sin ). You can check for yourself that the orientation is correct. Remark 2.1. A rotation about a given axis by a specic angle can also be written in the simple form R(n, )r, with R(n, ) = idR3 + (sin ) + (1 cos )2 , where 0 n3 n2 0 n1 . = n3 n2 n1 0

The theorem describes a 2-1 homomorphism from S 3 onto the group of proper rotations in R3 , SO(3): Antipodal points5 on the 3-sphere are mapped to the same rotation, and the product of two unit quaternions exp q1 and exp q2 correspond to the composition of the respective rotations. Of course, one might still nd a nice 1-1 isomorphism; but in fact there is none and the geometric structure of SO(3) is actually S 3 with antipodal points identied. Another fun fact: exp maps straight lines to geodesics (great circles) on S 3 .

3 Applications
3.1 Computer science
Prevention of gimbal lock: When using Euler angles for describing rotations, a rotation about one axis by 90 leads to two parallel rotation axes, thus losing one degree of freedom in subsequent computations. Smooth animations (e. g. for video games): Spherical linear interpolation (Slerp). By constructing the geodesic between two rotations on the 3-sphere corresponding to two key frames of an animatioon, a smooth series of rotations between those frames can be computed.

3.2 Physics
The algebra generated by the Pauli matrices used for describing the spin of, for example, an electron is essentially the group of quaternions. The 2-1 homomorphism gives rise to the somewhat confusing statement that a rotation of 180 in spin space, or ipping the spin, corresponds to a full rotation of 360 in physical space.

3.3 Mathematics
The above notions are special cases of much more general concepts like Lie groups and Cliord algebras that play a central role for example in dierential geometry.

References
[1] M. L. Curtis, Matrix Groups, Springer [2] R. Seiler et al., Lineare Algebra fr Ingenieure, Lecture notes, TU Berlin u [3] A. Beutelspacher, Lineare Algebra, Vieweg

q q

You might also like