# How do I show that $\text{tr}(A^{\dagger} B) = \langle m | A \otimes B |m\rangle$ for general matrices $A$ and $B$? [duplicate]

I am desperately trying to solve the following problem, and would really appreciate help!

Suppose $R$ and $Q$ are two quantum systems with the same Hilbert space $\mathcal{H}$ with $\dim(\mathcal{H})=N$. Let $|i_R\rangle$ and $|i_Q\rangle$ be orthonormal basis sets for $R$ and $Q$. Let $A$ be an operator on $R$ and $B$ an operator on $Q$. Define $|m\rangle := \sum_{i=1}^N |i_R\rangle\otimes |i_Q\rangle$. Show that $$tr(A^\dagger B)=\langle m|A\otimes B| m\rangle$$

where the multiplication on the left hand side is of matrices, and it is understood that the matrix elements of $A$ are taken with respect to the basis $|i_R\rangle$ and those for $B$ with respect to the basis $|i_Q\rangle$.

What I have is the following:

LHS: $$tr(A^\dagger B)=\sum_{n=1}^N \langle n_Q|\left( \sum_{i,j,k=1}^N a^*_{ji}b_{jk} |i_Q\rangle \langle k_R| \right)|n_R\rangle$$

Since $Q$ and $R$ are over the same Hilbert space, we can disregard the fact that one set of basis vectors is in system $Q$ and the other one in system $R$. This yields $$tr(A^\dagger B)=\sum_{i,j=1}^N a^*_{ji} b_{ji}$$

RHS: \begin{align*} \langle m'|(A\otimes B)|m\rangle &= \sum_{e,f=1}^N \Bigg( \langle e_R| \left( \sum_{k,l=1}^N a_{kl} |k_R\rangle \langle l_R\right) |f_R\rangle \cdot \langle e_Q|\left(\sum_{i,j=1}^N b_{ij}|i_Q\rangle\langle j_Q| \right)|f_Q\rangle\Bigg)\\ &=\sum_{e,f,k,l,i,j=1}^N a_{kl} b_{ij}\langle e_R |k_R \rangle \langle l_R|f_R \rangle \langle e_Q|i_Q \rangle\langle j_Q|f_Q \rangle\\ &=\sum_{i,j=1}^N a_{ij} b_{ij} \end{align*}

As you can see, the two expressions are almost the same. Only the first number on the LHS evaluation is a complex conjugate and on the RHS it's not.

Any ideas where I went wrong?

Thanks!

P.S: Full disclosure: I posted this question on PhysicsForum.com as well.

## marked as duplicate by glS, Kyle Kanos, Emilio Pisanty quantum-mechanics StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 20 '18 at 12:43

• If $A$ and $B$ are Hermitian, then they are the same. If $A$ and $B$ are not Hermitian, the equation you want to show is ill-defined since $\langle v|O|w\rangle$ can mean either $(v,Ow)$ or $(Ov,w)$ (for $(-,-)$ the inner product), which are not the same for non-Hermitian operators. Choosing the correct interpretation removes your problem. – ACuriousMind Jan 26 '16 at 19:29
• They are not generally Hermitian. I believe the convention in the book I am using (Nielsen, Chuang - Quantum Computation and Quantum Information) is, that operators always act on the right hand vector. – Pentaquark Jan 26 '16 at 19:38
• @ACuriousMind The standard definition is $\langle v| O^\dagger |w\rangle = \langle w| O|v\rangle^*$ or else, $\langle v| Ow\rangle = \langle w| O^\dagger v\rangle^* \equiv \langle O^\dagger v | w\rangle$. There is nothing ambiguous about the meaning of $\langle v| O| w \rangle$. – udrv Jan 26 '16 at 22:19
• This is a duplicate of (a subset of) physics.stackexchange.com/q/227740. For some reason, SE seems to have a policy as to when accept duplicate flags which I haven't yet fully understood. – Norbert Schuch Jan 26 '16 at 23:42
• @NorbertSchuch I'd say both. Obviously the best choice is to flag as a duplicate (which auto-generates a comment), but if the system doesn't let you do that, post a comment and cast a flag. Or, in this case, if the problem is merely that the other post doesn't have an upvoted answer, you could ask in chat for people to review your answer and upvote it if warranted, which would presumably then allow you to cast the flag. – David Z Jan 27 '16 at 15:58

The correct formula is $$\mathrm{tr}[A^TB]=\langle m \vert A\otimes B\vert m\rangle\ ,$$ so your proof is correct, you're just trying to proof an erroneous formula. (You can easily verify this because with a $\dagger$ the l.h.s. is sesquilinear while the r.h.s. is bilinear.)
$$\langle m \vert A\otimes B\vert m\rangle\ = \mathrm{tr}[A^TB]$$ is equivalent to:
Where the vertical lines on the LHS represent the maximally mixed states $|m\rangle$ and $\langle m|$, while those on the right arise from the trace. In this notation, the relation between taking expectation values between maximally mixed states and the trace operation is made more explicit.