ECS 178 Course Notes QUATERNIONS

Similar documents
CONVERSION OF COORDINATES BETWEEN FRAMES

On-Line Geometric Modeling Notes VECTOR SPACES

On-Line Geometric Modeling Notes FRAMES

BARYCENTRIC COORDINATES

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

CONTROL POLYGONS FOR CUBIC CURVES

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

AFFINE COMBINATIONS, BARYCENTRIC COORDINATES, AND CONVEX COMBINATIONS

Complex Numbers and Quaternions for Calc III

Hypercomplex numbers

Course Name : Physics I Course # PHY 107

Imaginary numbers and real numbers make up the set of complex numbers. Complex numbers are written in the form: a + bi. Real part ~ -- Imaginary part

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

The Quaternions. The Quaternions. John Huerta. Department of Mathematics UC Riverside. Cal State Stanislaus

Chapter XI Novanion rings

On-Line Geometric Modeling Notes

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

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

Quaternions and the four-square theorem

The Quaternions & Octonions: A Basic introduction to Their Algebras. By: Kyle McAllister. Boise State University

Lecture 3 Linear Algebra Background

A Tutorial on Euler Angles and Quaternions

Lecture 7. Quaternions

MATH 320, WEEK 7: Matrices, Matrix Operations

William Stallings Copyright 2010

Complex Numbers. Copyright Cengage Learning. All rights reserved.

Quadratics. Shawn Godin. Cairine Wilson S.S Orleans, ON October 14, 2017

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

Quaternions and Groups

Matrix Algebra & Elementary Matrices

3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.

Ohio s Learning Standards-Extended. Mathematics. The Real Number System Complexity a Complexity b Complexity c

Matrices. Chapter Definitions and Notations

Computability in Quaternion Matrix Semigroups

Linear Equations and Matrix

Clifford Analysis, Homework 1

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes.

Linear Algebra V = T = ( 4 3 ).

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Properties of Real Numbers

Math Problem set # 7

When is the Ring of 2x2 Matrices over a Ring Galois?

An eightfold path to E 8

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Understanding Quaternions: Rotations, Reflections, and Perspective Projections. Ron Goldman Department of Computer Science Rice University

Matrix Multiplication

Review of Coordinate Systems

Quaternions and their applications

A Learning Progression for Complex Numbers

Semester University of Sheffield. School of Mathematics and Statistics

V o l u m e 5, N u m b e r 5 2, 1 6 P a g e s. Gold B e U ClUt Stamps Double Stamp D a y E v e r y Wednesday

Math 123, Week 2: Matrix Operations, Inverses

CS 246 Review of Linear Algebra 01/17/19

Sect Properties of Real Numbers and Simplifying Expressions

Index Notation for Vector Calculus

A Primer on Three Vectors

Abstract Algebra II Groups ( )

Geometric Algebra. Gary Snethen Crystal Dynamics

Phys 201. Matrices and Determinants

Sect Addition, Subtraction, Multiplication, and Division Properties of Equality

Quaternion Algebras. Edgar Elliott. May 1, 2016

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

Serge Ballif January 18, 2008

QUARTERNIONS AND THE FOUR SQUARE THEOREM

MAC Module 1 Systems of Linear Equations and Matrices I

NAME DATE PERIOD. A negative exponent is the result of repeated division. Extending the pattern below shows that 4 1 = 1 4 or 1. Example: 6 4 = 1 6 4

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

ICS 6N Computational Linear Algebra Matrix Algebra

ANoteontheRepresentationandDefinitionofDualSplitSemiQuaternionsAlgebra

Mathematics Standards for High School Precalculus

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

5. Vector Algebra and Spherical Trigonometry (continued)

Chapter 8 Vectors and Scalars

CHAPTER I. Rings. Definition A ring R is a set with two binary operations, addition + and

THINKING IN PYRAMIDS

Quaternion. Hoon Kwon. March 13, 2010

AN ELEMENTARY PROOF OF THE SPECTRAL RADIUS FORMULA FOR MATRICES

arxiv: v1 [math.ds] 18 Nov 2008

