Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
There is this non-commutative algebra package for Mathematica that is quite extensive http://www.math.ucsd.edu/~ncalg/
It can handle the symbolic computations in the question, among many other things.
There is this non-commutative algebra package for Mathematica that is quite extensive