I have a long expression involving matrices that I derived using the NCAlgebra package. Can I simplify the trace of the expression?
For example, say
b is a scalar (commutes with all) and
y are matrices (non-commutative). Can I simplify
Tr[b x.y.y + b y.x.y] to
2b Tr[x.y.y] using the properties of the trace?
Thanks, that is what I am going for (although I don't quite understand the code) but I only have version 8.
The expression is given below, where
r are scalars,
v are matrices and the double star (
**) denotes products of non-commutative elements. I've done it by hand, but I want to be able to simplify the trace of this with Mathematica (and others which are much longer).
e^2 q ** q - e r q ** v - e r v ** q + r^2 v ** v - 1/12 e^3 r q ** q ** q ** v + 1/12 e^3 r q ** q ** v ** q + 1/24 e^2 r^2 q ** q ** v ** v + 1/12 e^3 r q ** v ** q ** q - 1/12 e^2 r^2 q ** v ** q ** v - 1/12 e^2 r^2 q ** v ** v ** q + 1/24 e r^3 q ** v ** v ** v - 1/12 e^3 r v ** q ** q ** q + 1/6 e^2 r^2 v ** q ** q ** v - 1/12 e^2 r^2 v ** q ** v ** q - 1/24 e r^3 v ** q ** v ** v + 1/24 e^2 r^2 v ** v ** q ** q - 1/24 e r^3 v ** v ** q ** v + 1/24 e r^3 v ** v ** v ** q