A Study of Quaternion in Terms of Indicial Notation Min-Chan Hwang (黃敏昌)1 and Lih-Jier Young (楊立杰)2 1 Department of Automation Engineering, Ta Hwa Institute of Technology, No. 1, Dahua Rd., Qionglin Shiang, Hsinchu County, 307, Taiwan, R.O.C. Tel: 03-592-7700-2675, Fax: 03-592-1047 Email: aemch@thit.edu.tw 2 Department of Applied Mathematics, Chung-Hua University, No. 707, Sec. 2, Wufu Rd., Hsinchu, 30012, Taiwan, R.O.C. Tel: 03-518-6392, Fax: 03-537-3771 Email: young@chu.edu.tw Abstract The conventional approach using unabridged format to manipulate the algebraic properties of quaternion is very cumbersome. In order to manipulate the algebra more easily or more effectively, we attempt to use the indicial notation in the quaternion. Although some authors did use the indicial notation to deal with quaternion, they merely applied it to the pure quaternion, which contains the vector part without the scalar part. In this paper, the quaternion of which we take into account is in general form, i.e. including both of the scalar part and vector part of the quaternion. A concise survey on quaternion properties with proofs using indicial notation for some known results is presented here. Additionally, three examples are used to illustrate the application of the quaternion in the rigid motion and the robotics etc. Keywords: indicial notation, quaternion, rigid motion, robotics 1. Introduction Since the quaternion contains the vector The quaternion [1] [2], which is a generalization components, it is natural to deal with the quaternion of a complex number was invented by Hamilton in algebra in terms of indicial notation. Although some 1843. appropriate authors [2] did use the indicial notion to deal with generalization is one in which the scalar axis is left quaternion, they merely applied it to the pure unchanged whereas the vector axis is supplemented quaternion which contains the vector part without the by adding two further axes. The basic algebraic form scalar part. In this paper, the quaternion of which we for a quaternion q is take into account is in general form, i.e. including He discovered that the q q0 q1iˆ q2 ˆj q3kˆ . (1) both of the scalar part and vector part. We use the In Einstein’s relativity theory [3], he introduced to define the products of the imaginary units indicial notations to simplify many calculations with iˆ, ˆj, kˆ . The conventional approach using components vectors. The indicial notation has not only found its and imaginary units to manipulate the algebraic vital success in physics but also in elasticity [4], properties of quaternion is cumbersome. In contrast continuous mechanics, differential geometry, etc. to the unabridged format, a concise survey on 3. Definition of Quaternion Algebra quaternion properties with proofs using indicial notation for some known results is presented here. As Roughly speaking, algebra is a linear space over you will see, the indicial notation makes the algebra a field that admits a product operation. A precise structure transparent and easy to be managed. Some definition is stated below. derivations will be shown in detail to help the Definition 1: Let S be a finite-dimensional linear audience take a glimpse of the efficiency of this space over a field F. approach as compared to the unabridged approach. is called an algebra if it possesses the following If a, b, c S and F , S properties. 2. A Brief of Indicial Notation (i) (ab) ( a )b a ( b) There are two categories of indices, i.e. the free (ii) a(b c) ab ac, (b c)a bc ca indices and the dummy indices. The free indices are free to take any value while the dummy indices are We use the indicial notation to rewrite the representation of q as summed over all possible values. In Einstein q q0 qi eˆi (3) summation convention, it is illegal to use the same where the subscript-i has its value over {1,2,3} and dummy index more than twice in a term. However, follows the rule of Einstein summation. Because S is a linear space, the imaginary units eˆi s stand for the base vectors, iˆ, ˆj, kˆ . To determine we might encounter the cases of indices which repeat themselves more than twice here. In order to avoid any possible confusion, we would like to make the the multiplication rules, we assign the operations on the eˆi to be following distinctions. eˆi eˆ j ij ijk eˆk . (ai2 )ai (a12 a22 a32 )ai (a 2j )ai The addition rule of quaternion numbers is ai3 a13 a23 a33 defined in terms of indicial notation. (ai2 ) 2 ( a12 a22 a32 ) 2 (ai2 )( a 2j ) a b (a0 b0 ) (ai bi )eˆi (ai4 ) a14 a24 a34 obtained by the rule for multiplying sums as follows. in the local sense, i.e. one dummy variable appeared in two different brackets treated as two individual ab a0b0 (a0bi b0 ai )eˆi ai b j eˆi eˆ j ab a0b0 ai bi (a0bk b0 ak ijk ai b j )eˆk (7) prodigious growth in indicial notations. If the Equation (7) is unabridged, it is identical identity is extremely important and extensively used here. ijk lmk il jm im jl (6) Introducing (4) into the equation (6), we have dummy variables. This convention could prevent the (2) where the Kronecker delta and Levi-Civita symbol are defined below. 0 if i j 1 if i j ij ijk (5) The product of two quaternion numbers can be In other words, the dummy indices only prevail The following (4) 1 if ijk 123, 231,312 0 if any two indices are the same -1 if ijk 321, 213,132 to the result obtained by the conventional approach, i.e. ab a0b0 a1b1 a2b2 a3b3 (b0 a1 a0b1 a2b3 a3b2 )iˆ . (b0 a2 a0b2 a3b1 a1b3 ) ˆj (8) (b0 a3 a0b3 a1b2 a2b1 )kˆ The property (i), (ii) of definition 1 can be easily verified using the equation (7) with the argument of distributive and communicative property of the real numbers, i.e. (ab)c [a0b0 ai bi (a0bk b0 ak ijk ai b j )eˆk ]c a(b c) a0 (b0 c0 ) ai (bi ci ) [a0 (bk ck ) (b0 c0 )ak ijk ai (b j c j )]eˆk a0b0 ai bi (a0bk b0 ak ijk ai b j )eˆk (a0 b0 ai bi )c0 (a0bi b0 ai lmi al bm )ci [(a0b0 ai bi )ck c0 (a0bk b0 ak ijk ai b j ) a0 c0 ai ci (a0 ck c0 ak ijk ci b j )eˆk (9) ijk (a0bi b0 ai lmi al bm )c j ]eˆk a0b0 c0 a0bi ci ai b0 ci ai bi c0 lmi al bm ci ab bc Likewise, the rest can be proved to show that the quaternion indeed is an algebra. [ a0b0 ck a0bk c0 ak b0c0 ai bi ck ijk ai b j c0 ijk (a0bi b0 ai )c j ijk lmi al bm c j ]eˆk a0b0 c0 (a0bi ci ai b0 ci ai bi c0 ) lmi al bm ci 4. Associative Normed Algebra [ak b0 c0 a0bk c0 a0b0ck ak b j c j a j bk c j aibi ck Another important property of quaternion is that ijk (a0bi c j ai b0 c j ai b j c0 )]eˆk it is not only associative but also a division. The part (ii) is proved in a similar fashion. Moreover, the absolute value of a product is the 2 2 Using (7) to obtain a , b , we have product of the absolute values of the factors. Theorem 1: Associative Normed Algebra a a*a a0 a0 ai ai (a0 ak a0 ak ijk ai a j )eˆk 2 The quaternion constitutes an associative normed a0 a0 ai ai algebra, i.e. and likewise b b*b b0b0 bi bi . 2 (i) a(bc) (ab)c [ak b0c0 a0bk c0 a0b0ck ak bi ci ai bk ci ai bi ck i j (k a0 b ci j a 0bi cj a b (a*a)(b*b) 2 a0b0c0 (a0bi ci ai b0ci ai bi c0 ) ilm aibl cm a i0b) ˆ]j c ek (10) (ii) Hence, 2 (a0 a0 ) 2 (a0 a0 )(bi bi ) (ai ai )(b0b0 ) (ai ai )(bi bi ) The right hand side of identity in (ii) is ab (ab)* ( ab) ( a0b0 ai bi ) 2 2 ( a0bk b0 ak ijk ai b j )(a0bk b0 ak lmk al bm ) ab a b (a0b0 )2 (a0bk ) 2 (b0 ak ) 2 (ai ai )(b j b j ). (11) ( a0b0 ai bi ) 2 (a0bk b0 ak ) 2 2 ijk ai b j ( a0bk b0 ak ) ijk lmk ai b j al bm ( a0b0 ai bi ) 2 (a0bk b0 ak ) 2 Proof: The part (i) is proved by expressing both sides of the equality in terms of indicial notation and showing that they are identical to each other. a (bc) a[b0 c0 bi ci (b0ck c0bk ijk bi c j )eˆk ] a0 (b0 c0 bi ci ) ai (b0ci c0bi lmi bl cm ) [(b0 c0 bi ci )ak a0 (b0ck c0bk lmk bl cm ) ijk ai (b0 c j c0b j srj bs cr )]eˆk a0b0 c0 a0bi ci aib0ci ai c0bi lmi aibl cm ( il jm im jl ) ai b j al bm (a0b0 ai bi ) 2 (a0bk b0 ak ) 2 ai b j ai b j ai b j a j bi As we develop the quadratic terms of the above equation, it is very easy to identify that ( ai bi ) 2 and ai bi a j b j cancel each other. ab (a0b0 ) 2 2a0b0 ai bi (ai bi ) 2 2 (a0bk ) 2 2a0b0 ak bk (b0 ak ) 2 ai ai b j b j ai bi a j b j (a0b0 ) 2 (a0bk ) 2 (b0 ak ) 2 ( ai ai )(b j b j ) [ak b0 c0 ak bi ci a0b0ck a0c0bk lmk a0bl cm ijk ( ai b0 c j ai c0b j ) ijk srj ai bs cr ]eˆk Q.E.D. 5. Non-Commutative Field a0b0 c0 (a0bi ci aib0ci aibi c0 ) ilm aibl cm [ak b0 c0 a0bk c0 a0b0ck ak bi ci aibk ci aibi ck ijk ( a0bi c j ai b0c j ai b j c0 )]eˆk Hence, The quaternion resembles the real number in many aspects except that it doesn’t possess order structure and has no commutative property. Therefore, its quotients are defined as left quotient qxq* [q j x j (q0 xk ijk qi x j )eˆk ][q0 qs eˆs ] q j x j q0 q0 (q0 xk ijk qi x j )eˆk q j x j qs eˆs and right quotient respectively. qs (q0 xk ijk qi x j )eˆk eˆs Theorem 2: Quotient q j x j q0 (q02 xk q0 ijk qi x j q j x j qk )eˆk (i) The left quotient of b by a is defined as ax b ( qs q0 xk qs ijk qi x j )( ks ksr eˆr ) where (q02 xk q0 ijk qi x j q j x j qk )eˆk x ab /(aa) ( q0 ksr qs xk srk ijk qs qi x j )eˆr [a0b0 aibi (a0bk b0 ak ijk aib j )eˆk ]/(a02 ai2 ) (12) (ii) (q02 xk q0 ijk qi x j q j x j qk q0 rsk qs xr )eˆk ( si rj sj ri )qs qi x j eˆr The right quotient of b by a is defined as ya b (q02 xk q j x j qk 2q0 ijk qi x j )eˆk where ( qi qi xr q j qr x j )eˆr y ba /(aa ) [(q02 qi qi ) xk 2q j x j qk 2q0 ijk qi x j )]eˆk [a0b0 aibi (a0bk b0 ak ijk aib j )eˆk ]/(a a ) (13) 2 0 2 i Q.E.D. The condition under which the quaternion is Supposed that a pure quaternion x rotates about commutative is co-linear on the vector part of the a pure and unit quaternion p with a angle , its new quaternions i.e. ijk ai b j eˆk 0 . position can be obtained by means of Corollary 2-1: Inversion the automorphism as follows. Let q be a quaternion. Its inverse is equal to q 1 q* / q (q0 qi eˆi ) /(q02 qi2 ) 2 y qxq 1 (14) (16) where q cos 2 p sin 2 and p mi eˆi for mi mi 1 . Note that q* is the conjugate of the quaternion q Theorem 3: Affine Transformation and their vector parts are co-linear. Thus, there is no Supposed that q is a unit quaternion and b is a pure distinction between left inverse and right inverse of a quaternion, the affine transformation of a pure quaternion. quaternion x induced by q and b can be defined as 6. Affine / Homogeneous Transformation The inner automorphism induced by a quaternion has one remarkable application, i.e. to depict the rotation about a fixed axis. follows. y qxq* b (17) q qi qi 2q1q1 2q2 q1 2q0 q3 2q3q1 2q0 q2 x1 b1 2 2q2 q1 2q0 q3 q0 qi qi 2q2 q2 2q3q2 2q0 q1 x2 b2 2q3q1 2q0 q2 2q3q2 2q0 q1 q02 qi qi 2q3q3 x3 b3 2 0 Lemma 3-1: Automorphism If q q0 qi eˆi is a unit quaternion, i.e. q 1 , a pure quaternion x xi eˆi through automorphism induced by q is equal to the following. qxq1 qxq* [(q02 qi qi ) xk 2q j x j qk 2q0ijk qi x j ]eˆk (15) Since q is a unit quaternion, it is obvious that q 1 q * by corollary 2-1. In the sequel, we apply dummy indices. the rigid motion. A counterpart of quaternion representation is the homogeneous transformation [5] [6] which is extensively used in robotic systems. The following corollary, a consequence of theorem 3, Proof: equation (7), The quaternion gives a concise representation of identity and rearrange the states the conversion from an affine transformation to a homogeneous transformation. Corollary 3-1: Homogeneous Transformation Given specific quaternions, b 0 b1 b2 b3 T and q cos l sin m sin n sin 2 2 transformation , the affine 2 2 shown T in generally required to describe a motion with respect to the inertial frame. theorem 3 can For instance, consider a be broom car system as shown below. A rigid rod of represented by the corresponding homogeneous length L pivoted at the top of the car can swing as the transformation car moving horizontally. y Tx (18) l 2 (1 cos ) cos lm(1 cos ) n sin ln(1 c os ) m sin lm(1 cos ) n sin m2 (1 cos ) cos mn(1 c os ) l sin T ln(1 c os ) m sin mn(1 c os ) l sin n 2 (1 cos ) cos 0 0 0 b1 b2 b3 1 where l m n 1 2 y y1 y2 2 2 y3 1 T x x1 x2 x3 1 T Figure 1 A Broom Car System In the aspect of homogeneous transformation, we need to define three reference frames attached to Proof: Plunge in each component of q and b to the the system. The point at the tip of the rode is denoted the as P 3 and P 0 to indicate its position with respect trigonometric functions, i.e. q02 qi qi 2q1q1 cos 2 sin 2 (l 2 m2 n 2 ) 2l 2 sin 2 2 2 2 cos l 2 (1 cos ). Q.E.D. to frame-3 and inertial frame, respectively. Three equation (17) and simplify them with As a result of the corollary 3-1, one translational transformation and three rotational transformations with respect to x, y, z can be obtained as 1 0 Trans (a, b, c) 0 0 0 0 a 1 0 b , 0 1 c 0 0 1 0 0 0 1 0 cos sin 0 , Rot ( x, ) 0 sin cos 0 0 0 1 0 cos 0 Rot ( y, ) sin 0 cos sin Rot ( z , ) 0 0 0 sin 1 0 0 cos 0 0 sin cos 0 0 0 0 , 0 1 0 0 0 0 . 1 0 0 1 7. Applications In kinematics, the treatment of every problem is homogeneous transformation matrices are defined as T32 Rot ( z, ) , T21 Trans(0, h, 0) , T10 Trans( x, 0, 0) . Then, we have L sin x L cos h P 0 T10T21T32 P 3 0 1 where P3 0 L 0 1 T . Instead of three transformation matrices, we only need to define two quaternions as the quaternion is applied, i.e. q for the axis of rotation and b for the translation. P 3 Leˆ2 , q cos sin eˆ3 b xeˆ1 heˆ2 2 2 , The following result identical to the previous one is obtained using the affine transformation. P 0 qP3q* b ( L sin x)eˆ1 ( L cos h)eˆ2 . a* x xa q 0 (19) where a, q are known quaternions but x is a unknown quaternion ready to be solved. Due to the fact that the quaternion is not a commutative field, an equation as shown in (19) can not be solved in a manner of straightforward. We begin to develop the terms, a* x and xa Figure 2 A Five-Jointed Robot A slightly complicated application is to formulate the kinematics for a five-jointed robot as shown as follows. a* x (a0 ai eˆi )( x0 x j eˆ j ) a0 x0 ai xi (a0 xk ak x0 ijk ai x j )eˆk above. Five pairs of quaternions encoding the rotations xa ( x0 x j eˆ j )(a0 ai eˆi ) a0 x0 ai xi (a0 xk ak x0 ijk xi a j )eˆk and translations are defined for performing a sequence of affine transformations, i.e. q5 cos 5 2 sin 5 2 (21) As a result of the indicial notion, the terms in eˆ2 , b5 feˆ1 eeˆ2 , P 5 0 , q4 cos 4 sin 4 eˆ1 , b4 deˆ2 , q3 cos 3 sin 3 eˆ1 , b3 ceˆ2 , 2 2 2 2 q2 cos 2 sin 2 eˆ3 , b2 beˆ2 , q1 cos 1 sin 1 eˆ3 , b1 aeˆ3 , 2 2 2 2 (20), (21) are not only obtained in a way of great efficiency but also in an algebraic transparency so that we could easily render the following result. a* x xa 2a0 x0 2(a0 xk 2 ijk xi a j )eˆk Hence, 0 a* x xa q 2a0 x0 q0 [2(a0 xk ijk xi a j ) qk ]eˆk where a, b, c, d, e, f are the known length parameters (22) (23) By the definition of the quaternion, a zero of the linkages, and quaternion implies that its scalar part and vector part P 0 q1 (q2 (q3 (q4 (q5 P5 q5* b5 )q4* b4 )q3* b3 )q2* b2 )q1* b1 (20) , are all zero, i.e. 2a0 x0 q0 0 P10eˆ1 P20eˆ2 P30eˆ3 2a0 xk 2 ijk xi a j qk 0 where e P10 b sin 1 f cos(1 2 ) [sin(1 2 3 4 ) 2 sin(1 2 3 4 )] d [sin(1 2 3 ) sin(1 2 3 )] c sin(1 2 ) 2 e P20 b cos 1 f sin(1 2 ) [cos(1 2 3 4 ) 2 cos(1 2 3 4 )] d [cos(1 2 3 ) cos(1 2 3 )] c cos(1 2 ) 2 . (24) Thus, the solution of (19) is obtained as follows. x0 x1 x2 x3 q0 2a0 1 2a0 a 2 {(a02 a12 )q1 (a1a2 a0 a3 )q2 (a1a3 a0 a2 )q3 } 2 {(a1a2 a0 a3 )q1 (a02 a22 )q2 (a2 a3 a0 a1 )q3 } 2 {(a1a3 a0 a2 )q1 (a2 a3 a0 a1 )q2 (a02 a32 )q3 } 1 2a0 a 1 2a0 a P30 e sin(3 4 ) d sin 3 a . 8. Conclusions One additional example of solving a Lyapunov like equation is illustrated below to justify the It is tedious to write long expressions with lots effectiveness of this approach. The Lyapunov of components and imaginary units to manipulate the equation often appears in the study of the stability of quaternion. a control system. and the Einstein summation to simplify the algebra Thus, we introduce the indicial notation manipulation. In order to prevent the prodigious growth in indicial notations, the dummy indices, which repeat themselves more than twice, are permitted under the specification. One practical application of the quaternion is to depict the motion of a rigid body. Its counterpart, i.e. homogeneous transformation, is extensively used in robotic systems. A sequence of the affine transformations in quaternion is equivalent to a sequence of matrices’ multiplication in the homogeneous transformation. The quaternion would not only encode the rigid motion in a concise way but also give the representation in close agreement with experience. References [1] I. L. Kantor, A. S. Solodovnikov, "Hypercomplex Numbers," Springer-Verlag, 1989. [2] J. P. Ward, “Quaternions and Cayley Numbers,” Kluwer Academic Publishers, London, 1997. [3] Albert Einstein, “The Meaning of Relativity,” Princeton University Press, Princeton, N.J., 1956. [4] Arthur P. Boresi, Ken P. Chong, "Elasticity in Engineering Mechanics," Elsevier Science Publishing Co., Inc., 1987. [5] Janez Funda, Russell H. Taylor, Richard P. Paul "On Homogeneous Transforms, Quaternions, and Computational Efficiency," IEEE Transactions on Robotics and Automation, Vol. 6, No. 3, pp. 382-388, June 1990. [6] Richard D. Klafter, Thomas A. Chmielewski, Michael Negin, "Robotic Engineering An Integrated Approach," Prentice-Hall, Inc., New Jersey, 1989.