Mathematical Fundamentals

QUATERNIONS AND ROTATIONS

MATH ALGEBRA AND FUNCTIONS

Computing Moore-Penrose Inverses of Ore Polynomial Matrices Yang Zhang

Elementary Row Operations on Matrices

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

Basic Linear Algebra in MATLAB

CHAPTER 3: Quadratic Functions and Equations; Inequalities

3.4 Solve Equations with Variables

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.

Review of Vectors and Matrices

E 8. Robert A. Wilson. 17/11/08, QMUL, Pure Mathematics Seminar

5-9. Complex Numbers. Key Concept. Square Root of a Negative Real Number. Key Concept. Complex Numbers VOCABULARY TEKS FOCUS ESSENTIAL UNDERSTANDING

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

Gaussian Elimination and Back Substitution

6-3 Solving Systems by Elimination

A VERTICAL LOOK AT KEY CONCEPTS AND PROCEDURES ALGEBRA I

2.4 Multiply Real Numbers

Math 7.2, Period. Using Set notation: 4, 4 is the set containing 4 and 4 and is the solution set to the equation listed above.

Linear Algebra (part 1) : Matrices and Systems of Linear Equations (by Evan Dummit, 2016, v. 2.02)

QUATERNION ALGEBRAS KEITH CONRAD

Transcription:

ECS 178 Course Notes QUATERNIONS Kenneth I. Joy Institute for Data Analysis and Visualization Department of Computer Science University of California, Davis Overview The quaternion number system was discovered by Hamilton, a physicist who was looking for an extension of the complex number system to use in geometric optics. Quaternions have developed a wide-spread use in computer graphics and robotics research because they can be used to control rotations in three dimensional space. In these notes we define and review the basic properties of quaternions. What are Quaternions? Remember complex numbers? These numbers are an extension of the real number system and can be written in the form a + bı, where a and b are both real numbers and ı 2 = 1. The quaternions are just an extension of this complex number form. A quaternion is usually written as q = a + bi + cj + dk where a, b, and c are scalar values, and i, j and k are the unique quaternions with the properties that i 2 = 1, j 2 = 1, k 2 = 1 and

ij = k, jk = i, ki = j ji = k, kj = i, ik = j This is clearly an extension of the complex number system where the complex numbers are those quaternions that have c = d = 0 and the real numbers are those that have b = c = d = 0. Adding and Multiplying Quaternions Addition of quaternions is very straightforward: We just add the coefficients. That is, if q 1 = a 1 + b 1 i + c 1 j + d 1 k and q 2 = a 2 + b 2 i + c 2 j + d 2 k, then the sum of the two quaternions is q 1 + q 2 = (a 1 + a 2 ) + (b 1 + b 2 )i + (c 1 + c 2 )j + (d 1 + d 2 )k Multiplication is somewhat more complicated, as we must first multiply componentwise, and then use the product formulas for i, j, and k to simplify the resulting expression. So the product of q 1 and q 2 is q 1 q 2 = (a 1 + b 1 i + c 1 j + d 1 k) (a 2 + b 2 i + c 2 j + d 2 k) = a 1 a 2 + a 1 b 2 i + a 1 c 2 j + a 1 d 2 k + b 1 a 2 i + b 1 b 2 ii + b 1 c 2 ij + b 1 d 2 ik + c 1 a 2 j + c 1 b 2 ji + c 1 c 2 jj + c 1 d 2 jk + d 1 a 2 k + d 1 b 2 ki + d 1 c 2 kj + d 1 d 2 kk = (a 1 a 2 b 1 b 2 c 1 c 2 d 1 d 2 ) + (a 1 b 2 + a 2 b 1 + c 1 d 2 d 1 c 2 ) i + (a 1 c 2 + a 2 c 1 + d 1 b 2 b 1 d 2 ) j + (a 1 d 2 + a 2 d 1 + b 1 c 2 c 1 b 2 ) k An Alternate Representation for Quaternions The expression for multiplication of quaternions, given above, is quite complex and results in even worse complexity for the division and inverse formulas. The quaternions can be written in 2

