Course 2BA1: Hilary Term 2007 Section 8: Quaternions and Rotations

Similar documents
Course MA2C02, Hilary Term 2010 Section 4: Vectors and Quaternions

Group, Rings, and Fields Rahul Pandharipande. I. Sets Let S be a set. The Cartesian product S S is the set of ordered pairs of elements of S,

ON A NEW SPECIES OF IMAGINARY QUANTITIES CONNECTED WITH A THEORY OF QUATERNIONS. William Rowan Hamilton

BSc (Hons) in Computer Games Development. vi Calculate the components a, b and c of a non-zero vector that is orthogonal to

ECS 178 Course Notes QUATERNIONS

COMP 175 COMPUTER GRAPHICS. Lecture 04: Transform 1. COMP 175: Computer Graphics February 9, Erik Anderson 04 Transform 1

Group Theory: Math30038, Sheet 6

Complex Numbers and Quaternions for Calc III

sin(α + θ) = sin α cos θ + cos α sin θ cos(α + θ) = cos α cos θ sin α sin θ

X-MA2C01-1: Partial Worked Solutions

Quaternions. R. J. Renka 11/09/2015. Department of Computer Science & Engineering University of North Texas. R. J.

Chapter 8 Vectors and Scalars

Contents. D. R. Wilkins. Copyright c David R. Wilkins

5. Vector Algebra and Spherical Trigonometry (continued)

Hilbert s Metric and Gromov Hyperbolicity

GG303 Lecture 6 8/27/09 1 SCALARS, VECTORS, AND TENSORS

A DARK GREY P O N T, with a Switch Tail, and a small Star on the Forehead. Any

Closed-Form Solution Of Absolute Orientation Using Unit Quaternions

Quaternions. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Quaternions Semester 1, / 40

PALACE PIER, ST. LEONARDS. M A N A G E R - B O W A R D V A N B I E N E.

CHAPTER 3 BOOLEAN ALGEBRA

Homework 1/Solutions. Graded Exercises

Chapter y. 8. n cd (x y) 14. (2a b) 15. (a) 3(x 2y) = 3x 3(2y) = 3x 6y. 16. (a)

VECTORS IN A STRAIGHT LINE

Subalgebras of the Split Octonions

QUATERNIONS AND ROTATIONS

Lagrange Multipliers

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

Why Transforms? Want to animate objects and camera Translations Rotations Shears And more.. Want to be able to use projection transforms

THE RING OF POLYNOMIALS. Special Products and Factoring

review To find the coefficient of all the terms in 15ab + 60bc 17ca: Coefficient of ab = 15 Coefficient of bc = 60 Coefficient of ca = -17

Introduction to quaternions

Assignment 11 (C + C ) = (C + C ) = (C + C) i(c C ) ] = i(c C) (AB) = (AB) = B A = BA 0 = [A, B] = [A, B] = (AB BA) = (AB) AB

SYMBOL NAME DESCRIPTION EXAMPLES. called positive integers) negatives, and 0. represented as a b, where

MECH 5312 Solid Mechanics II. Dr. Calvin M. Stewart Department of Mechanical Engineering The University of Texas at El Paso

XMA2C011, Annual Examination 2012: Worked Solutions

MA232A Euclidean and Non-Euclidean Geometry School of Mathematics, Trinity College Michaelmas Term 2017 Vector Algebra and Spherical Trigonometry

Chapter 3: Complex Numbers

3D Elasticity Theory

2.1 Scalars and Vectors

CHAPTER 7 DIV, GRAD, AND CURL

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Chapter 1. Complex Numbers. Dr. Pulak Sahoo

ON QUATERNIONS. William Rowan Hamilton. (Proceedings of the Royal Irish Academy, 3 (1847), pp ) Edited by David R. Wilkins

Quaternions and their applications

Chapter 2. Vectors and Vector Spaces

Multiplication of Polynomials

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Lecture 7. Quaternions

Vectors. September 2, 2015

We wish to solve a system of N simultaneous linear algebraic equations for the N unknowns x 1, x 2,...,x N, that are expressed in the general form

Algebraic Expressions and Identities

Course 2BA1: Hilary Term 2006 Section 7: Trigonometric and Exponential Functions

Geometric Algebra. Gary Snethen Crystal Dynamics

Vectors. J.R. Wilson. September 28, 2017

LESSON 6.2 POLYNOMIAL OPERATIONS I

1.3 LECTURE 3. Vector Product

