I happen to need to find the commutator of various 2x2 and 3x3 matrices relatively often. It is particularily tedious, but even after much practice, I am not finding it getting significantly faster. Are you aware of any "tricks" or shortcuts I can take when computing matrix commutators (or recognising that two matrices commute by looking at them)?
EDIT thanks to comment, most of the matrices I deal with are hermititan ($H_{ij} = H_{ji}^*$)
Certainly two diagonal matrices will always commute, but I am not aware of many other properties.
For the $2 \times 2$ case, what you need for the matrices $(a_{ij})$ and $(b_{ij})$ to commute is $$ \eqalign{a_{1,2} b_{2,1} &= a_{2,1} b_{1,2}\cr a_{11} b_{12} + a_{12} b_{22} &= a_{12} b_{11} + a_{22} b_{12}\cr a_{11} b_{21} + a_{21} b_{22} &= a_{21} b_{11} + a_{22} b_{21}\cr}$$
I don't think it can be made any simpler than that.