an different form one which involves vectors which dramatically simplifies the formulas. These expressions have become the preferred form for representing quaternions. In this form, the quaternion q = a + bi + cj + dk is written as (a, v) where v is the vector < b, c, d >. We can rewrite the addition formula for two quaternions q 1 = (a 1, v 1 ) and q 2 = (a 2, v 2 ) as q 1 + q 2 = (a 1 + a 2, v 1 + v 2 ) and the product formula as q 1 q 2 = (a 1 a 2 v 1 v 2, a 1 v 2 + a 2 v 1 + v 1 v 2 ) With some algebraic manipulation, these formulas can be shown to be identical with those of the i, j, k representation. We note that the quaternions of the form (a, < 0, 0, 0 >) can be associated with the real numbers, and the quaternions of the form (a, < b, 0, 0 >) can be associated with the complex numbers. Properties of Quaternions With this new representation, it is straightforward to develop a complete set of properties of quaternions. Given the quaternions q = (a, v), q 1 = (a 1, v 1 ), and q 2 = (a 2, v 2 ), we can verify the following properties. Addition The sum of q 1 and q 2 is q 1 + q 2 = (a 1 + a 2, v 1 + v 2 ) Negation The additive inverse q of q is a q = ( a, v) 3

Subtraction The difference of q 1 and q 2 is q 1 q 2 = q 1 + ( q 2 ) = (a 1 a 2, v 1 v 2 ) Multiplication The product of q 1 and q 2 is q 1 q 2 = (a 1 a 2 v 1 v 2, a 1 v 2 + a 2 v 1 + v 1 v 2 ) Identity The multiplicative identity is (1, 0). This can be directly checked by (a, v)(1, 0) = (a v 0, a 0 + 1 v + v 0) = (a, v) (1, 0)(a, v) = (a 0 v, 1 v + a 0 + 0 v) = (a, v) Multiplicative Inverse The inverse q 1 of q = (a, v) is given by q 1 = ( ) a a 2 + v 2, v a 2 + v 2 This can be checked easily once we calculate that (a, v)(a, v) = (a 2 + v v, a v + a v + v ( v)) = a 2 + v 2 and so qq 1 = q 1 q = (1, 0). Division The quotient of q 1 and q 2 is q 1 q 2 = q 1 q 1 2 Notation Quaternions of the form (a, 0) are normally denoted in their real number form as a. this allows a scalar multiplication property to be given by 4

Scalar Multiplication If c is a scalar, then cq = (c, 0)q = (c, 0)(a, v) = (ca 0 v, c v + a 0 + 0 v) = (ca, c v) It also allows us to simplify some expressions. For example, the expression for the multiplicative inverse can now be written Multiplicative Inverse The inverse q 1 of q = (a, v) is given by q 1 = (a, v) a 2 + v 2 This also allows us to write the multiplicative identity of the quaternions as 1 instead of (1, 0), and the additive identity as 0. The Quaternions are not Commutative under Multiplication Whereas we can add, subtract, multiply and divide quaternions, we must always be aware of the order in which these operations are made. This is because quaternions do not commute under multiplication in general q 1 q 2 q 2 q 1. To give an example of this consider the two quaternions q 1 = (1, < 1, 0, 0 >) and q 2 = (2, < 0, 1, 0 >). Multiplying these we obtain q 1 q 2 = (2 0, < 0, 1, 0 > +2 < 1, 0, 0 > + < 0, 0, 1 >) = (2, < 2, 1, 1 >) or q 2 q 1 = (2 0, 2 < 1, 0, 0 > + < 0, 1, 0 > + < 0, 0, 1 >) = (2, < 2, 1, 1 >) and they are not equal. This is because the vector cross products give different results depending on the order of the vectors in general, v 1 v 2 v 2 v 1. 5

Length of a Quaternion, Unit Quaternions We define the length of a quaternion q = (a, v) to be q = a 2 + v 2 where v is the length of the vector v. The unit quaternions are those that have length one. All contents copyright (c) 1997-2012 Computer Science Department, University of California, Davis All rights reserved. 6