Skip to main content
University Physics V

University Physics V · Quantum Uncertainty and Commutation Relations · 8.2

The Canonical Commutation Relation

Everything else in this unit is a corollary of one line of algebra. Hand the commutator a test function, differentiate the product, and watch two large terms cancel and leave a bare number behind. This lesson runs that derivation twice — once in x, once in p — and then works out what the number iħ makes impossible.

01

Build the model

Connect the measurement to the mechanism.

x̂ and p̂ are not numbers, so x̂p̂ − p̂x̂ cannot be evaluated by cancelling symbols. It is an operator, and an operator means nothing until it acts, so hand it a differentiable, square-integrable ψ. With p̂ = −iħ d/dx the first ordering gives −iħxψ′ and the second gives −iħ(xψ)′ = −iħψ − iħxψ′.

The xψ′ pieces are identical and cancel exactly; what survives is the term the product rule made by differentiating x itself, and dx/dx = 1. So [x̂, p̂]ψ = iħψ for every ψ in the domain, which says the commutator is not an operator at all but the number iħ times the identity. That is a strong claim and it charges for itself.

A commutator equal to a number has zero trace, so no pair of finite matrices can realise it and no pair of bounded operators can either: the space must be infinite-dimensional, and x̂ and p̂ must be unbounded, defined only on a dense domain. It also inherits the fine print of its own derivation — a Cartesian coordinate running over the whole real line — so the same move applied to an angle on a circle yields a relation that is provably false. Robertson's bound, the ladder operators and Ehrenfest's theorem are all this one line pushed through the algebra.

Simple definition
The canonical commutation relation says position and momentum fail to commute by a fixed amount: x̂p̂ − p̂x̂ is iħ times the identity operator — the same number in every state, in every representation, and at every time.
Example
Act on ψ(x) = exp(−x²/2a²): x̂p̂ψ = iħ(x²/a²)ψ while p̂x̂ψ = iħ(x²/a² − 1)ψ. Subtracting leaves iħψ, or 1.055 × 10⁻³⁴ J s times ψ, with no a anywhere — the width of the state never enters.
Acting on a test function(x̂p̂ − p̂x̂)ψ = −iħxψ′ + iħ(ψ + xψ′) = iħψ

The xψ′ terms cancel. What survives is dx/dx = 1, lifted out by the product rule and dressed in iħ.

ψ differentiable, with xψ and ψ′ square-integrable; ħ = 1.055 × 10⁻³⁴ J s

The canonical set in three dimensions[x̂ⱼ, p̂ₖ] = iħ δⱼₖ · [x̂ⱼ, x̂ₖ] = 0 · [p̂ⱼ, p̂ₖ] = 0

x̂ and p̂y commute, so they share an eigenbasis and carry no mutual uncertainty penalty.

j and k run over x, y, z; δⱼₖ is the Kronecker δ, so ħ appears only on matching axes

The same relation in momentum spacex̂ = +iħ ∂/∂p · iħ ∂(pφ)/∂p − iħ p ∂φ/∂p = iħφ

The relation is representation-independent: change basis and the iħ survives untouched.

φ(p) is the transform of ψ(x) on the kernel exp(+ipx/ħ), and that sign fixes the plus on x̂

Commutator with a function of the partner[x̂, F(p̂)] = iħ F′(p̂) · [p̂, G(x̂)] = −iħ G′(x̂)

Gives [x̂, p̂²] = 2iħp̂ and [p̂, V(x̂)] = −iħV′(x̂), which are both Ehrenfest relations in one line.

F and G analytic; the primes are ordinary derivatives dF/dp and dG/dx of the operator's argument

Why no matrix can obey itTr[Â, B̂] = 0 · Tr(iħ ÎN) = iħN ≠ 0

Forces an infinite-dimensional space, and unbounded x̂, p̂ living on a dense domain rather than all of L².

true for every finite N; Wintner and Wielandt extend the obstruction to all bounded operators

Weyl form: the relation exponentiatedexp(iap̂/ħ) x̂ exp(−iap̂/ħ) = x̂ + a

The bounded restatement Stone and von Neumann prove unique, so every representation is one theory.

a is a real displacement in m; exp(−iap̂/ħ) is the unitary carrying ψ(x) to ψ(x − a)

01

A commutator is an operator: give it something to act on