CH.3. COMPATIBILITY EQUATIONS. Multimedia Course on Continuum Mechanics

Chapter 2. Vectors and Vector Spaces

CHAPTER 2 BOOLEAN ALGEBRA

PEAT SEISMOLOGY Lecture 2: Continuum mechanics

Axioms of Kleene Algebra

Chapter 2. Linear Algebra. rather simple and learning them will eventually allow us to explain the strange results of

Algebraic Expressions

Unit IV State of stress in Three Dimensions

Vectors. J.R. Wilson. September 27, 2018

Quaternion Algebra and Calculus

Real Analysis III. (MAT312β) Department of Mathematics University of Ruhuna. A.W.L. Pubudu Thilan

If you must be wrong, how little wrong can you be?

(d) Since we can think of isometries of a regular 2n-gon as invertible linear operators on R 2, we get a 2-dimensional representation of G for

LESSON 6.2 POLYNOMIAL OPERATIONS I

LOWELL WEEKLY JOURNAL

Basic Equations of Elasticity

Semester University of Sheffield. School of Mathematics and Statistics

..«W- tn^zmxmmrrx/- NEW STORE. Popular Goods at Popular D. E. SPRING, Mas just opened a large fdo.k of DRY GOODS & GROCERIES,

Stress, Strain, Mohr s Circle

Matrix representation of a linear map

Lie Algebra of Unit Tangent Bundle in Minkowski 3-Space

9.5. Lines and Planes. Introduction. Prerequisites. Learning Outcomes

EXERCISES. a b = a + b l aq b = ab - (a + b) + 2. a b = a + b + 1 n0i) = oii + ii + fi. A. Examples of Rings. C. Ring of 2 x 2 Matrices

Vectors Coordinate frames 2D implicit curves 2D parametric curves. Graphics 2008/2009, period 1. Lecture 2: vectors, curves, and surfaces

Factor: x 2 11x + 30 = 0. Factoring Quadratic Equations. Fractional and Negative Exponents

Lecture 3 Linear Algebra Background

II&Ij <Md Tmlaiiiiiit, aad once in Ihe y a w Teataa m i, the vmb thatalmta oot Uiaapirit world. into as abode or wotld by them- CooTBOtioa

Math 10 - Unit 5 Final Review - Polynomials

Quantum Information & Quantum Computing

Invertible Matrices over Idempotent Semirings

P A L A C E P IE R, S T. L E O N A R D S. R a n n o w, q u a r r y. W WALTER CR O TC H, Esq., Local Chairman. E. CO O PER EVANS, Esq.,.

Geometric Fundamentals in Robotics Quaternions

LESSON 7.1 FACTORING POLYNOMIALS I

arxiv: v2 [math.dg] 3 Sep 2014

Matrices: 2.1 Operations with Matrices

Math 1060 Linear Algebra Homework Exercises 1 1. Find the complete solutions (if any!) to each of the following systems of simultaneous equations:

Lecture 10: Eigenvectors and eigenvalues (Numerical Recipes, Chapter 11)

10.1 Complex Arithmetic Argand Diagrams and the Polar Form The Exponential Form of a Complex Number De Moivre s Theorem 29

Solutions to Assignment 4

Quaternion Algebras. Edgar Elliott. May 1, 2016

Assignment 10. Arfken Show that Stirling s formula is an asymptotic expansion. The remainder term is. B 2n 2n(2n 1) x1 2n.

Math Problem set # 7

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Transcription:

Course BA1: Hilary Term 007 Section 8: Quaternions and Rotations David R. Wilkins Copyright c David R. Wilkins 005 Contents 8 Quaternions and Rotations 1 8.1 Quaternions............................ 1 8. Quaternions and Vectors..................... 4 8.3 Quaternions and Rotations.................... 5 8 Quaternions and Rotations 8.1 Quaternions A quaternion may be defined to be an expression of the form w+xi+yj +zk, where w, x, y and z are real numbers. There are operations of addition, subtraction and multiplication defined on the set H of quaternions. These are binary operations on that set. Quaternions were introduced into mathematics in 1843 by William Rowan Hamilton (1805 1865). The definitions of addition and subtraction are straightforward. The sum and difference of two quaternions w + xi + yj + zk and w + x i + y j + z k are given by the formulae (w + xi + yj + zk) + (w + x i + y j + z k) = (w + w ) + (x + x )i + (y + y )j + (z + z )k; (w + xi + yj + zk) (w + x i + y j + z k) = (w w ) + (x x )i + (y y )j + (z z )k. 1

