Commutator

Commutator[op1, op2]
gives the commutation between the two operators.
  • opi can be expressed either by matrices or with differential operators.
  • Depending on the input, Commutator will return either a matrix or a differential operator.
In[1]:=
Click for copyable input
Let the differential operators x, y that commute. We expect their commutator to give us 0. Indeed,
In[2]:=
Click for copyable input
Out[2]=
 
In[1]:=
Click for copyable input
For the set of operators x, xx we get:
In[2]:=
Click for copyable input
Out[2]=
 
In[1]:=
Click for copyable input
The commutato between two matrices:
In[2]:=
Click for copyable input
Out[2]=