You cannot evaluate x̂p̂ − p̂x̂ by staring at it, because neither symbol is a number; the expression is an instruction, and an instruction is defined by what it does. Supply a test function ψ(x) that is differentiable and square-integrable. First ordering: x̂p̂ψ = x(−iħ dψ/dx) = −iħxψ′, because p̂ differentiates and only then does x multiply what comes out. Second ordering: p̂x̂ψ = −iħ d(xψ)/dx, and now x sits inside the derivative, so the product rule returns −iħ(ψ + xψ′). Subtract, and the two −iħxψ′ pieces are identical and vanish: [x̂, p̂]ψ = −iħxψ′ + iħψ + iħxψ′ = iħψ. Nothing about ψ was used except differentiability, so the result is the operator identity [x̂, p̂] = iħ Î, valid on every state in the domain. Reverse the order and the sign reverses with it: [p̂, x̂] = −iħ. The domain is not decoration — ψ must be smooth enough to differentiate and decay fast enough that xψ and ψ′ stay square-integrable, which is why Schwartz functions are the standard home for this relation.

02

The momentum representation, and the sign that flips

Run the derivation in the other basis and watch where the sign comes from. Write ψ(x) as a superposition of momentum eigenfunctions, ψ(x) = (2πħ)⁻¹⁄² ∫ φ(p) exp(ipx/ħ) dp. Acting with p̂ = −iħ ∂/∂x on the kernel gives −iħ(ip/ħ) exp(ipx/ħ) = p exp(ipx/ħ), so in this basis p̂ is plain multiplication by p. Position is the interesting one. Since ∂/∂p exp(ipx/ħ) = (ix/ħ) exp(ipx/ħ), multiplying by x is the same as acting with −iħ ∂/∂p on the kernel — but the kernel is not where φ lives. Integrate by parts, the boundary term dies because φ is square-integrable, and the derivative lands on φ with its sign reversed: x̂φ = +iħ dφ/dp. Now test the commutator: iħ d(pφ)/dp − p(iħ dφ/dp) = iħφ + iħp φ′ − iħp φ′ = iħφ. Same relation, same iħ, and no reference to x at all. Guessing x̂ = −iħ d/dp by false symmetry would have returned −iħ instead, and with it momentum eigenfunctions running the wrong way.

03

No finite matrix can obey it, and what that costs

Take the trace of both sides. For finite matrices Tr(ÂB̂) = Tr(B̂Â) always, so Tr[Â, B̂] = 0 for any pair whatsoever, while the right-hand side gives Tr(iħ ÎN) = iħN, which is never zero. No N × N matrices satisfy the canonical relation at any N. Wintner and Wielandt push the same conclusion onto bounded operators in infinite dimensions, so x̂ and p̂ are forced to be unbounded, defined on a dense domain rather than on all of L²(ℝ), and every manipulation above is legitimate only there. That is not a technicality for numerical work, it is a warning. A computer works in finite dimensions, so any x and p matrices you build must break the relation somewhere, and it pays to know where. Truncate the oscillator basis at N states and [x̂, p̂] comes out as iħ diag(1, 1, …, 1, −(N − 1)): exact on the lowest N − 1 states, badly wrong on the top one, and traceless overall because the theorem leaves no other option. Keep the occupied states well below the cut and the deficit never reaches your answer.

04

Push it through: commutators with functions

The relation is worth far more than its derivation. Use [Â, B̂Ĉ] = [Â, B̂]Ĉ + B̂[Â, Ĉ]. Because [x̂, p̂] = iħ is a number, it commutes with everything, so [x̂, p̂²] = iħp̂ + p̂ iħ = 2iħp̂, and induction gives [x̂, p̂ⁿ] = iħ n p̂ⁿ⁻¹. Sum the series and the rule becomes compact: commuting with x̂ differentiates a function of p̂, [x̂, F(p̂)] = iħF′(p̂), while commuting with p̂ differentiates a function of x̂ and flips the sign, [p̂, G(x̂)] = −iħG′(x̂). Feed that into Ehrenfest's theorem, d⟨Â⟩/dt = (i/ħ)⟨[Ĥ, Â]⟩, with Ĥ = p̂²/2m + V(x̂). The potential commutes with x̂, so [Ĥ, x̂] = −iħp̂/m and d⟨x̂⟩/dt = ⟨p̂⟩/m. The kinetic term commutes with p̂, so [Ĥ, p̂] = iħV′(x̂) and d⟨p̂⟩/dt = −⟨V′(x̂)⟩. Newton's second law for mean values falls straight out of the commutator, and nothing classical was assumed on the way in.

05

The fine print: Cartesian, and on the whole line

