Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Operators can be cyclically interchanged inside a trace:
$${\rm Tr} (AB)~=~{\rm Tr} (BA).$$

This means the trace of a commutator of any two operators is zero:
$${\rm Tr} ([A,B])~=~0.$$

But what about the commutator of the position and momentum operators for a quantum particle?

On the one hand: $${\rm Tr}([x,p])~=~0,$$
while on the other hand: $$[x,p]~=~i\hbar.$$

How does this work out?

share|cite|improve this question
The trace of operators $A$ and $B$ has to be defined to perform this operation. You just proven that any finite dimensional Hilbertspace does not have $x$ and $p$ with $[x,p]=i\hbar$. – Fabian May 22 '11 at 12:34
Fabian, +1, but it's the traces of $AB$ and of $BA$ that have to be defined. $x$ and $p$ both have trace zero. – Peter Morgan May 22 '11 at 12:46
I can't believe I've never noticed this. 8| – dbrane May 22 '11 at 13:13
@dbrane -- Just what I was thinking! – Ted Bunn May 22 '11 at 14:02
@Peter Morgan: of course you are right... – Fabian May 22 '11 at 15:21

$x$ and $p$ do not have finite-dimensional representations. In particular, $xp$ and $px$ are not "trace-class". Loosely, this means that the traces of $xp$ and $px$ are both infinite, although it's best to take them both to be undefined. Again loosely, if you subtract $\infty-\infty$, you can certainly get $i\hbar$. But you shouldn't. Everything works out if you think of $p$ as a complex multiple of the derivative operator, for which $\frac{\partial}{\partial x}$ and $x$ act on the infinite dimensional space of polynomials in $x$.

share|cite|improve this answer
But in quantum mechanics we take the traces of operators on infinite-dimensional Hilbert spaces all the time (for example when computing thermal averages). How can we tell when the trace is defined and when it's not? – Joe May 22 '11 at 13:22
That is a tough question. Knowing that it's there to ask, and to look for the consequences as you look at QM, in some ways takes you to a higher level. The idea of boundedness is often used instead of "has a trace", because it is closed under multiplication. Loosely, this is the generalization to infinite dimensional spaces of the idea of "all eigenvalues are finite". In this sense, the space of bounded operators on a Hilbert space is "better behaved" than the space of trace-class operators. Try – Peter Morgan May 22 '11 at 13:54
@Joe In more sophisticated treatments of thermal states the trace is not mentioned, instead an algebraic property is introduced that distinguishes thermal states from the vacuum, known as the KMS-condition. The ramifications are endless. Note that all eigenvalues are finite is a weaker requirement for an operator than that the trace, loosely the sum of all the eigenvalues, is finite. – Peter Morgan May 22 '11 at 14:02
@Joe: Great question. Please ask it on this site as a question. – wnoise May 22 '11 at 19:02
@Joe: I actually wonder about the same thing. Something you see something like 'we add a factor $e^{-\beta H}$ for convergence and take the limit $\beta \rightarrow 0$', but I've never thought about what this truly means. – Gerben May 22 '11 at 23:53
up vote 18 down vote accepted

After reading @Peter Morgan's answer, and giving it some more thought, I think this is actually simpler than it seems at first.

For finite-dimensional spaces the trace of a commutator is indeed always zero. For infinite-dimensional spaces the trace is not always defined, since it takes the form of an infinite sum (for countable dimension) or an integral (for continuous dimension) which do not always converge.
When the trace is defined, it obeys the same rules as in finite dimension, specifically the trace of a commutator is zero. For operators such as $x$, $p$ and their products, the trace is simply not defined, so there is no sense in asking questions about it.
When computing thermal averages, the factor $e^{-\beta H}$ makes sure the trace converges, since the energy is always bound from below (otherwise the system is unphysical).

I'm sure the concepts mentioned by @Peter Morgan are important in this context (boundedness, KMS-condition), but I don't know anything about them, and I think the answer I just provided suffices for practical purposes.

share|cite|improve this answer
Well, most of QM deals with $x$ and $p$ and their functions and the products of those, and the trace is quite well defined for the crushing majority of those, filling up QM books and works. Telling somebody some traces are undefined but some are not hardly resolves the paradox. I believe Peter Morgan's answer is spot on, and not this one. – Cosmas Zachos 9 hours ago

Fleshing out @Peter Morgan's answer a bit, to the effect that $x$ and $p$ are not bounded operators, so their commutator need not be bounded. First note that $$[x^n,p] = i\hbar nx^{n-1} ~,$$ hence the operator norms of both sides satisfy $$ 2\| p\| ~ \|x\|^n \geq n \hbar \|x\|^{n-1}$$ so that, for any $n$, $$2\|x\|~\|p\|\geq n \hbar~. $$ Since $n$ can be arbitrarily large, at least one l.h.s operator cannot be bounded, and the dimension of the underlying Hilbert space cannot be finite. Utilizing the Weyl relations, it can actually be shown that both operators are unbounded.

