Working with Quaternions

GTPack includes basic functions for working with quaternions represented as a list.

{w,{x,y,z}}w + i x + j y + k z
Load GTPack.
We obtain the quaternion representation of the symmetry element C3z (three-fold rotation about the z-axis) by using GTGetQuaternion.
GTQuaternionQ[q]gives True if q is a quaternion.
abmultiplication of two quaternions a and b.
GTQInverse[quaternion]gives the inverse quaternion of a quaternion.
GTQConjugate[quaternion]gives the conjugate quaternion of a quaternion.
The multiplication of two quaternions can be calculated with
Quaternions form a division ring hence for every quaternion there exists a multiplicative inverse element. Use GTQInverse...
Obtain the conjugate quaternion by GTQConjugate...
GTQAbs[quaternion]gives the absolute value of a quaternion.
GTQPolar[quaternion]gives the polar angle of a quaternion.
The absolute value of a quaternion can be calculated by GTQAbs...
The polar angle of a quaternion can be calculated by GTQPolar...