New answers tagged tensor
5
Well, you certainly can if you have version 9 and don't mind using the (quite verbose) tensor notation:
Assuming[
{b ∈ Complexes, (x | y) ∈ Matrices[{n, n}]},
TensorReduce@
TensorContract[
b TensorContract[TensorProduct[x, y, y], {{2, 3}, {4, 5}}] +
b TensorContract[TensorProduct[y, x, y], {{2, 3}, {4, 5}}],
{{1, 2}}
]
]
(* -> 2 b ...
4
Yes, you can simplify the trace this way. First, Tr[x.y.z] is invariant under cyclic permutations, so Tr[x.y.z] = Tr[y.z.x] = Tr[z.x.y], as described in Wikipedia's entry on trace of a product. For the case of interest, this means Tr[y.x.y] is equal to Tr[x.y.y]. Hence
Tr[b x.y.y + b y.x.y] = Tr[b x.y.y] + Tr[b y.x.y]
= b Tr[x.y.y] + ...
Top 50 recent answers are included