Now for the magic of the paradox resolving itself: In finite Hilbert space representations of $x$ and $p$ (Weyl), the commutator does indeed vanish, as it should, but the right hand side is not quite the identity, but a finite matrix with 0s in the diagonal, so, then traceless, all right. Santhanam, T. S.; Tekumalla, A. R. (1976). "Quantum mechanics in finite dimensions". Foundations of Physics 6 (5) p. 583. doi:10.1007/BF00715110.

In this remarkably insightful paper, it is shown that, in the continuum limit, this very matrix goes to the Dirac-δ, the infinite-dimensional identity under discussion here!

share|cite|improve this answer

I think that the problem stems from the action of the operator $\hat p$. Please correct me if I am mistaken.
The action of the operator $\hat p$ in the quantum space is defined as
$<x|\hat p|a>=-i \hbar \partial_x <x|a>$
if the state $|a>$ does not depend on x. In fact, if the state $|a>$ depended on $x$, like for instance $|a>=f(x)|b>$ for any scalar function $f(x)$, then clearly the equation
$<x|\hat p|a>=<x|\hat p f(x)|b>=-i \hbar \partial_x <x|f(x)|b>= -i \hbar \partial_x (f(x) <x|b>) $
would be badly defined, as it could be evaluated in another different way: $<x|\hat p|a>=<x|\hat p f(x)|b>=f(x) <x|\hat p |b>=f(x)(-i \hbar) \partial_x <x|b>$
The second evaluation comes from the fact that, in Standard Quantum Mechanics, it is postulated that any operator acts on ket vectors and not on scalars (with the exception the Time reversal operator, which is not of any use here).

The commutator relation $\left[\hat x, \hat p\right]=i\hbar$ is obtained from the action of the operator $\hat p$ as defined above. Thus, it comes straightforwardly that such a commutation relation cannot be generally used in a scalar product ($<x|...|ket>$) if the ket state on the right depends on $x$.

Having said that, when you perform the trace of the commutator $\left[\hat x, \hat p\right]$, you are doing
$Tr\Big[\left[\hat x, \hat p\right]\Big]=\int dx <x|(\hat x\hat p-\hat p\hat x)|x>=\int dx <x|(x\hat p-\hat p x)|x>$,
where in the last step above I have just extracted the eigenvalues from the eigenstates $|x>$. In the above equation you have a scalar product where the ket on the right depends on $x$. Thus, you'll have to be careful in the evaluation and you cannot use the $xp$-commutation relations straight away. With a little care, everyone can see from the above equation that, indeed, the trace gives zero
$\int dx <x|(x\hat p-\hat p x)|x>=\int dx \,x<x|(\hat p-\hat p )|x>=0$,
as it should.
Whereas, if you had used the $xp$-commutation relations from the outset, you would have wrongly found
$Tr\Big[\left[\hat x, \hat p\right]\Big]=Tr\Big[i\hbar\Big]=i\hbar$.

Edited after Joe's Comment
In the last equation I forgot the dimensionality of the space. It must be modified as $Tr\Big[\left[\hat x, \hat p\right]\Big]=Tr\Big[i\hbar\Big]=i\hbar\,D$
where $D$ are the dimensions of the quantum space you are taking the trace in. Thanks Joe.

share|cite|improve this answer
In the last line: when you evaluate ${\rm Tr}(i\hbar)$ you get an integral that doesn't converge, therefore the trace is not defined, or you can say the trace is infinite if you'd like, anyway it does not equal $i\hbar$. Secondly, you supposedly show that ${\rm Tr}([\hat{x},\hat{p}])=0$, but if you repeat the calculation without integrating, you get that $\langle x|[\hat{x},\hat{p}]|x\rangle =0$, which is obviously wrong. Your mistake here is that you forgot to take the derivative of $x$ in the expression $\hat{p}x$ (this is how you prove $[\hat{x},\hat{p}]=i\hbar$ in the first place). – Joe Jan 23 '13 at 10:48
I edited the misprint in the last line, thanks for pointing it out. As for your second comment, I keep my position. Thanks for sharing your thoughts. – Wizzerad Jan 25 '13 at 13:41

Whenever something goes tricky, do not always rely on "infinite, undefined, etc" to get over contradictions easily. Whatever you have been told may not be correct forever. So go brave, you may discover something new or find a better explanation. I don't have a good answer here. But what I think is this way.

If the $\infty_1-\infty_2$ is giving you an $i\hbar$, then the Tr{$\infty_1$}-Tr{$\infty_2$} should also give you something consistent. But unfortunately it doesn't in this case. Then I start to wonder whether all linear operators have well-defined matrix form. Which may not be neccesarily true. Suppose they have at least Hilbert space matrix form, infinite dimensional matrices may have some differences in algebraic operations from finite dimensional matrices. But the trace operator is only well-defined on finite dimensional matrices. Does it or should it behave the same way over infinite dimensional matrices?

If the original definition of some concept is missing in the bigger space, you may consider extend its definition to try to fit everything nicely!-:)

share|cite|improve this answer
I don't understand what you're trying to say. The original definition of the trace is not missing in infinite dimensional spaces. It is defined as an infinite sum or integral, but only when the sum or integral converges. – Joe Jul 5 '11 at 6:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.