International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 333 ISSN 2250-3153

On application of algebra of I

Emran Sasi Althabit *, Ismail.M.Mohamed **

* Higher Institute for water Affairs ** Academic of Engineering and Medical Sciences

DOI: 10.29322/IJSRP.11.02.2021.p11040 http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040

Abstract- We introduced in this paper the quaternions concepts and quaternions algebra, Representation of quaternions, transformation of in space exactly rotation and as application : Quaternions in space.

Key words: Quaternion, Complex quaternions , Interpolation of quaternions .

and I. INTRODUCTION i × j = k, j × k = i, k × i = j (1.5) he important of quaternions, appeared in a physics and a Which are very similar to the of two unit Cartesian T Computer programs. vectors. * In physic s , quaternions are correlated to nature of the universe at the level of quantum mechanics. They lead to elegant expression of the Lorentz transformations, which form the basis of the modern theory of relativity.[6] * In a computer programs transformation of quaternions use for Animation and Simulation, The Quaternion Fourier Transform (QFT) is a powerful tool , its application include face Fig.2 A one-to-one correspondence between 3 recognition and voice recognition in and robot kinematics as a pure quaternions and vectors in ℝ [3] simulation of nature of the universe. 3 1. Hamilton's Quaternions In the same year in which Hamilton discover the Definition1. 1:A quaternion is a four-dimensional complex quaternions wrote to his friend John Graves about his discovery that can be used to represent the orientation of a rigid body Three months later on December 26th Graves wrote to or coordinate frame in three-dimensional space. The Hamilton's Hamilton about his discovery of a kind of ‘double-quaternion’ quaternions ℍ can be generalized to allow coefficients in ℝ as that he called ‘octives’, today are they are known as octonions. ℍ = {푄 = 푤 + 푥푖 + 푦푗 + 푧푘: 푤, 푥, 푦, 푧 ∈ ℝ } Like quaternions octonions form a , but unlike Or ℍ = {(푤, 푥, 푦, 푧): 푤, 푥, 푦, 푧 ∈ ℝ } (1.1) quaternions they are not associative. They are related to So that quaternion is the sum of a scalar part 푤 and a vectorial geometries in 7 and 8 .[6] 3 part (푥, 푦, 푧) ∈ ℝ i.e.,if 푟⃗ = 푥푖 + 푦푗 + 푧푘 is position vector in 푂 = 푠 + 푒1푥1 + 푒2푥2 + 푒3푥3 + 푒4푥4 + 푒5푥5 + 푒6푥6 space quaternions is define as + 푒7푥7 (1.6) 7 푤 + 푥푖 + 푦푗 + 푧푘 ↔ 푤 + 푟⃗ = [푤, 푟⃗] (1.2) where (푥1, 푥2, 푥3, 푥4, 푥5푥6, 푥7) ∈ ℝ in simply where 푤 real part 푅푒(푞), and 푟⃗ represent imaginary part= 퐼푚(푞)-vector in Mathematically, octonions are the largest normed division 3-dimession space, If = 0 , the quaternion algebras. This means that they satisfy |푎푏|2 = |푎|2|푏|2. 푞 = 푥푖 + 푦푗 + 푧푘 (1.3) is called pure quaternion i.e., A 3D vector is a pure quaternion When Hamilton discovered quaternions had to give up whose real part is zero. commutative property in order to preserve the norm; now the where 푖 , 푗 and 푘 are the standard orthonormal basis in ℝ3. has to be given up in order to preserve the The multiplication for the primitive elements 푖, 푗 and 푘 is defined norm for the octonions. by 푖푗 = −푗푖 = 푘 A multiplication table for octonions can be made like 푗푘 = −푘푗 = 푖 quaternions as follows: (1.4) 푘푖 = −푘푖 = 푗

푖2 = 푗2 = 푘2 = 푖푗푘 = −1

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 334 ISSN 2250-3153

The square of a quaternion is given by 푄 = [푤, 푟⃗], then 푄2 = [푤, 푟⃗][푤, 푟⃗] = [푤2 − 푟⃗. 푟⃗, 2푤푟⃗ + 푟⃗ × 푟⃗] = [푤2 − 푟⃗. 푟⃗, 2푤푟⃗] 푄2 = [푤2 − 푥2 − 푦2 − 푧2, 2푤(푥푖 + 푦푗 + 푧푘)] (2.4) The square of a pure quaternion is 푄2 = [0, 푟⃗][0, 푟⃗] = [0 − 푟⃗. 푟⃗, 푟⃗ × 푟⃗] Some of the properties of octonions as they relate to quaternions = [−푟⃗. 푟⃗, 0] = [−(푥2 + 푦2 + 푧2), 0] are the multiplication table for octonions[6] 3- The quotient

We represent the quotient 푄1/푄2 as 푄 푄∗ 3 푄 = 푄 푄−1 = 1 2 (2.5) 3 1 2 | |2 푄2 Algebraic properties 2.2:

(1) Norm:

|푄| = √풘ퟐ + 풙ퟐ + 풚ퟐ + 풛ퟐ (2.6) and for two quaternions p , q satisfies the norm of product |퐐푷| = |퐐||푷| (2) Conjugate: 푄∗ = (풘 + 풙풊 + 풚풋 + 풛풌)∗ = 풘 − 풙풊 − 풚풋 − 풛풌 (2.7) For example: 푒푖, 푒푗, and 푒푘 can be represented as follows: and for two quaternions p , q satisfies the conjugate of product(푸푷)∗ = 푷∗푸∗ 푒푖 푒푗 = 푒푘; 푒푗푒푖 = − 푒푘 . (1.7) Let 1 be the multiplicative identity. (3) Multiplicative inverse: 푄∗ Let each circle in the diagram be 푸−ퟏ = (2.8) 2 |푄| represented by the relationship 푒푖 = −1[6] 2. Quaternions Algebras and for two quaternions P , Q satisfies the inverse of product −ퟏ −ퟏ −ퟏ The Operations on quaternions 2.1: (퐏푸) = 푸 퐏 (4) Real part of Q Let 푄1 and 푄2 be two quaternions , given as ∗ 푄 = 푤 + 푥 푖 + 푦 푗 + 푧 푘 푸 + 푸 1 1 1 1 1 , then 풘 = (2.9) 푄2 = 푤2 + 푥2푖 + 푦2푗 + 푧2푘 ퟐ 1- The addition and subtraction are define as (5) The 푄 ± 푄 = (푤 + 푥 푖 + 푦 푗 + 푧 푘) ± (푤 + 푥 푖 + 푦 푗 + 푧 푘) 푄ퟏ ∙ 푄ퟐ = 풘ퟏ풘ퟐ + 풙ퟏ풙ퟐ + 풚ퟏ풚ퟐ + 풛ퟏ풛ퟐ 1 2 1 1 1 1 2 2 2 2 ∗ = (푤 ± 푤 ) + (푥 ± 푥 )푖 + (푦 ± 푦 )푗 + (푧 ± 푧 )푘 (2.1) = 푄ퟏ ∙ 푄ퟐ (2.10) 1 2 1 2 1 2 1 2 ퟐ ퟐ ퟐ (6) The unit quaternion: has norm 1, i.e., |푄| = 풘 + 풙 + 풚 + 2- The multiplication 풚ퟐ = ퟏ (2.11) From multiplication of the primitive elements 푖, 푗 and 푘 is and inverse of unit quaternion 푄−ퟏ = 푄∗ defined multiplication of two quaternions 푄1 and 푄1as and it can be represented by 푄1푄2 = (푤1 + 푥1푖 + 푦1푗 + 푧1푘)(푤푡2 + 푥2푖 + 푦2푗 + 푧2푘) 푄 = 퐜퐨퐬 휽 + 퐮̂ 퐬퐢퐧 휽 (2.12) (푤1푤2 − 푥1푥2 − 푦1푦2 − 푧1푧2) Where 퐮̂ is the vector has length 1. However, observe that the +(푤푡 푥 + 푥 푤 + 푦 푧 − 푧 푦 )푖 quaternion product 퐮̂퐮̂ = −ퟏ = 1 2 1 2 1 2 1 2 (2.2) +(푤 푦 − 푥 푧 + 푦 푤 + 푧 푥 )푗 Note in general : a pure unit quaternion is a square root of −ퟏ, 1 2 1 2 1 2 1 2 such as imaginary units and Euler’s identity of quaternion +(푤푡1푧2 + 푥1푦2 − 푦1푥2 − 푧1푤푡2)푘 The unit Quaternion is normalised with respect to the Hermitian inner product , where 퐼2 is the 2x2 identity matrix. We have 푄1푄2 ≠ 푄2푄1 i.e., the multiplication of quaternions is not commutative in general . the quaternions is also A quaternion with a unit norm is called a normalised quaternion viewed as 푄 = 푤 + 푟⃗ , where 푄 푄 푟⃗ = 푥푖 + 푦푗 + 푧푘 , we identify with 3D vector (푥, 푦, 푧) so the dot 푄′ = = (2.13) product (∙) and cross product (×) of vectors introduced the |푄| √푤2 + |풓⃗⃗|2 familiar notation and so we define the canonical scalar product on (7) The unit length Euler's identity for quaternions ℍ by 퐞퐱퐩(퐮̂휽) = 퐜퐨퐬 휽 + 퐮̂ 퐬퐢퐧 휽 . (2.14) 푄1푄2 = (푤1 + 푟⃗1)(푤푡2 + 푟⃗2) where the exponential on the left-hand side is evaluated by 풏 풏 = (푤1푤2 − 푟⃗⃗⃗1⃗. 푟⃗⃗⃗2⃗) + 푤1푟⃗⃗⃗2⃗ + 푤2푟⃗⃗⃗1⃗ + 푟⃗⃗⃗1⃗ × 푟⃗⃗⃗2⃗ (2.3) 푄 = (퐜퐨퐬 휽 + 퐮̂ 퐬퐢퐧 휽) = 퐜퐨퐬(풏휽) + 퐮̂ 퐬퐢퐧(풏휽) The multiplication of quaternions is not a commutative = 퐞퐱퐩(퐮̂풏휽) (2.15) over a real so that it is called is a non-commutative (8) It is also possible to define the logarithm of a unit quaternion, algebra. 퐥퐧 푄 = 퐥퐧(퐜퐨퐬 휽 + 퐮̂ 퐬퐢퐧 휽)

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 335 ISSN 2250-3153

ퟎ ퟏ ퟎ 풊 = 퐥퐧 퐞퐱퐩(퐮̂휽) = 퐮̂휽 (2.16) 풋 = [ ] = [ ] 풊 , The quaternions can be thought of as a choice of a structure −ퟏ ퟎ −풊 ퟎ ퟎ 풊 ퟎ ퟏ (9) The quaternion polar coordinate representation is 풌 = [ ] = [ ] 풊 푄 = |푄|(퐜퐨퐬 휽 + 퐮̂ 퐬퐢퐧 휽) 풊 ퟎ ퟏ ퟎ so that if we define the matrices훔ퟏ, 훔ퟐ, 훔ퟑsuch that = |푄| 퐞퐱퐩(푢̂휽) (2.17) ퟏ ퟎ ퟎ −풊 ퟎ ퟏ 흈 = [ ] , 흈 = [ ] , 흈 = [ ] (3.3) (10) The multiplication of two vectors ퟏ ퟎ −ퟏ ퟐ 풊 ퟎ ퟑ ퟏ ퟎ If we multiply together two imaginary quaternions 푷, 푄 ∈ ℍ퐩, we can write where ℍ퐩 is set of pure quaternions we obtain a quaternionic 푄 = 풘ퟏ + 풙풊 + 풚풋 + 풛풌 ퟑ version of the scalar product and vector product on ℝ as = 푤ퟏ + 풊(풛흈ퟏ + 풚흈ퟐ + 풙흈ퟑ) (3.4) follows[10] The matrices훔ퟏ, 훔ퟐ, 훔ퟑare called the Pauli spin matrices. 푷푄 = −푷 · 푄 + 푷 ∧ 푄 ∈ ℝ ⊕ ℍ퐩 ≅ ℍ Note that the irtraces are null and that they are Hermitian (recall (2.18) that a complex matrix is Hermitian if it is equal to the transpose ∗ Others algebraic properties of its conjugate, i.e.,푨 = 푨). If we let 풆ퟎ = 풕, The set of quaternions satisfy some other algerbic properties that 풆ퟏ = 풛, 풆ퟐ = 풚and풆ퟑ = 풙, then 풒 can be written as worth mentioning 푄 = 풆ퟎퟏ + 풊(풆ퟏ흈ퟏ + 풆ퟐ흈ퟐ + 풆ퟑ흈ퟑ) (3.5) * The set of quaternions is an abelian group (ℍ, +)under And풆ퟎ, 풆ퟏ, 풆ퟐ, 풆ퟑ are called theEuler parametersof the rotation quaternion addition . specified by 푞 * The set of quaternions is not abelian rig (ℍ, +,∙)where + and ∙ |푄| = ퟏ, then we can write also are quaternion addition and multiplication .[14] 푄 = 퐜퐨퐬 ½휃 + 풊 퐬퐢퐧 ½휃 (휷흈ퟑ + 휸흈ퟐ + 휹흈ퟏ) (3.6) 3. Matrix representation of quaternion Where The are at least two ways for representation of ퟏ (휷, 휸, 휹) = (풙, 풚, 풛) quaternions as matrices in such way that quaternions addition and 퐬퐢퐧 ½휃 multiplication correspond to matrix addition and multiplication Letting 푨 = 휷흈ퟑ + 휸흈ퟐ + 휹흈ퟏ, it can be shown that .One is use 2×2 complex matrices ,and the other is to use 4×4 real 풆풙풑(풊휽푨) = 퐜퐨퐬 휽 ퟏ + 풊 퐬퐢퐧 휽푨 (3.7) matrices. In each case , the representation given is one of a family Note that : The exponential is the usual exponential of matrices, of lineally related representations .[13] i.e., for a square The 4×4 real matrix representation 3.1 풏 × 풏 matrix M The quaternion is written in 4×4 real matrix notation as follows (푨휽)풌 풘 −풙 −풚 −풛 풆풙풑(푨휽) = 푰풏 + ∑ 풙 풘 풛 −풚 풌! [푤, 푥풊 + 푦풋 + 푧풌] ↦ 푳 = [ ] (3.1) 풌≥ퟏ 푄 풚 −풛 풘 풙 Note that the rows (and columns) of such matrices are vectors 풛 풚 −풙 풘 inℂퟐthat are orthogonal with respect to the Hermitian inner Orthogonal Matrix product of ℂퟐgiven by We can demonstrate that the unit-norm quaternion matrix is T ℋ⊂Furthermore, their norm is orthogonal the product of LQ with its transpose L푄∗ = LQ equals the identity matrix 퐼(where I is 4×4 marix). √휶휶̅ + +훽휷̅ = √풘ퟐ + 풙ퟐ + 풚ퟐ + 풛ퟐ The 2×2 complex matrix representation 3.2 and the determinant of 푨 is We switch from thinking of ℍ as 4-D with real scalars and basis 풘ퟐ + 풙ퟐ + 풚ퟐ + 풛ퟐ , 풊, 풋, 풌 , to being 2-D with complex scalars and basis ퟏ, 풋 by writing The ℝퟑis a Lie algebra 3.3

