There is this non-commutative algebra package for Mathematica that is quite extensive - [http://www.math.ucsd.edu/~ncalg/][1] It can handle the symbolic computations in the question, among many other things. [1]: http://www.math.ucsd.edu/~ncalg/