Basic Examples 
(3)
 

Get the quaternion
1+2+3+4
:
In[1]:=
[◼]
Quaternion
[1,2,3,4]
Out[1]=
2+3+4+1
———
Add two quaternions:
In[1]:=
[◼]
Quaternion
[1,2,3,4]+
[◼]
Quaternion
[2,3,4,5]
Out[1]=
5+7+9+3
———
Use
NonCommutativeMultiply
(
**
) to multiply quaternions:
In[1]:=
[◼]
Quaternion
[2,0,-6,3]**
[◼]
Quaternion
[1,3,-2,2]
Out[1]=
0-+25-16
This multiplication is noncommutative:
In[2]:=
[◼]
Quaternion
[1,3,-2,2]**
[◼]
Quaternion
[2,0,-6,3]
Out[2]=
12-19-11-16

Properties and Relations 
(7)
 