푄 = 풘 + 풙풊 + 풚풋 + 풛풌 If we define the Lie bracket onℝퟑas the usual cross product 풖 × ( ) ( ) = 풘 + 풙풊 + 풚 + 풛풊 풋 퐯 of vectors. Then the Lie algebra of 푺푼(ퟐ) is isomorphic to = 휶 + 휷풋 (ℝퟑ,×) Where the map 푗: 훼 + 훽푗 ↦ −훽̅ + 훼̅푗 and the exponential map can be viewed as a map 풆풙풑: (ℝퟑ,×) → is a conjugate-linear involution of ℂ2 with 푗2 = −1This 푺푼(ퟐ) given bythe formula identification ℍ ≅ ℂ2. [10] 풆풙풑(휽퐮̂) = [퐜퐨퐬 ½휃 , 퐬퐢퐧 ½휃 퐮̂] (3.8) Having written this down, it is easy to form the map: ℍ → ℋ ⊂ a vector is rotated about the axis 퐮̂ by an angle 훉. This half-angle 푀푎푡(2, ℂ) representation was 휶 휷 discovered by Rodrigues . 푄 = 훂 + 훃퐣 ↦ 푴푄 = [ ̅ ] (3.2) −휷 휶̅ ퟏ ퟎ 풊 ퟎ ퟏ = [ ] , 풊 = [ ], Note that the squared norm 푄 푄∗ of a quaternion q is the ퟎ ퟏ ퟎ −풊 ퟎ ퟏ ퟎ 풊 same as the determinant of the matrix 퐌푄 ∈ ℍ. The isomorphism 풋 = [ ] , 풌 = [ ] −ퟏ ퟎ 풊 ퟎ 퐌퐐 gives an easy way to deduce that ℍ is an associative division The quaternion algebra can thus be algebra; the inverse of any nonzero matrix 퐀 ∈ ℍ is also in ℍ, realised as a real subalgebra of and the only matrix in ℍ whose determinant is zero is the zero Mat(2, ℂ), using the icidentifations matrix i.e., the quaternion algebra can be viewed as a union of 풊 ퟎ ퟏ ퟎ 풊 = [ ] = [ ] 풊, complex planes, so the hyperbolic quaternion algebra is a union of ퟎ −풊 ퟎ −ퟏ split- planes sharing the same .

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 336 ISSN 2250-3153

