Details and Options
Quaternions have the form a+b i+c j+d k where a, b, c, and d are real numbers.
The symbols i, j, and k are multiplied according to the rules i2=j2=k2=i j k=-1.
Quaternions are an extension of the complex numbers, and work much the same except that their multiplication is not commutative. For instance, i j=-j i .
Because of the similarities between quaternions and complex numbers, this function imitates the Wolfram Language’s treatment of complex numbers in many ways.
To provide a clear distinction between quaternions and complex numbers, all quaternions should be entered using the form ResourceFunction["Quaternion"][a,b,c,d] where a, b, c, and d are real numbers.
Only limited support is offered to the symbolic form
a+Ib+Jc+Kd.