Working with Quaternions
GTPack includes basic functions for working with quaternions represented as a list.
Needs["GroupTheory`"]We obtain the quaternion representation of the symmetry element C3z (three-fold rotation about the z-axis) by using GTGetQuaternion.
q = GTGetQuaternion[C3z]| GTQuaternionQ[q] | gives True if q is a quaternion. |
GTQuaternionQ[q]| a⋄b | multiplication of two quaternions a and b. |
| GTQInverse[quaternion] | gives the inverse quaternion of a quaternion. |
| GTQConjugate[quaternion] | gives the conjugate quaternion of a quaternion. |
q1 = GTGetQuaternion[C3z]
q2 = GTGetQuaternion[C2x]q1⋄q2GTGetSymbol[%]Quaternions form a division ring hence for every quaternion there exists a multiplicative inverse element. Use GTQInverse...
q = GTGetQuaternion[C3z]
GTQInverse[q]GTGetSymbol[%]q⋄GTQInverse[q]GTQConjugate[q]q + GTQConjugate[q]q - GTQConjugate[q]| GTQAbs[quaternion] | gives the absolute value of a quaternion. |
| GTQPolar[quaternion] | gives the polar angle of a quaternion. |
GTQAbs[q]GTQPolar[q]