4. complex quaternion As we see from (4.2) that the result is a general quaternion with a Definition.4.1: A complex quaternion is an element of the form scalar and a vector component. 푸 = 푨ퟎ + 푨ퟏ풆ퟏ + 푨ퟐ풆ퟐ + 푨ퟑ풆ퟑ (4.1) As special case: If 퐯̂ perpendicular to 풓⃗⃗ , the dot product term 흀퐯̂. 풓⃗⃗ where in (4.2) vanish, and we have left with the pure quaternion ′ 푨ퟎ, 푨ퟏ, 푨ퟐand푨ퟑ complex numbers and풆ퟏ, 풆ퟐ풆ퟑare quaternionic 푷 = [ퟎ, 풘풓⃗⃗ + 흀퐯̂ × 풓⃗⃗] (4.3) units which satisfy the equalities 풓⃗⃗ is perpendicular to 퐯̂, and 퐯̂ × 풓⃗⃗ is perpendicular to the plane ퟐ ퟐ ퟐ 풆ퟏ = 풆ퟐ = 풆ퟑ = 풆ퟏ풆ퟐ풆ퟑ = −ퟏ , containing 풓⃗⃗ and 퐯̂. Now because 퐯̂ is a unit vector. 풆ퟏ풆ퟐ = −풆ퟐ풆ퟏ = 풆ퟑ , In general Case: We begin by defining a unit-norm quaternion 푸: (4.2) ퟐ ퟐ 풆ퟐ풆ퟑ = −풆ퟑ풆ퟐ = 풆ퟏ , 푸 = [풘, 흀퐯̂] where 풘 + 흀 = ퟏ , The vector 풓⃗⃗ to be rotated is 풆ퟑ풆ퟏ = −풆ퟏ풆ퟑ = 풆ퟐ . encoded as a pure quaternion 푷 = [ퟎ, 풓⃗⃗], and the inverse As a consequence of this dentition, a complex quaternion Q can quaternion 푸−ퟏ = [풘, −흀퐯̂]. also be written Therefore, the product 푸푷푸−ퟏis ∗ 푸 + 풊푸 (4.3) 푸푷푸−ퟏ = [풘, 흀퐯̂][ퟎ, 풓⃗⃗][풕, −흀퐯̂] ∗ ퟐ Where 푸 , 푸 are real quaternions and 풊 = −ퟏ. = [−흀퐯̂. 풓⃗⃗, 풘풓⃗⃗ + 흀퐯̂ × 풓⃗⃗][풘, −흀퐯̂] The set of all complex quaternions is denoted by ℍℂ . Also, a = [ퟎ, ퟐ흀ퟐ(퐯̂. 풓⃗⃗)퐯̂ + (풕ퟐ − 흀ퟐ)풓⃗⃗ + ퟐ흀풕퐯̂ × 풓⃗⃗](4.4) complex quaternion 퐐 is a sum of a scalar and a vector , called Now, if we want this product to actually rotate the vector by θ, scalar part 푺푸 = 푨ퟎ and vector part then we must build this in from the outset by halving θ in 푸. 퐕퐐 = 푨ퟏ풆ퟏ + 푨ퟐ풆ퟐ + 푨ퟑ풆ퟑ (4.4) Hamilton calls the angle (0 ≤ 휃 ≤ 휋) the angle of , and calls the If 푺푸 = ퟎ; then Q is called pure complex quaternion, we may call unit vector v̂ the axis of 푸. it a complex vector. The algebra of can be Theorem: For any unit quaternion considered as a tensor product ℂ ⊗ ℍ 푸 = [푤, r⃗] = cos ½휃 + v̂ sin ½휃 3 (taken over the reals)where ℂ is the field of complex numbers and and for any vector v⃗⃗ ∈ ℝ the action of operator 퐿푞 on v⃗⃗ is ℍ is the algebra of real quaternions . In other words, the bi- equivalent to rotation of the vector through angle 휃 about v̂ as the quaternions are just the complexication of the real quaternions. axis of rotation ∗ The product of two complex quaternions 푸 = 푺푸 + 퐕⃗⃗⃗퐐 and 푷 = 퐿푸(v⃗⃗) = 푸v⃗⃗푸 We substitute the unit quaternion in this form to obtain the 푺푷 + 퐕⃗⃗⃗퐏 and If a complex quaternion is looked at as a four- dimensional vector, the complex resulting vector form rotating a vector v⃗⃗ about the axis v̂ through quaternion product can be describe by a matrix-vector products as: 휃: −ퟏ 푨ퟎ −푨ퟏ −푨ퟐ −푨ퟑ 푩ퟎ 퐿푸(v⃗⃗) = 푸푷푸 = 푨ퟏ 푨ퟎ −푨ퟑ 푨ퟐ 푩ퟏ [ퟎ, (ퟏ − 퐜퐨퐬 휽)(퐯̂. 풓⃗⃗)퐯̂ + 퐜퐨퐬 휽 풓⃗⃗ + 퐬퐢퐧 휽 퐯̂ × 풓⃗⃗](4.4) 푸푷 = [ ] [ ] (4.5) −ퟏ 푨ퟐ 푨ퟑ 푨ퟎ −푨ퟏ 푩ퟐ The product 푸푷푸 was discovered by Hamilton who failed to 푨ퟑ −푨ퟐ 푨ퟏ 푨ퟏ 푩ퟑ publish the result. Cayley, also discovered the product and From now one, we will identify the quaternion with the “complex” published the result in 1845 [8]. However, quaternion .[4] Altmann notes that “in Cayley’s collected papers he concedes priority to Hamilton” [2], which was a nice gesture. However, the 5. Quaternions in Space person who had recognised the importance of the half-angle In 1898 the German mathematician, Adolf Hurwitz (1859– parameters in (3.8) before Hamilton and Cayley was Rodrigues— 1919), proved that the product of the sum of 풏 squares by the sum who published a solution that was not seen by Hamilton, but of 풏 squares is the sum of n squares only when 풏 is equal to 1, 2, apparently, was seen by Cayley. 4 and 8, which are represented by the reals, complex numbers, Quaternions in Matrix Form of 푸푷푸−ퟏ. quaternions and octonions. This is known as ‘Hurwitz’s Theorem’ The are two methods: the first is a simple vectorial method which or the ‘1, 2, 4, 8 Theorem’. No other system is possible, which translates the vector equation representing 푸푷푸−ퟏ directly into shows how important quaternions are within the realm of matrix form. The second method uses matrix algebra to develop a mathematics. Consequently, Hamilton’s rather cunning solution. search for a system of triples was futile, because there is no three- Vector Method square identity. For the vector method it is convenient to describe the unit-norm Aunit-norm quaternion 푸 used to rotate quaternion as a vector 퐯⃗⃗ stored as a pure quaternion p as the product 푸푷 , where 푸 = [풘, 퐯⃗⃗] = [풘, 푥풊 + 푦풋 + 푧풌] , where 풕ퟐ + |퐯⃗⃗|ퟐ = ퟏ 푸 = [풘, 흀퐯̂], 풘, 흀 ∈ ℝ, 퐯̂ ∈ ℝퟑ, and the pure quaternion as ퟐ ퟐ (ퟒ. ퟏ) |퐯̂| = ퟏ , 풘 + 흀 = ퟏ . 푷 = [ퟎ, 풖⃗⃗⃗] = [ퟎ, 퐮풙풊 + 퐮풚풋 + 퐮풛풌] and the pure quaternion 푷 stores the vector 풓⃗⃗ to be rotated: A simple way to compute 푸푷푸−ퟏ is to use (4.3) and substitute |퐯⃗⃗| 푷 = [ퟎ, 풓⃗⃗] , 풑 ∈ ℝퟑ for λ We compute the product 푷′ = 푸푷 푸푷푸−ퟏ = [ퟎ, ퟐ흀ퟐ(퐯̂. 풖⃗⃗⃗)퐯̂ + (풘ퟐ − 흀ퟐ)풖⃗⃗⃗ + ퟐ흀풘퐯̂ × 풖⃗⃗⃗] and examine the vector part of p = [ퟎ, ퟐ|퐯⃗⃗|ퟐ(퐯̂. 풖⃗⃗⃗)v̂ + (풘ퟐ − |퐯⃗⃗|ퟐ)풖⃗⃗⃗ + ퟐ|퐯⃗⃗|풘퐯̂ × 풖⃗⃗⃗] to see if 푷 is rotated: Next, we substitute 퐯⃗⃗ for |퐯⃗⃗|퐯̂: 푷′ = 푸푷 = [풘, 흀퐯̂][ퟎ, 풓⃗⃗] 푸푷푸−ퟏ = [ퟎ, ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗ + (풘ퟐ − |퐯⃗⃗|ퟐ)풖⃗⃗⃗ + ퟐ풘퐯⃗⃗ × 풖⃗⃗⃗] = [−흀퐯̂. 풓⃗⃗, 풘풓⃗⃗ + 흀퐯̂ × 풓⃗⃗] (ퟒ. ퟐ)

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 337 ISSN 2250-3153

