Suppose I have two matrices, given as:
$A= \begin{pmatrix} a & b \\ c & d \end{pmatrix}$, $B= \begin{pmatrix} e & f \\ g & h \end{pmatrix}$
Then,the Kronecker product of $A$ and $B$ is
$A \otimes B=\begin{pmatrix} ae & af & be & bf\\ ag & ah & bg & bh\\ ce & cf & de & df\\ cg & ch & dg & dh \end{pmatrix} $
So that the partial trace w.r.t $B$ is given as $Tr_B\left(A \otimes B\right)= \begin{pmatrix} ae+ah & be+bh \\ ce+ch & de+dh \end{pmatrix}$
Which can be obtained from $A \otimes B$ by just taking trace of each $2 \times 2$ block. However,the partial trace w.r.t $A$ is given as
$Tr_A\left(A \otimes B\right)= \begin{pmatrix} ae+de & af+df\\ ag+dg & ah+dh \end{pmatrix}$
I did not understand how to obtain this expression from that of $A \otimes B$. Can anyone please help?
Let $M$ denote the block matrix $$ M = \pmatrix{M_{11} & M_{12}\\ M_{21} & M_{22}}, $$ with each $M_{ij}$ of size $n \times n$. Then the partial trace with respect to the second component is given by $$ \operatorname{tr}_2(M) = \pmatrix{\operatorname{tr}(M_{11}) & \operatorname{tr}(M_{12})\\ \operatorname{tr}(M_{21}) & \operatorname{tr}(M_{22})}, $$ as you have said. The partial trace with respect to first component is given by $$ \operatorname{tr}_1(M) = M_{11} + M_{22}. $$ In a sense, you are taking the "trace" of the matrix by adding up the blocks that appear on the diagonal.