If the quaternions w + xi + yj + zk and w + x i + y j + z k are denoted by q and q respectively, then we may denote the sum and the difference of these quaternions by q + q and q q. These operations of addition and subtraction of quaternions are binary operations on the set H of quaternions. It is easy to see that the operation of addition is commutative and associative, and that the zero quaternion 0 + 0i + 0j + 0k is an identity element for the operation of addition. The operation of subtraction of quaternions is neither commutative nor associative. This results directly from the fact that the operation of subtraction on the set of real numbers is neither commutative nor associative. Let q be a quaternion. Then q = w + xi + yj + zk for some real numbers w, x, y and z, and there is a corresponding quaternion q, with q = ( w) + ( x)i + ( y)j + ( z)k. Then q + ( q) = ( q) + q = 0, where 0 here denotes the zero quaternion 0 + 0i + 0j + 0k. Thus, to every quaternion q there corresponds a quaternion q that is the inverse of q with respect to the operation of addition. These properties of quaternions ensure that the quaternions constitute a group with respect to the operation of addition. The definition of quaternion multiplication is somewhat more complicated than the definitions of addition and subtraction. The product of two quaternions w + xi + yj + zk and w + x i + y j + z k is given by the formula (w + xi + yj + zk) (w + x i + y j + z k) = (ww xx yy zz ) + (wx + xw + yz zy )i +(wy + yw + zx xz )j + (wz + zw + xy yx )k. We shall often denote the product q q of quaternions q and q by qq. Given any real number w, let us denote the quaternion w +0i+0j +0k by w itself. Let us also denote the quaternions 0 + 1i + 0j + 0k, 0 + 0i + 1j + 0k and 0 + 0i + 0j + 1k by i, j and k respectively. It follows directly from the above formula defining multiplication of quaternions that i = j = k = 1, ij = ji = k, jk = kj = i, ki = ik = j, where i = i i, ij = i j etc. It follows directly from these identities that ijk = 1, where ijk = i (j k) = (i j) k. Let q be a quaternion, given by the expression w + xi + yj + zk, where w, x, y and z are real numbers. One can easily verify that the quaternion q

can be formed from the seven quaternions w, x, y, z, i, j and k according to the formula q = w + (x i) + (y j) + (z k). The operation of multiplication on the set H of quaternions is not commutative. Indeed i j = k, but j i = k. One can however verify by a straightforward but somewhat tedious calculation that this operation of multiplication of quaternions is associative. Moreover the quaternion 1 + 0i + 0j + 0k is an identity element for this operation of multiplication. A quaternion w + xi + yj + zk is said to be real if x = y = z = 0. Such a quaternion may be identified with the real number w. In this way the set of real numbers may be regarded as a subset of the set of quaternions. Although quaternion multiplication is not commutative, one can readily show that a q = q a for all real numbers a and for all quaternions q. Indeed if q = w + xi + yj + zk, where w, x, y and z are real numbers, then the rules of quaternion multiplication ensure that a q = q a = (aw) + (ax)i + (ay)j + (az)k. Let q be a quaternion. Then q = w + xi + yj + zk for some real numbers w, x, y and z. We define the conjugate q of q to be the quaternion q = w xi yj zk. The definition of quaternion multiplication may then be used to show that q q = q q = w + x + y + z. We define the modulus q of the quaternion q by the formula q = w + x + y + z. Then qq = qq = q for all quaternions q. Moreover q = 0 if and only if q = 0. If q and r are quaternions, and if q and r denote the conjugates of q and r respectively, then the conjugate q r of the product q r is given by the formula q r = r q. If q is a non-zero quaternion, and if the quaternion q 1 is defined by the formula q 1 = q q, then qq 1 = q 1 q = 1. We conclude therefore that, given any non-zero quaternion q, there exists a quaternion q 1 that is the inverse of q with respect to the property of multiplication. These properties of quaternions ensure that the non-zero quaternions constitute a group with respect to the operation of multiplication. 3