Since we are working with unit-norm quaternions to prevent Consider a rotation about an axis defined by (1,1,1) through angle scaling 2휋/3 about the axis . 1 풘ퟐ + |퐯⃗⃗|ퟐ = ퟏ ⇒ 풘ퟐ − |퐯⃗⃗|ퟐ = ퟐ풘ퟐ − ퟏ We define a unit vector 푢̂ = (1,1,1) Therefore, √3 Let rotation angle 휃 = 2휋/3, then Q of rotation define as: 푄 = 푸푷푸−ퟏ = [ퟎ, ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗ + (ퟐ풘ퟐ − ퟏ)풖⃗⃗⃗ + ퟐ풘퐯⃗⃗ × 풖⃗⃗⃗] cos ½휃 + sin ½휃 v̂ If we let 푷′ = 푸푷푸−ퟏ , which is a pure quaternion, we have √3 1 ퟐ 푄 = [½, × (1,1,1)] = [½, ½(1,1,1)], then [ퟎ, 푢⃗⃗] = [ퟎ, ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗ + (ퟐ풘 − ퟏ)풖⃗⃗⃗ + ퟐ풘퐯⃗⃗ × 풖⃗⃗⃗] 2 √3 푢⃗⃗ = ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗ + (ퟐ풘ퟐ − ퟏ)풖⃗⃗⃗ + ퟐ풘퐯⃗⃗ × 풖⃗⃗⃗ (4.5) 0 0 1 We are only interested in the rotated vector v⃗⃗ comprising the three 퐿푄 = [1 0 0], let us compute the effect of rotation on the basic terms ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗, 0 1 0 ( ) (ퟐ풘ퟐ − ퟏ)풖⃗⃗⃗, ퟐ풘퐯⃗⃗ × 풖⃗⃗⃗, which can be represented by three vector 푖 = 1,0,0 , we obtain the resulting vector 0 0 1 1 0 individual matrices and 퐿 v⃗⃗ = 퐿 푖 = [1 0 0] [0] = [1] = 푗 . [13] summed together. 푄 푄 0 1 0 0 0 ퟐ(퐯⃗⃗. 풖⃗⃗⃗)퐯⃗⃗ = ퟐ(풙퐮풙 + 풚퐮풚 + 퐳퐮풛)(푥풊 + 푦풋 + 푧풌) Problem.2 2 ° ퟐ푥 푥푦 푥푧 풖풙 To rotate point P(0,1,1) about y- axis through angle 휃 = 90 . 2 [ 푥푦 ퟐ푦 푦푧 ] [풖풚] The Q of rotation define as: 2 2 2 풖풛 √ ,√ 푗 푥푧 푦푧 ퟐ푧 푄 = cos ½휃 + sin ½휃 v̂ = [ 2 2 ] (ퟐ풘ퟐ − ퟏ)풖⃗⃗⃗ = (ퟐ풘ퟐ − ퟏ)풖 풊 + (ퟐ풘ퟐ − ퟏ)풖 풋 √2 √2 풙 풚 Substituting 푤 = , 푥 = 0 , 푦 = , 푧 = 0 + (ퟐ풘ퟐ − ퟏ)풖 풌 2 2 풛 There fore ퟐ풘ퟐ − ퟏ ퟎ ퟎ 풖풙 ퟐ 0 0 1 0 1 (ퟐ풘 − ퟏ)풖⃗⃗⃗ = [ ퟐ ] [풖풚] ퟎ ퟐ풘 − ퟏ ퟎ 퐿 u⃗⃗ = [ 0 1 0] [1] = [1] = 푖 + 푗. [5] ퟐ 풖 푄 ퟎ ퟎ ퟐ풘 − ퟏ 풛 −1 0 0 1 0 ퟐ푤퐯⃗⃗ × 풖⃗⃗⃗ = ퟐ풘 ((퐮풛풚 − 풛퐮풚)풊 + (퐮풙풛 − 풛퐮풙)풋 Matrix Method 푇 It is obvious that 퐿 ∗ = 퐿 ,the transpose of 퐿 , and similarly, + (퐮 풙 − 풙퐮 )풌) 푄 푄 푄 풚 풚 푇 푅푃∗ = 푅푃 . ퟎ −ퟐ풘푧 ퟐ풘푦 풖풙 ∗ 푇 ퟐ Since 푄푄 = |푄|, the matrix 퐿푄퐿푄is the diagonal matrix (ퟐ풘 − ퟏ)풖⃗⃗⃗ = [ ퟐ풘푧 ퟎ −ퟐ풘푥] [풖풚] 풖 |푄|퐼(where 퐼is the identity 4×4 matrix), and similarly the matrix −ퟐ풘푦 ퟐ풘푥 ퟎ 풛 푇 ∗ 푅푃푅푃 Adding these matrices together: 푢⃗⃗ = 푄v⃗⃗푄 푇 ퟐ 2 is the diagonal matrix |푃|퐼. Since 퐿푄and 퐿푄 have the same ퟐ(풘 + 푥 ) − ퟏ ퟐ(푥푦 − 풘푧) ퟐ(푥푧 + 풘푦) 풖풙 ퟐ 2 풖 determinant, we deduce that [ ퟐ(푥푦 + 풘푧) ퟐ(풘 + 푦 ) − ퟏ ퟐ(푦푧 − 풘푥) ] [ 풚] (4.6) 2 | |4 ퟐ(푥푧 − 풘푦) ퟐ(푦푧 + 풘푥) ퟐ(풘ퟐ + 푧2) − ퟏ 풖풛 det(퐿푄) = 푄 ,and thus ∗ 2 Or 푢⃗⃗ = 푄v⃗⃗푄 det(퐿푄) = ±|푄| .Then 2 2 2 2 2 2 ퟏ − ퟐ(푦 + 푧 ) ퟐ(푥푦 − 풘푧) ퟐ(푥푧 + 풘푦) 풖풙 푑푒푡(퐿푄) = 푤 + 푥 + 푦 + 푧 (5.11) 2 2 [ ퟐ(푥푦 + 풘푧) ퟏ − ퟐ(푥 + 푧 ) ퟐ(푦푧 − 풘푥) ] [풖풚] (4.7) This shows that when 푄 is a unit quaternion, 퐿푄is a rotation matrix, 2 2 ퟐ(푥푧 − 풘푦) ퟐ(푦푧 + 풘푥) ퟏ − ퟐ(푥 + 푦 ) 풖풛 and similarly when 푃 is a unit quaternion, 푅푃 is a rotation matrix Or 푢⃗⃗ = 푄v⃗⃗푄∗ . 2 2 2 2 푤 + 푥 − 푦 − 푧 ퟐ(푥푦 − 풘풛) ퟐ(푥푧 + 풘풚) 풖풙Define the map 휑: ℍ × ℍ → ℝas follows: 2 2 2 2 ̅ [ ퟐ(푥푦 + 풘풛) 푤 − 푥 + 푦 − 푧 ퟐ(푦푧 − 풘풙) ] [풖풚휑]( 푄, 푃) = ½푇푟(푄푃) = 푤푤′ + 푥푥′ + 푦푦′ + 푧푧′ (5.12) ퟐ(푥푧 − 풘풚) ퟐ(푦푧 + 풘풙) 푤2 − 푥2 − 푦2 + 푧2 풖풛 (4.8) It is easily verified that 휑 is bilinear, symmetric, and definite positive. Thus, the quaternions form a Euclidean space under the If we reverse the product. To compute the vector part of 푸−ퟏ푷푸 inner product defined by 휑 (see Berger [12], Dieudonn´ e [46], all that we have to do is reverse the sign of 퐯⃗⃗ × 풖⃗⃗⃗ , 푢⃗⃗ = 푄∗v⃗⃗푄 Bertin [15]). ퟐ(풘ퟐ + 푥2) − ퟏ ퟐ(푥푦 + 풘푧) ퟐ(푥푧 − 풘푦) 풖 풙 It is immediate that under this inner product, the norm of a ퟐ 2 [ ퟐ(푥푦 − 풘푧) ퟐ(풘 + 푦 ) − ퟏ ퟐ(푦푧 + 풘푥) ] [풖풚] (4.9) quaternion 푄 is just √|푄|. As a Euclidean space,ℍis isomorphic ퟐ 2 풖풛 ퟐ(푥푧 + 풘푦) ퟐ(푦푧 − 풘푥) ퟐ(풘 + 푧 ) − ퟏ to 퐸4. It is also immediate that the subspace ℍ of pure Or 푢⃗⃗ = 푄∗v⃗⃗푄 푝 2 2 quaternions is orthogonal to the space of “real quaternions”ℝ1. ퟏ − ퟐ(푦 + 푧 ) ퟐ(푥푦 + 풘푧) ퟐ(푥푧 − 풘푦) 풖풙 2 2 The subspace ℍ푝 of pure quaternions inherits a Euclidean [ ( ) ( ) ( ) ] [풖풚] (4.10) ퟐ 푥푦 − 풘푧 ퟏ − ퟐ 푥 + 푧 ퟐ 푦푧 + 풘푥 structure, and this subspace is isomorphic to the Euclidean space 2 2 풖 ퟐ(푥푧 + 풘푦) ퟐ(푦푧 − 풘푥) ퟏ − ퟐ(푥 + 푦 ) 풛 퐸3. Since Hand 퐸4are isomorphic Euclidean spaces, their groups we Observe that (4.8) is the transpose of (4.6), and (4. 9) is the of rotations 푆푂(ℍ)and 푆푂(4) are isomorphic, and we will identify transpose of (4.7) them.Similarly, we will identify 푆푂(ℍ )and 푆푂(3). Where 푝 Quaternions and Rotations in SO(3) [ ] −ퟏ 0, 푢⃗⃗ = 푸 풑푸 The group of 푆푂(3)is isomorphic to the group U(2) of quaternions Problem.1 푒푥푝(v̂휃) = cos 휃 + v̂ sin 휃 of unit length.

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 338 ISSN 2250-3153

