Hi Sander,

Sorry I wasn't very careful in writing my question. so let me rephrase it. Yes by "Tr" I mean the trace and by "." the dot product. If I write:

mata = {{a, 0}, {0, 0}};

matb = {{b, 0}, {0, 0}};

matc = {{c, 0}, {0, 0}};

And then

Tr[mata.matb.matc]

Tr[matb.mata.matc]

The output is

a b c

a b c

which is fine if a,b and c are numbers. However, if they are matrices, then in general Tr[a.b.c] and Tr[b.a.c] are different. So I would like to keep track of this, without having to define a, b and c.