8. Quaternions and Vectors Let q be a quaternion. We can write q = q 0 + q 1 i + q j + q 3 k, where q 0, q 1, q and q 3 are real numbers. We can then write where q = q 0 + q q = q 1 i + q j + q 3 k. Following Hamilton, we can refer to q 0 as the scalar part of the quaternion q, and we can refer to q as the vector part of the quaternion q. Moreover q may be identified with the vector (q 1, q, q 3 ) in three-dimensional space whose components (with respect to some fixed orthonormal basis) are q 1, q and q 3. Thus a quaternion may be regarded as, in some sense, a formal sum of a scalar and a vector. In particular, we can regard vectors as a special type of quaternion: a quaternion q 0 + q 1 i + q j + q 3 k represents a vector q in three-dimensional space if and only if q 0 = 0. Thus vectors are identified with those quaternions whose scalar part is zero. Now let q and r be vectors, with Cartesian components (q 1, q, q 3 ) and (r 1, r, r 3 ) respectively. If we consider q and r to be quaternions (with zero scalar part), and multiply them together in accordance with the rules of quaternion multiplication, we find that q r = ( q. r) + ( q r), where q. r denotes the scalar product of the vectors q and r, and q r denotes the vector product of these vectors. Thus the scalar part of the quaternion q r is q. r, and the vector part is q r. Note that q r is itself a vector if and only if the vectors q and r are orthogonal. More generally, let q and r be quaternions with scalar parts q 0 and r 0 and with vector parts q and r, so that q = q 0 + q, r = r 0 + r. Then qr = q 0 r 0 q. r + q 0 r + r 0 q + q r, and thus the scalar part of the quaternion qr is q 0 r 0 q. r, 4

and the vector part of the quaternion qr is q 0 r + r 0 q + q r. Now let u, v and w be an orthonormal triad of vectors in three dimensional space, with u = v = w = 1, u v = v u = w, v w = w v = u, w u = u w = v, If we multiply these with one another in accordance with the rules for quaternion multiplication, we find that u = v = w = 1, u v = v u = w, v w = w v = u, w u = u w = v, (Note that the rules for multiplying u, v and w with one another correspond to Hamilton s rules for multiplying the basic quaternions i, j and k with one another, whenever u, v and w constitute a positively oriented basis of three-dimensional space.) 8.3 Quaternions and Rotations Let us consider the effect of a rotation through an angle θ about an axis in three-dimensional space passing through the origin. Let l, m and n be the cosines of the angles between the axis of the rotation and the three coordinate axes. In Cartesian coordinates, the axis of rotation is then in the direction of the vector (l, m, n), where l + m + n = 1. The angle θ and the direction cosines l, m, n of the axis of the rotation together determine a quaternion q, with q = cos θ + sin θ (li + mj + nk). Let q be the conjugate of q, given by the formula q = cos θ sin θ (li + mj + nk). 5

Let (x, y, z) and (x, y, z ) be the Cartesian coordinates of two points in threedimensional space, and let r and r be the quaternions r and r be defined by r = xi + jy + zk and r = x i + y j + z k. We shall show that if r = qrq then a rotation about the axis (l, m, n) through an angle θ will send the point (x, y, z) to the point (x, y, z ). (The effect of a rotation through an angle θ in the opposite sense can be calculated by replacing θ by θ in the definition of the quaternion q.) In this way the algebra of quaternions may be used in areas of application such as computer-aided design and the programming of computer games, in order to calculate the results of rotations applied to points in three-dimensional space. Let u, v, w be an orthonormal basis of three-dimensional space with w = u v (as above), and with u directed along the axis of the rotation. Let θ be a real number, specifying the angle of rotation, and let q be the quaternion q = cos θ ( + sin θ ) u = cos θ + l sin θ i + m sin θ j + n sin θ k, where Then since u = (l, m, n), l + m + n = 1. q 1 = q = cos θ ( sin θ ) u, q q = (cos θ + sin θ ) (cos u θ sin θ ) u = cos θ ( + sin θ ) u. u ( sin θ ) u u = cos θ + sin θ = 1. Also we find that q = (cos θ + sin θ u ) (cos θ + sin θ u ) 6

= cos θ ( sin θ ) u. u + sin θ cos θ ( u + sin θ ) u u = cos θ sin θ + sin θ cos θ u = cos θ + sin θ u. Let us now calculate the quaternion products q u q, q v q and q w q. We first note that u q = q u, v q = q v, w q = q w. Therefore q u q = qq u = u, q v q = q v = (cos θ + sin θ u) v = cos θ v + sin θ w, q w q = q w = (cos θ + sin θ u) w = cos θ w sin θ v Thus if we define T : R 3 R 3 to be the transformation that sends a vector r to q r q, then T fixes the vector u, rotates the vector v about the direction of u through an angle θ towards w, and rotates w about the direction of u through an angle θ towards v. This transformation T is therefore a rotation about the direction of u through an angle θ. 7