Consider the sphere 푆3in ℝ4 , and special unitary 2×2martix We observe that the columns (and the rows) of the above matrices 푆푈(2) are orthogonal. Thus, when Q and P are unit quaternions, both LQ 3 4 Recall that the 3-sphere 푆 is the set of points (푥, 푦, 푧, 푡) ∈ ℝ such and RP are orthogonal matrices . that Multiple Rotations 푥2 + 푦2 + 푧2 + 푡2 = 1 Say a vector or frame of reference is subjected to two rotations 3 3 and that the real projective space ℝ푃 is the quotient of 푆 modulo specified by 푄1 the equivalence relation that identifies antipodal points (where followed by 푄2. There is a temptation to convert both quaternions (푥, 푦, 푧, 푡)and (푥, −푦, −푧, −푡))are antipodal points). to their respective The group 푆푂(3) of rotations of ℝ3 is intimately related to the 3- matrix and multiply the matrices together. However, this not the sphere 푆3and to the real projective space ℝ푃3.The key to this most efficient way relationship is the fact that rotations can be represented by of combining the rotations. It is best to accumulate the rotations as quaternions, discovered by Hamilton in 1843. Historically, the quaternions and quaternions were the first instance of a skew field. As we shall see, then convert to matrix notation, if required. quaternions represent rotations in ℝ3 . Then every plane rotation To illustrate this, consider the pure quaternion 푃 subjected to the 휌휃 by an angle 휃is represented by multiplication by the quaternion first quaternion 푄1 ′ ′ ∗ 푒푥푝(v̂휃) ∈ 푆푈(2) , in the sense that for all 푄, 푄 ∈ ℍ: 푄 = 푄1푃푄1 ′ 휌휃(푄) iff 푄 = 푒푥푝(v̂휃)푄 followed by a second quaternion 푄2 ∗ ∗ 푄2(푄1푃푄1)푄2 If푄 = 푥푖 + 푦푗 + 푧푘 and 푃 = 푥′푖 + 푦′푗 + 푧′푘 are pure which can be expressed as ∗ ∗ ∗ quaternions, identifying 푄 and 푃 with the corresponding vectors 푄2(푄1푃푄1)푄2 = (푄2푄1)푃(푄2푄1) (4.17) in ℝ3 ,the inner product 푄 · 푃and the cross product 푄 × 푃 make Extra quaternions can be added accordingly. ∗ ∗ ∗ ∗ ∗ sense, and letting [0, 푄 × 푃] denote the quaternion whose first 푄3[푄2(푄1푃푄1)푄2]푄3 = 푄3[(푄2푄1)푃(푄2푄1) ]푄3 ∗ ∗ ∗ component is 0 and whose last three components are those of 푄 × 푄3(푄2푄1)푃(푄2푄1) 푄3 = (푄3푄2푄1)푃(푄3푄2푄1) ∗ ∗ ∗ ∗ 푃, we have the remarkable identity 푄3[푄2(푄1푃푄1)푄2]푄3 = (푄3푄2푄1)푃(푄3푄2푄1) QP = −(푄 · 푃)1 + [[0, 푄 × 푃] (4.13) More generally, given quaternion Eigenvalue and Eigenvector 푄 = 푡1 + 푥푖 + 푦푗 + 푧푘, we can write it Although there is no doubt that (4.6) is a rotation matrix, we can as = [푤, (푥, 푦, 푧)] , where 푤 is called the scalar part of 푄 and secure further (푥, 푦, 푧)thepure part of 푄. Then if 푄 = [푤, v⃗⃗]and 푃 = [푤′, v⃗⃗′]it is evidence by calculating its eigenvalue and eigenvector. The easily seen that the quaternion product 푄푃can be expressed as eigenvalue should be θ 푄푃 = [푤푤′ − v⃗⃗. v⃗⃗′, 푤v⃗⃗′′ + 푤′v⃗⃗ + v⃗⃗ × v⃗⃗′] (4.14) where −1 The above formula for quaternion multiplication allows us to show 푇푟(푄v⃗⃗푄 ) 2 2 2 2 2 2 the = ퟏ − ퟐ(푦 + 푧 ) + ퟏ − ퟐ(푥 + 푧 ) + ퟏ − ퟐ(푥 + 푦 ) 2 2 2 2 2 2 following fact. Let 푍 ∈ ℍ, and assume that 푍푄 = 푄푍 for all 푄 ∈ = 4푤 + 2(푤 + 푥 + 푦 + 푧 ) − 3 = 4푤 − 1 2 2 ℍ.We claim that the pure part of 푍 is null, i.e., 푍 = 푤1 for some = 4 cos ½휃 − 1 = 4 cos 휃 + 4 sin ½휃 − 1 푤 ∈ ℝ. = 4 cos 휃 + 2 − 2 cos 휃 − 1 = 1 + 2 cos 휃 Indeed ,writing 푍 = [푤, u⃗⃗], if u⃗⃗ ≠ 0 and −1 there is at least one non null pure quaternion푄 = [0, v⃗⃗] such that cos 휃 = ½(푇푟(푄v⃗⃗푄 ) − 1) (4.18) u⃗⃗ × v⃗⃗ ≠ 0. To compute the eigenvector of (4.6) we use the three equations For arbitrary quaternions 푄 = [푤, v⃗⃗]and 푥푣 = (푎22 − 1)(푎33 − 1) − 푎23푎32 푃 = [푤, v⃗⃗′], satisfies Lie algebra 푦푣 = (푎11 − 1)(푎33 − 1) − 푎13푎31 (4.19) [푄, 푃] = 푄푃 − 푃푄 = [0,2(v⃗⃗ × v⃗⃗′)] (4.15) 푧푣 = (푎11 − 1)(푎22 − 1) − 푎12푎21 Therefore, and that for pure quaternions 푄, 푃 ∈ ℍ푝 2 2 2 2(푄 · 푃))1 = −(푄푃 + 푃푄). (4.16) 푥푣 = 4푥 , 푦푣 = 4푦 and 푧푣 = 4푧 , which confirm that the Since quaternion multiplication for a given 푄 is bilinear, the map eigenvector has components associated with the quaternion’s vector. The square terms should be no surprise, as the triple 푃 ↦ 푄푃 is linear, and similarly for a given 푃, the map 푄 ↦ 푄푃 is −1 linear. It is immediate that if the matrix of the first map is 퐿 and 푄푃푄 푄 includes the product of three quaternions. the matrix of the second map is 푅 , then 푃 푤 −푥 −푦 −푧 푤′ 푥 푤 푧 −푦 ′ Frames of Reference 푄푃 = 퐿 푃 = [ ] [푥 ] (4.17) −1 푞 푦 −푧 푤 푥 푦′ The product 푄푃푄 is used for rotating points about the vector 푧 푦 −푥 푤 ′ associated with the 푧 −1 and 푄푃 = Quaternion Q, whereas the triple 푄 푃푄 can be used for rotating ′ ′ points about the 푤′ −푥′ −푦 −푧 푤 ′ ′ same vector in the opposite direction. 푥′ 푤′ 푧 −푦 푥 푅 푄 = [ ] (4.18) But this reverse rotation is also equivalent 푝 푦′ −푧′ ′ ′ 푦 푤 푥 to a change of frame of reference. [ 푧′ 푦′ ′ ′ ] 푧 −푥 푤

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 339 ISSN 2250-3153