Read the derivation again and note what it assumed: a coordinate x running over all of ℝ, with p̂ = −iħ d/dx self-adjoint on that line. Change either premise and the conclusion goes. Put the particle on a circle and try [φ̂, L̂z] = iħ with L̂z = −iħ ∂/∂φ. Single-valuedness forces L̂z|m⟩ = mħ|m⟩ with m an integer, so take the diagonal element in that state: ⟨m|φ̂L̂z|m⟩ − ⟨m|L̂zφ̂|m⟩ = mħ⟨m|φ̂|m⟩ − mħ⟨m|φ̂|m⟩ = 0, while the relation demands iħ. That is the trace argument again in miniature, and it kills the relation outright: there is no self-adjoint angle operator on a circle. The repair is to use single-valued functions of the angle, [L̂z, cos φ̂] = iħ sin φ̂ and [L̂z, sin φ̂] = −iħ cos φ̂, from which an honest uncertainty bound does follow. The half-line bites too. Radial momentum p̂ᵣ = −iħ(∂/∂r + 1/r) does satisfy [r̂, p̂ᵣ] = iħ, but it has no self-adjoint extension on the half-line, so it is not an observable and the bound it appears to imply means nothing.

06

One relation, one theory: Weyl, Stone and von Neumann

Because x̂ and p̂ are unbounded, the relation as written is sensitive to domains: Nelson built a pair satisfying it on a dense domain that is nevertheless not the standard one. The sharp version exponentiates both sides into bounded unitaries. With Û(a) = exp(−iap̂/ħ) and V̂(b) = exp(ibx̂/ħ), the Weyl form reads Û(a)V̂(b) = exp(−iab/ħ) V̂(b)Û(a), and Stone and von Neumann prove that on a separable Hilbert space every irreducible representation of it is unitarily equivalent to the position representation. The position picture, the momentum picture and the oscillator's ladder picture are therefore one theory in three sets of clothes. Make that concrete: put â = √(mω/2ħ)(x̂ + ip̂/mω). Then [â, â†] = (−i/2ħ)[x̂, p̂] + (i/2ħ)[p̂, x̂] = ½ + ½ = 1, which came from the canonical relation and nothing else — and it is why the oscillator spectrum ħω(n + ½) can be derived without ever writing down a wavefunction.

02

Change one variable at a time

Make the relationship visible.

Interactive model
1.2 nm
1.00 nm

Leave a at 1.20 nm and put the probe at x = 1 nm: the dashed curves read 0.491 and −0.216, and the gap between them is 0.707, which is ψ(1). Now widen a to 2.40 nm — both dashed curves move, the gap moves with them, and the last readout stays at 1.000.

Interactive physics modelThree curves for the Gaussian ψ(x) = exp(−x²/2a²), each divided by iħ so what is left is a real, dimensionless multiple of ψ. The two dashed curves are x̂p̂ψ and p̂x̂ψ; the solid curve is their difference. At the probe x = 1.00 nm with a = 1.20 nm they read 0.491, −0.216 and 0.707.ψ(x) = exp(−x²/2a²), a = 1.20 nmprobe at x = 1.00 nmsolid: difference ÷ iħ = ψdashed: x̂p̂ψ ÷ iħ, p̂x̂ψ ÷ iħheights in units of ψ(0)+1−1at x = 0: p̂x̂ψ = −iħψ, x̂p̂ψ = 0, difference = +iħψ

x̂p̂ψ ÷ iħ0.491

p̂x̂ψ ÷ iħ-0.216

DIFFERENCE ÷ iħ0.707

DIFFERENCE ÷ iħψ1.000

Live interpretationx̂p̂ψ ÷ iħ: 0.491. p̂x̂ψ ÷ iħ: −0.216. DIFFERENCE ÷ iħ: 0.707. DIFFERENCE ÷ iħψ: 1.000

03

Catch the common trap

Explain before calculating.

In the position representation a student writes (x̂p̂ − p̂x̂)ψ = x(−iħψ′) − (−iħxψ′) = 0 and concludes that position and momentum commute. Which single step is wrong, and what does repairing it give?

Choose an answer to test the model.

04

Practice & worked examples

Reason from the model, then test the result.

