Skip to main content

Quantum core · institution-dependent · Interactive lesson

The canonical commutation relation

Every position–momentum result in this unit leans on 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.

UPV-08.02 · Lesson 2 of 9 in this unit. Position is not a completion score.
Starting model: The canonical commutation relationThree 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ħψ
Start with a picture. Change the model in the lab below.

Quantum core · institution-dependent. Your university determines the required depth of these quantum topics, including the use of operators, differential equations and computation. Institution-dependent does not automatically mean optional.

1

Build the model

The whole relation is the product rule, wearing a factor of iħ.

The key idea

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ħψ, i × 1.055 × 10⁻³⁴ J s times ψ, with no a anywhere — the width of the state never enters.

The complete physical model and assumptions

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 no differential operator at all but just the number iħ times the identity. That is a strong claim and it charges for itself. A commutator of finite matrices always has zero trace and iħ times the identity does not, 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 for x̂ and p̂, the ladder operators and Ehrenfest's theorem are all this one line pushed through the algebra.

1A 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.

2The 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πħ)(−1/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 φ vanishes as |p| → ∞, 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.

3The 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 that obeys it. 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.

4One 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.

2

Key equations

Read the units, assumptions and limits before substituting.

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 space

x̂ = +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̂

An angle on a circle breaks it

⟨m|[φ̂, L̂z]|m⟩ = mħ⟨m|φ̂|m⟩ − mħ⟨m|φ̂|m⟩ = 0 ≠ iħ

φψ jumps at φ = 2π, so it leaves the domain where L̂z is self-adjoint, and the integration by parts leaves a boundary term that carries the whole iħ.

L̂z = −iħ ∂/∂φ acts on single-valued functions of the angle φ in rad; L̂z|m⟩ = mħ|m⟩ with m an integer and ħ in J s

The repair: periodic functions of the angle

[L̂z, cos φ̂] = iħ sin φ̂ · [L̂z, sin φ̂] = −iħ cos φ̂

These survive where [φ̂, L̂z] = iħ cannot, and they are what an honest angle–angular-momentum bound is built from.

cos φ̂ and sin φ̂ are dimensionless and single-valued, so they keep a state inside L̂z's domain; both sides carry J s

Weyl form: the relation exponentiated

exp(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)
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

1.2 nm
0.6 to 2.4 nm; steps of 0.1.
1.00 nm
−3 to 3 nm; steps of 0.25.

Try this. 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.

Live results

x̂p̂ψ ÷ iħ
0.491
p̂x̂ψ ÷ iħ
-0.216
DIFFERENCE ÷ iħ
0.707
DIFFERENCE ÷ iħψ
1.000

Results follow this lesson’s model and assumptions. Displayed values are rounded.

Interactive Physics V 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ħψ
Three 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.

Predict → change one variable → check

Plan a change before running it. Every other input stays at the saved baseline.

Saved baseline. Gaussian width a: 1.2 nm; Probe position x: 1.00 nm

Baseline 1.2; choose 0.6 to 2.4, in steps of 0.1.
4. Compared with the saved baseline, this result will…

This experiment is kept only while this page is open. It does not change saved course progress.

4

Catch the common trap

The mistake is always the second term. Students write (x̂p̂ − p̂x̂)ψ = x(−iħψ′) − (−iħxψ′) = 0, conclude that position and momentum commute, and have read p̂x̂ψ as x times p̂ψ. It is not that. x̂ acts first, so p̂ must differentiate the whole product, and d(xψ)/dx = ψ + xψ′ carries a term the other ordering never produces. That lone ψ is the entire relation: strip the iħ away and what is left is dx/dx = 1. The other half of the error is reading the result as a statement about apparatus, that measuring x kicks p. Nothing was measured. [x̂, p̂] = iħ is an algebraic identity holding on every state in the domain, including states nobody has ever prepared, and it returns the same number for a ground-state atom as for a free electron. What it forbids is a shared eigenbasis, and that is a fact about the operators, not about clumsy instruments.

5

Practice & worked examples

3 authored examples. Make an attempt, then reveal the reasoning one step at a time.

EasyExample 1

Take 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.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 4 steps revealed.

MediumExample 2

Displace the Easy example's Gaussian to ψ(x) = exp(−(x − x₀)²/2a²), with a = 0.50 nm and x₀ = 2.0 nm. On the kernel exp(+ipx/ħ) its momentum amplitude is φ(p) ∝ exp(−a²p²/2ħ²) exp(−ipx₀/ħ). Act on φ with x̂ = +iħ d/dp, find ⟨x̂⟩, check it against position space, and say what x̂ = −iħ d/dp would have reported.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

HardExample 3

A particle on a ring is in the L̂z eigenstate ψ(φ) = exp(2iφ)/√(2π), with φ in [0, 2π) and L̂z = −iħ d/dφ. Test [φ̂, L̂z] = iħ on it: compute ⟨φ̂L̂z⟩, then ⟨L̂zφ̂⟩ both by letting L̂z act to the left and by differentiating φψ directly, and account for the gap. Then test the bound Δφ ΔLz ≥ ħ/2 that the relation would imply, and the one the repaired pair [L̂z, cos φ̂] = iħ sin φ̂ gives.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

6

Quick check

Select an answer and explain it before checking.

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?
7

Review & continue

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.

  • Explain the relationship without looking at the equation.
  • Check a sign, a unit and a model assumption in your working.
  • Return to the lab or worked example if a step is still unclear.

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.