1 Interpolating Quaternions 푥 = (푎 − 푎 ) 4푡 32 23 Like vectors, quaternions can be interpolated to compute an in- 1 푦 = (푎 − 푎 ) (4.22.3) between quaternion. 4푡 13 31 However, whereas two interpolated vectors results in a third vector 1 푧 = (푎 − 푎 ) that is readily 4푡 21 12 visualised, two interpolated quaternions results in a third quaternion that acts as a Euler Angles to Quaternion rotor, and is not immediately visualised. Perhaps the most important property of quaternions isthat they can characterize rotations in a three dimensional space. The conventional way of representing three-dimensional rotations is by using a set of Euler angles {휓, 휑, 휃} which denote rotations about independent coordinate axes. The function that maps this 3 transformation to its corresponding rotation matrix 푹풛풚풙: ℝ → 푆푂(3) is:[8] 푢⃗⃗ = 푄푧푄푦푄푥v⃗⃗ = 푅휓,푧푅휑,푦푅휃,푥v⃗⃗ Fig. 4 Spherical linear 푥′ interpolation between two unit [푦′] ′ quaternions [3] 푧 The spherical interpolant for vectors is cos 휓 − sin 휓 0 cos 휑 0 sin 휑 1 0 0 푥 sin(1 − 푡)휃 sin 푠휃 = [sin 휓 cos 휓 0] [ 0 1 0 ] [0 cos 휃 − sin 휃] [푦] v⃗⃗ = v + v (4.19) sin 휃 1 sin 휃 2 0 0 1 − sin 휑 0 cos 휑 0 sin 휃 cos 휃 푧 where 휃 is the angle between the vectors, The spherical linear (4.23)[3] Expanding, we find 푤 , 푥′, 푦′ and 푧′, we get interpolation between Q1and Q2 is given by: Slerp(Q1, Q2; 푡) sin(1 − 푡)휃 sin 푠휃 푤 = cos ½휓 cos ½휑 cos ½휃 + sin ½휓 sin ½휑 sin ½휃 ′ 푄 = Q1 + Q2, 0 ≤ 푡 < 1 (4.20) 푥 = cos ½휓 cos ½휑 sin ½휃 − sin ½휓 sin ½휑 cos ½휃 sin 휃 sin 휃 (4.24) So, given 푦′ = cos ½휓 sin ½휑 cos ½휃 − sin ½휓 cos ½휑 sin ½휃 Q = [푤 , 푥 푖 + 푦 푗 + 푧 푘] 푧′ = sin ½휓 cos ½휑 cos ½휃 − cos ½휓 sin ½휑 sin ½휃 1 1 1 1 1 Q2 = [푤2, 푥2푖 + 푦2푗 + 푧2푘] where ′ ′ ′ 휃 is obtained by taking the 4D dot product of Q1and Q2: 푞 = [푤, 푥 푖 + 푦 푗 + 푦 푘] (4.25) Q1Q2 And the three rotation transforms cos 휃 = (4.21) 1 0 0 |Q1||Q2| 푤 푤 + 푥 푥 + 푦 푦 + 푧 푧 푅휃,푥 = [0 cos 휃 − sin 휃] cos 휃 = 1 2 1 2 1 2 1 2 |Q ||Q | 0 sin 휃 cos 휃 1 2 cos 휑 0 sin 휑 and if we are working with unit-norm quaternions, then 푅 = [ 0 1 0 ] cos 휃 = 푤 푤 + 푥 푥 + 푦 푦 + 푧 푧 훷,푦 (4.26) 1 2 1 2 1 2 1 2 − sin 휑 0 cos 휑

