# Computing the partial trace of a matrix

I'm trying to understand the Wikipedia article on the partial trace. I do not understand their notation for the matrix elements of a tensor product of operators; that is, the object $\{a_{k l,ij}\}$ in the first section under the heading "details" at this link.

I think a simple example will make this clear. Let $$A = \left[ \begin{array}{cc}1 & 2\\ 3 & 4 \end{array}\right], \quad B= \left[ \begin{array}{cc}8 & 9\\ 7 & 6 \end{array}\right].$$ And also let these matrices act on vector spaces $V = \mathbf{R}^2$ and $W = \mathbf{R}^2$ respectively.

Then $$A \otimes B = \left[\begin{array}{cccc}8 & 9 & 16 & 18 \\ 7 & 6 & 14 & 12 \\ 24 & 27 & 32 & 36 \\ 21 & 18 & 28 & 24\end{array} \right] ("=" \{a_{k l,ij}\}).$$ Now clearly from the definitions of $A$ and $B$ we can tell that $$\operatorname{Tr}_W (A \otimes B ) = \operatorname{Tr}(B)\,A = 14\times \left[ \begin{array}{cc}1 & 2\\ 3 & 4 \end{array}\right] = \left[ \begin{array}{cc}14 & 28\\ 42 & 56 \end{array}\right]("=" \{b_{ki}\})$$

But I would like to see how this could be obtained directly from the matrix representation of $A \otimes B.$ In particular, how am I supposed to interpret the 4-index object $\{a_{k l,ij}\}$ in the wikipedia article here? How do I compute $b_{ki} = \sum_j a_{kj,ij}$?

Thanks!

Edit: I thought the solution was that:

In fact the object $\{a_{kl,ij}\}$ is a two-index object, as we should expect it to be. The subscript contains products of the numbers $k, l$ and $i, j$. The comma separates the two indices.

But this cannot be true. Because using this, we compute the off-diagonal element $b_{12} = a_{12} + a_{24} = 19 \neq 28$. We instead want the off-diagonal element $b_{12} = a_{13} + a_{24} = 28,$ but I do not see how the prescription from wikipedia furnishes this. Perhaps I am making some very simple arithmetic error.

• Look at the graphic at the top right of the Wikipedia page. Jun 23, 2017 at 17:47
• This provides the answer but not the interpretation of the object $\{a_{kl,ij}\}$. Jun 23, 2017 at 18:04

It helps to think of this as a partitioned matrix. We have $$A \otimes B = \left[\begin{array}{cc|cc} a_{11,11} & a_{11,12} & a_{11,21} & a_{11,22}\\ a_{12,11} & a_{12,12} & a_{12,21} & a_{12,22}\\ \hline a_{21,11} & a_{21,12} & a_{21,21} & a_{21,22}\\ a_{22,11} & a_{22,12} & a_{22,21} & a_{22,22} \end{array}\right]$$ In the pair $ij$, $i$ specifies which block you're in, and $j$ specifies where you are in the block.
Now, we compute (for instance) $$b_{21} = a_{21,11} + a_{22,12}$$ which you'll recognize as the trace of the lower-left block.
• Nitpick: It appears to me that the block location is given by $(k,i)$ and element location within a block is given by $(l,j)$ as you've written it and as the object $\{a_{kl,ij}\}$ is notated yes? Jun 23, 2017 at 18:26
• Within each of the pairs $kl$ and $ij$: the first number indicates the block row/column while the second number indicates the row/column within the block. This is what I mean. Jun 23, 2017 at 18:38