Skip to main content

matrix - Calculating the trace of the product of several matrices


I want to calculate the trace of something like


$\qquad\mathrm{Tr}(\Gamma_RG_d\Gamma_LG_d^\dagger)$


In order to optimise my code, I found something like this Faster trace of product of two matrices, which greatly reduces calculation time for trace.


My question is - Is it possible to generalize this somehow to the above case? I tried looking at the Wikipedia with no luck


https://en.wikipedia.org/wiki/Trace_%28linear_algebra%29#Trace_of_a_product


Or is the most time efficient way just to say



$\qquad M_1 = \Gamma_rG_d \qquad M_2=\Gamma_LG_d^\dagger$


and then use the trick in the link and Wikipedia.




Comments