Converting a Rotation Matrix to a Quaternion cos 휓 − sin 휓 0 The matrix transform equivalent to 푞푝푞−1 푅휓,푧 = [sin 휓 cos 휓 0] is: 0 0 1 Then 푄푃푄−1 푅 , 푅 , 푅 ퟏ − ퟐ(푦2 + 푧2) ퟐ(푥푦 − 풘푧) ퟐ(푥푧 + 풘푦) 휓,푧 휑,푦 휃,푥 C 흍 C φ - S 흍 C θ + C 흍 S φ S θ S 흍 sin θ + C 흍 S φ C θ ( ) ( 2 2) ( ) = [ ퟐ 푥푦 + 풘푧 ퟏ − ퟐ 푥 + 푧 ퟐ 푦푧 − 풘푥 ] = [S 흍 cos φ C 흍 C θ + S 흍 S φ S θ - C 흍 S θ + S 흍 S φ C θ] 2 2 ퟐ(푥푧 − 풘푦) ퟐ(푦푧 + 풘푥) ퟏ − ퟐ(푥 + 푦 ) - S φ C φ S θ C φ C θ 푎 푎 푎 11 12 13 (4.27) 푎 푎 푎 = [ 21 22 23] (4.22.1) Then the most general rotation of a rigid body with a fixed point 푎 푎 푎 31 32 33 can be achieved by a single rotation about an axis through the fixed Inspection of the matrix shows that by combining various point. If 푣 = (푙, 푚, 푛) denote a vector in 3-D space, then a elements we can isolate rotational transformation by an angle θabout this vector is given the terms of a quaternion 푡, 푥, 푦, 푧. For example, by adding the by [3] terms 풙′ 푎 + 푎 + 푎 we obtain 11 22 33 [풚′] 푎 + 푎 + 푎 = 4푡2 − 1 11 22 33 풛′ therefore, 풍ퟐ(ퟏ − 퐂 휽) + 퐂 휽 풍풎(ퟏ − 퐂 휽) − 풏 퐒 휽 풏풍(ퟏ − 퐂 휽) + 풎 퐒 휽 풙 푡 = ±½√1 + 푎11 + 푎22 + 푎33 (4.22.2) = [풍풎(ퟏ − 퐂 휽) + 풏 퐒 휽 풎ퟐ(ퟏ − 퐂 휽) + 퐂 휽 풎풏(ퟏ − 퐂 휽) − 풍 퐒 휽] [풚] To find and we use 푥, 푦 푧 풏풍(ퟏ − 퐂 휽) − 풎 퐒 휽 풎풏(ퟏ − 퐂 휽) + 풍 퐒 휽 풏ퟐ(ퟏ − 퐂 휽) + 퐂 휽 풛 (5.28) Where,푢⃗⃗ = (푥′, 푦′, 푧′) , v⃗⃗ = (푥, 푦, 푧) and 푄 = (cos ½휃 + 푙 sin ½휃 + +푚 sin ½휃 + 푛 sin ½휃)

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org International Journal of Scientific and Research Publications, Volume 11, Issue 2, February 2021 340 ISSN 2250-3153

(5.29) [5] [5] John Vince ,Quaternions for Coumputer Graphics, Springer [6] [6] Johannes C. Familton, QUATERNIONS A HISTORY OF COMPLEX NONCOMMUTATIVE ROTATION GROUPS IN THEORETICAL PHYSICS, Columbia University,2015. ONCLUSION II. C [7] [7] Jernej T. Barbic , Quaternions and Rotations , University of Southern In this paper, compact overview of mathematical California , CSCI 520 Computer Animation and Simulation. constructs used most often quaternion rotation operator acting on [8] [8] Jelena-Z.Vidakovic and others , Advanced Quaternion Forward Kinematics Algorithm Including Overview of Different Methods for Robot any vector v⃗⃗ in the three-dimensional space. Thisoperator plays an Kinematics, University of Belgrade Loia institute 198.Vol.42 No3 2014 important role in classical mechanics as well as in computer [9] [9] Jean Gallier, Clifford Algebras-Clifford Groups and a Generalization of graphics. the Quaternions ,University of Pennsylvania Philadelphia, PA 1104, USA, Vector transformations using unit quaternions are January 31, 2012 presented. These transformations are used as foundation for new, [10] [10] Dominic Widdows, Quaternion Algebraic Geometry, June 5, 2006. simple and compact direct kinematic algorithm in unit quaternion [11] [11] Basile Graf, Quaternions And Dynamics , February, 2007. space. [12] [12] Arthur S.Hthaway , QUATERNION SPAC , Rose Polytechnic Developed algorithm is demonstrated on human centrifuge which Institute,Terre Haute, Ind. paper published in( vol. 2, p. 183) is modelled as 3 dimentional of manipulator with rotational joints. [13] 13] Ismail Mustafa Mohammed, QURTERNIONS ,Journal of Economic &Political and statistics Sciences , Omdurman Islamic University, No 15 ISSN:1858-5876 2013 [14] [14] Erik B and others , Quaternions, Interpolation and Animation ,Technical REFERENCES Report DIKU-TR98/5,Department of Computer Sciences –University of [1] [1]William Rowan Hamilton, ON QUATERNIONS, OR ON A NEW Copenhagen ,July 17 1998 SYSTEM OF IMAGINARIES IN ALGEBRA, (Philosophical Magazine, (1844-1850)) [2] [2] Ryan T.Flynn , QUATERNION ALGEBRAS AND ELLIPTIC CURVES OVER FUNCTION FIELDS OF FINITE CHARACTERISTIC, The AUTHORS Pennsylvania State University, August 2013. First Author – Emran Sasi Althabit*, PH.D of mathematics, [3] [3] R.Mukunda , Quaternions: From Classical Mechanics to Computer SUDAN UNIVERISITY SEEINCE AND TECHNOLOGY Graphics, and Beyond, University of Canterbury Christchurch, New Zealand, (Khartoum), [email protected] +218926083695 Conference in Mathematics 2002. Invited Paper. Second Author – Ismail Mustafa Mohamed**, PH.D in [4] [4] Mehdi Jafari ,ON THE MATRIX ALGEBRA OF COMPLEX QUATERNIONS-16-09-2013, Urmia University 64 PUBLICATIONS 204 mathematics, AL NEELAN UNIVERISITY (Khartoum), CITATIONS Urmia University August 2015. [email protected] , +249124699207

This publication is licensed under Creative Commons Attribution CC BY. http://dx.doi.org/10.29322/IJSRP.11.02.2021.p11040 www.ijsrp.org