EasyTake the unnormalised Gaussian ψ(x) = exp(−x²/2a²) with a = 0.50 nm. Evaluate x̂p̂ψ and p̂x̂ψ explicitly, subtract them, and say what became of a.
  1. ψ′ = (−x/a²)ψ, so p̂ψ = −iħψ′ = iħ(x/a²)ψ. Multiplying by x on the left gives x̂p̂ψ = iħ(x²/a²)ψ.
  2. The other order puts x inside the derivative: p̂x̂ψ = −iħ d(xψ)/dx = −iħ(ψ + xψ′) = −iħψ + iħ(x²/a²)ψ = iħ(x²/a² − 1)ψ.
  3. Subtract: [x̂, p̂]ψ = iħ(x²/a²)ψ − iħ(x²/a² − 1)ψ = iħψ. Every term carrying x or a has cancelled.
  4. Check it at one point. At x = a = 0.50 nm the ratio x²/a² is 1, so x̂p̂ψ = iħψ(a) while p̂x̂ψ = 0 — a gap of exactly iħψ(a) = 1.055 × 10⁻³⁴ J s times ψ(a).

Answer[x̂, p̂]ψ = iħψ. The width a cancels identically, so what is left is the number iħ = 1.055 × 10⁻³⁴ J s times the identity — the same on this Gaussian, on any other, and on every state in the domain.

MediumUse the product rule for commutators, [Â, B̂Ĉ] = [Â, B̂]Ĉ + B̂[Â, Ĉ], to evaluate [x̂, p̂²] and then [Ĥ, x̂] for Ĥ = p̂²/2m + V(x̂). Feed the result into d⟨Â⟩/dt = (i/ħ)⟨[Ĥ, Â]⟩ and evaluate d⟨x̂⟩/dt for an electron of mean momentum 2.0 × 10⁻²⁴ kg m s⁻¹.
  1. [x̂, p̂²] = [x̂, p̂]p̂ + p̂[x̂, p̂] = iħp̂ + p̂(iħ) = 2iħp̂. The two pieces add rather than interfere because iħ is a number and commutes with p̂.
  2. V(x̂) is a function of x̂ alone, so [x̂, V(x̂)] = 0 and [x̂, Ĥ] = (1/2m)[x̂, p̂²] = iħp̂/m. Antisymmetry then gives [Ĥ, x̂] = −iħp̂/m.
  3. Ehrenfest: d⟨x̂⟩/dt = (i/ħ)⟨[Ĥ, x̂]⟩ = (i/ħ)(−iħ/m)⟨p̂⟩ = ⟨p̂⟩/m. The classical v = p/m was never assumed; it dropped out of the commutator.
  4. Numbers: ⟨p̂⟩/m = 2.0 × 10⁻²⁴ ÷ 9.109 × 10⁻³¹ = 2.2 × 10⁶ m s⁻¹, which is 0.73% of c, so the non-relativistic Ĥ used above is still defensible.

Answer[x̂, p̂²] = 2iħp̂, [Ĥ, x̂] = −iħp̂/m, and d⟨x̂⟩/dt = ⟨p̂⟩/m = 2.2 × 10⁶ m s⁻¹.

HardA program truncates the oscillator basis at N = 4 states and builds x̂ = √(ħ/2mω)(â + â†) and p̂ = i √(mħω/2)(↠− â) from the truncated ladder matrices. Find the commutator matrix [x̂, p̂], and say which states the canonical relation still holds on.
  1. In the truncated basis â|n⟩ = √(n)|n − 1⟩ for n = 1, 2, 3, and â†|n⟩ = √(n + 1)|n + 1⟩ for n = 0, 1, 2 — but â†|3⟩ = 0, because the state |4⟩ has been thrown away.
  2. So â†â = diag(0, 1, 2, 3) as usual, while â↠= diag(1, 2, 3, 0): the top state loses its raise. Hence [â, â†] = diag(1, 1, 1, −3), not the identity.
  3. Now [x̂, p̂] = i √(ħ/2mω) √(mħω/2) [â + â†, ↠− â] = i(ħ/2)(2[â, â†]) = iħ[â, â†] = iħ diag(1, 1, 1, −3).
  4. Read the theorem off the matrix. Its trace is iħ(1 + 1 + 1 − 3) = 0, exactly as Tr[Â, B̂] = 0 demands, so the deficit could never have been spread evenly — truncation had to dump all of it somewhere.
  5. It is dumped on the top state. The relation is exact on |0⟩, |1⟩ and |2⟩ and wrong by −4iħ on |3⟩, so the calculation is trustworthy only while the occupied states stay well below the cut.

Answer[x̂, p̂] = iħ diag(1, 1, 1, −3), of trace zero. It is exact on the lowest three states and wrong by −4iħ on the top one — the finite-matrix obstruction turned into arithmetic.