# Why this definition of the trace?

It is common in quantum mechanics textbooks (e.g. Ballentine page 15) to define the trace of an operator as the sum of its diagonal elements in an orthonormal basis in particular. Why is this definition given when the trace of an operator can be shown to equal the sum of its diagonal elements in any basis? This definition is sufficiently common (it appears in Shankar, Sakurai, Nielsen and Chuang, etc.) that its always made me wonder. Is it perhaps because the aforementioned definition translates to infinite-dimensional spaces better?

I tried to follow this answer but don't understand it in light of what I know from linear algebra -- that the trace of an operator equals the trace of its matrix in any basis representation.

Edit: I think I may see the issue with my reasoning. The definition given in physics textbooks is, for an orthonormal basis $$|\phi_n\rangle$$,

$$\textrm{Tr}(A) := \sum_n \langle \phi_n | A |\phi_n\rangle$$ which equals the sum of the diagonal matrix elements in that basis. On the other hand, if $$|\psi_n\rangle$$ in not orthonormal, then while $$\textrm{Tr}(A) := \sum_n A_{nn}$$ is true in that basis, $$A_{nn} \neq \langle \psi_n | A |\psi_n\rangle$$ in general (because the $$A_{nn}$$, which are expansion coefficients in the given basis of particular transformed vectors, are only guaranteed to equal the inner product $$(|\psi_n \rangle, A |\psi_n\rangle$$) in an orthonormal basis. Is this correct?

• Closely related: "Trace in non-orthogonal basis?" physics.stackexchange.com/q/107486/226902 Jan 20 at 11:22
• Try multiplying every basis state by a factor $n$. The trace will change by a factor $n^2$. Try replacing a pair of orthogonal states for some non-orthogonal ones. The trace will typically change. Jan 20 at 12:29

Let's take a random basis $$\mathscr{B} = \{|\phi_n\rangle\}_n$$, which is not necessarily orthonormal. In this basis, the operator $$A$$ can be written as $$A = \displaystyle\sum_{n,m}A_{nm}|\phi_n\rangle\langle \phi_m|$$. In consequence, we have : $$\begin{array}{rclll} \displaystyle\sum_k\langle \phi_k|A|\phi_k\rangle &=& \displaystyle \sum_{k,n,m}A_{nm}\langle \phi_k|\phi_n\rangle\langle \phi_m|\phi_k\rangle \\ &=& \displaystyle \sum_kA_{kk}\langle \phi_k|\phi_k\rangle^2 \quad\mathrm{only\,if\,} \{|\phi_k\rangle\}_k \mathrm{\,are\,orthogonal} \\ &=& \displaystyle \sum_kA_{kk}\color{white}{\langle \phi_k|\phi_k\rangle^2} \quad\mathrm{only\,if\,} \{|\phi_k\rangle\}_k \mathrm{\,are\,normalized} \\ &=& \displaystyle \mathrm{Tr}(A) \quad . \end{array}$$ In other words, the definition $$\mathrm{Tr}(A) = \sum_k\langle \phi_k|A|\phi_k\rangle$$ is true when the components $$A_{kk}$$ can be isolated by the scalar product, which necessitates the relation $$\langle\phi_n|\phi_m\rangle = \delta_{nm}$$, that is orthonormality.

Addendum. The quantities $$A_{nm}$$ are not the (matrix) components of $$A$$ in the basis $$\{|\phi_n\rangle\}_n$$, but only a "representation" with respect to the "projectors" $$|\phi_n\rangle\langle\phi_m|$$, because the a non-orthonormal basis doesn't admit a closure/completeness relation and that's why such bases fail to generate a trace formula through scalar product (hence the "mess" in the first line).

The coefficients $$A_{nm}$$ would be related to the true components $$a_{\mu\nu}$$ of $$A$$ with respect to an orthonormal basis $$\{|e_\mu\rangle\}_n$$, such that $$|\phi_n\rangle = \displaystyle\sum_\mu c_{n\mu}|e_\mu\rangle$$, by $$A = \sum_{n,m}A_{nm}|\phi_n\rangle\langle \phi_m| = \sum_{n,m}\sum_{\mu,\nu}A_{nm}c_{n\mu}c_{m\nu}^*|e_\mu\rangle\langle e_\nu| = \sum_{\mu,\nu}a_{\mu\nu}|e_\mu\rangle\langle e_\nu|$$ with $$a_{\mu\nu} := \displaystyle\sum_{n,m}A_{nm}c_{n\mu}c_{m\nu}^*$$.

• This looks great to me, can I just bother you to explain the $A = \displaystyle\sum_{n,m}A_{nm}|\phi_n\rangle\langle \phi_m|$ identity? I'm having a hard time seeing how the inner product which occurs due to the RHS's action on an arbitrary vector $| \alpha \rangle$ (when expanded in the given basis) can be made to go away.
– EE18
Jan 20 at 19:00
• It's not clear to me why that identity should be true given that if $A \to I$ then we conclude that, since $A_{nm} = \delta_{nm}$ in this case, $I = \displaystyle\sum_{n}|\phi_n\rangle\langle \phi_n|$ in an arbitrary basis which I don't think is right?
– EE18
Jan 20 at 22:47
• @EE18 You're right, see my edit. Jan 21 at 20:01

The problem here is really the usage of the adjoint $$\langle \psi\rvert$$ instead of a dual basis.

The matrix representation of a linear operator $$T : V\to V$$ in terms of any basis $$b_i\in V$$ is $$T=\sum_{i,j} T_{ij} b_i\otimes b_j^\ast$$ where $$b_i\otimes b_j^\ast$$ is a basis of $$V\otimes V^\ast$$, $$V^\ast$$ is the dual space and the dual basis $$b_i^\ast$$ is defined by $$b_i^\ast(b_j) = \delta_{ij}$$. The $$T_{ij}$$ are the matrix components of $$T$$ in the basis $$b_i$$ and the trace $$\sum_i T_{ii}$$ is an invariant for any basis.

Now, when $$V$$ is an inner product space with inner product $$\langle -,-\rangle$$ - such as the Hilbert spaces of quantum mechanics - then there is a general way to associate a dual vector with a vector $$v$$, namely the conjugate/adjoint $$v^\dagger : V\to \mathbb{C}, w\mapsto \langle v,w\rangle$$, and clearly $$v^\dagger\in V^\ast$$ since this is a linear map on $$V$$. When physicists write $$\langle \psi\rvert$$, they mean this adjoint to a vector $$\lvert \psi\rangle$$.

Given a basis $$b_i$$ of this inner product space, you can expand the operator $$T$$ also as $$T = \sum_{ij}T'_{ij}b_i \otimes b_j^\dagger$$. These $$T'_{ij}$$ are not in general the matrix components of $$T$$, but this is what $$\langle b_j\vert T\vert b_i\rangle$$ means in Dirac notation.

Finally, note that when $$b_i$$ is orthonormal, then $$b_j^\dagger(b_i) = \delta_{ij}$$ (this is, after all, the definition of orthonormality!), i.e. the dual and the adjoint basis coincide, and so $$T'_{ij} = T_{ij}$$, i.e. $$\langle b_i\vert T\vert b_j\rangle$$ really are what we usually call the matrix elements in linear algebra.

So when you want to define the trace via the "adjoint components" you need to restrict $$b_i$$ to be an orthonormal basis.

• I've never seen the matrix of a linear operator written in terms of a tensor product, even having read Axler (to the extent that it's "advanced"). Can you provide a reference out of interest?
– EE18
Jan 22 at 23:22
• @EE18 In mathematical terms, this is $\mathrm{End}(V)\cong V^\ast \otimes V$ for finite-dimensional vector spaces, see e.g. this math.SE question. Maybe it helps to realise that $b_i\otimes b_j^\ast$ acts exactly like the matrix that has a 1 at the $ij$-th position and zeros everywhere else: $(b_i\otimes b_j^\ast)(b_k) = b_j^\ast(b_k)b_i = \delta_{jk}b_i$, i.e. it maps $b_j$ to $b_i$ and all other basis vectors to zero, so $b_i\otimes b_j^\ast$ really is the "natural basis" for the space of matrices. Jan 22 at 23:33