Given appropriate matrices $A$ and $B_x$, is $\,\,tr\left(\int A B_x dx\right) = \int tr\left(A B_x\right) dx\,\,?$

If so, is it true by the argument that it transfers from (discrete) sums?


Solution 1:

Suppose $A$ is $n \times m$ and $B$ is $m\times n$. Then

$$\text{tr}\left(\int A B_x dx\right) = \sum_{i=1}^n\left(\int A B_x dx\right)_{ii} = \sum_{i=1}^n\left(\int \sum_{j=1}^nA_{ij}(B_x)_{ji} dx\right) $$ $$=\int \sum_{i=1}^n\sum_{j=1}^nA_{ij}(B_x)_{ji} dx = \int \sum_{i=1}^n (AB_x)_{ii}dx = \int \text{tr}(AB_x) dx,$$ where the only step which is not a definition is the commutation of the integral and the finite sum.

Solution 2:

I think you can swap the trace and the integral, I remember swapping them in quantum mechanics.