
Commutators and the canonical relation [x̂, p̂] = iħ
One constant, iħ, shapes all quantum kinematics.
One line of calculus, [x̂, p̂] = iħ, carries the whole of quantum kinematics. Read it as structure rather than as a sum: see what the constant on its right rules out, why no finite matrices can hold it, where it quietly stops being true, and what it hands on to compatibility and uncertainty.
Build the model
The right side is a constant, and that constant shapes all of quantum kinematics.
1The big idea
Act with x̂ and p̂ = −iħ d/dx on an arbitrary differentiable function, in both orders, and the product rule leaves one term behind: [x̂, p̂] = iħ. Because the function was arbitrary, this is an identity between operators, fixed before any state is prepared and whatever the potential, which is why it counts as kinematics rather than dynamics. Everything distinctive about it comes from the right side being a nonzero constant. A joint eigenfunction of x̂ and p̂ would make the commutator give zero, so none exists, and taking the mean shows that neither operator has a normalisable eigenfunction at all. Every commutator of finite matrices is traceless while iħ times the identity is not, so a particle's states cannot live in any finite-dimensional space. With the Leibniz rule the one relation fixes every other commutator of position and momentum, [f(x̂), p̂] = iħf′(x̂), which is iħ times the classical Poisson bracket and disappears as ħ → 0. The model stops where its derivation's hidden assumption does: x must be a Cartesian coordinate over the whole real line, so that multiplying by x and shifting by any distance keep a function allowed. On a ring, momentum comes in discrete steps with normalisable eigenstates; on a half-line, −iħ d/dx cannot be an observable at all, because the boundary condition that makes it Hermitian leaves it no eigenfunctions. And the relation bounds no spread by itself: it supplies the constant that the Schwarz inequality later turns into ħ/2.
2In one sentence
The canonical commutation relation says that x̂p̂ and p̂x̂, applied to any function they can act on, differ by exactly iħ times that function: [x̂, p̂] = iħ.
Example. Take f(x) = exp(−x²/(2a²)) with a = 1.0 nm. At x = a, x̂p̂f = −iħxf′ = 0.607iħ while p̂x̂f = −iħ(f + xf′) = 0, and the difference, 0.607iħ = 6.40 × 10⁻³⁵ i J s, is iħf(a), as the relation demands.
3An identity between operators, fixed before any state
The computation belongs to UQMI-03.09 and takes one line: for any differentiable f, [x̂, p̂]f = x(−iħf′) + iħ(xf)′ = iħf, the extra term from the product rule being all that survives. Because f was arbitrary, the result is an equation between operators, [x̂, p̂] = iħ times the identity. It names no wavefunction and no potential, so the free electron, the infinite well and the oscillator all share it: it is the kinematics every Hamiltonian in the course is built on. Check it twice. Dimensions: x̂p̂ carries m × kg m s⁻¹ = J s, the unit of ħ. Correspondence: the classical Poisson bracket of x and p is 1, and the quantum relation is that bracket times iħ; as ħ → 0 the operators commute and a phase-space point with x and p both sharp returns. The size of ħ against xp decides when that limit applies. An electron bound across 0.1 nm with 10 eV of kinetic energy has xp = 1.7 × 10⁻³⁴ J s, comparable to ħ; a 10⁻¹⁵ kg dust grain drifting 1 μm at 1 mm s⁻¹ has xp = 10⁻²⁴ J s, about 10¹⁰ times ħ.
4Not one state is sharp in both, and none is sharp in either
Suppose ψ were an eigenfunction of both, x̂ψ = x₀ψ and p̂ψ = p₀ψ. Then x̂p̂ψ = p₀x₀ψ and p̂x̂ψ = x₀p₀ψ, their difference is zero, and the relation demands iħψ. Since iħ ≠ 0, ψ = 0: the pair shares no eigenfunction at all, not merely no complete set. The relation says more. Its mean in any normalised ψ is ⟨[x̂, p̂]⟩ = iħ∫|ψ|² dx = iħ, the same 1.055 × 10⁻³⁴ i J s in every state. If ψ were a normalisable eigenfunction of x̂ alone, moving the Hermitian x̂ onto ψ* would give ⟨x̂p̂⟩ = x₀⟨p⟩, acting directly gives ⟨p̂x̂⟩ = x₀⟨p⟩ as well, and the commutator would have mean zero, not iħ; the same move with p̂ disposes of a momentum eigenfunction. So neither operator has a normalisable eigenfunction, and δ(x − x₀) and e(ip₀x/ħ) are limits, never preparations. Contrast a commutator that is itself an operator, as [L̂ₓ, L̂y] = iħL̂z will be: it vanishes on some states, so it does not forbid a state sharp in both, and a state with no angular momentum at all is sharp in every component.
5Take the trace, then truncate
Could x̂ and p̂ be N × N matrices, as spin will be? For any two square matrices tr(XP) = Σ XᵢⱼPⱼᵢ = tr(PX), so every commutator is traceless, while tr(iħIN) = iħN for every N ≥ 1. No choice of entries helps, Hermitian or not, because the argument never looks at them. A particle's state space is therefore infinite-dimensional, and a two-level system can still carry non-commuting observables, as spin will with the traceless iħŜz, but never a canonical pair. Infinite matrices escape because tr(XP) and tr(PX) then diverge separately. They exist: in the oscillator's energy basis, taken here as data from a later unit, x̂ and p̂ have entries b√(n + 1) and ±i(ħ/2b)√(n + 1) beside the diagonal, with b = √(ħ/2mω). Keep N rows and columns and XN PN − PN XN = iħ diag(1, …, 1, 1 − N): every entry right but the last, which carries the whole deficit. A state whose weights halve level by level sees a mean commutator of 0.839iħ at N = 5 and 0.969iħ at N = 8.
6One relation fixes the rest of the algebra
Commutators obey a Leibniz rule, [ÂB̂, Ĉ] = Â[B̂, Ĉ] + [Â, Ĉ]B̂, which is pure algebra. With [x̂, p̂] = iħ it builds every other commutator of position and momentum without touching a wavefunction: [x̂², p̂] = x̂[x̂, p̂] + [x̂, p̂]x̂ = 2iħx̂, then [x̂ⁿ, p̂] = iħnx̂ⁿ⁻¹ by induction, and [f(x̂), p̂] = iħf′(x̂) for any f with a Taylor series. Put f = V: [p̂, V̂] = −iħV′ = iħF, so the commutator with momentum returns the classical force, iħ times the Poisson bracket. The same constant is why the product x̂p̂ is not an observable and must be symmetrised to ½(x̂p̂ + p̂x̂), which UQMI-04.01 shows and the first worked example reads straight off the relation. In three dimensions the pattern extends to [x̂ᵢ, p̂ⱼ] = iħδᵢⱼ, with the three positions commuting among themselves and the three momenta likewise.
7Where the assumptions break: rings and half-lines
The one-line proof quietly assumed a Cartesian x over the whole real line, so that xf and every shifted copy of f remain allowed functions. The relation is the infinitesimal form of that freedom: e(−iap̂/ħ) moves ψ(x) to ψ(x − a) for every real a. On a ring of circumference L, arc length ŝ jumps by L at the cut, so ŝψ is not periodic and leaves the functions p̂ acts on. A shift by L returns every state to itself, so momentum comes in steps of 2πħ/L, 3.31 × 10⁻²⁵ kg m s⁻¹ for L = 2.0 nm, with normalisable eigenstates the line forbids. The periodic e(2πiŝ/L) takes over from ŝ, and its commutator with p̂ is an operator, not a constant. On a half-line x ≥ 0 no shift to the left is allowed, and −iħ d/dx cannot be made an observable. Left unrestricted it is not Hermitian, since √(2κ) e(−κx) is normalisable and has the imaginary eigenvalue iħκ; the wall condition ψ(0) = 0 restores Hermiticity but leaves it no eigenfunctions at all. The radial coordinate of three-dimensional problems lives on exactly such a half-line.
8What the relation hands to the next two topics
Two results in this unit are built on the commutator, and this lesson stops at their threshold. UQMI-04.06 shows that commuting Hermitian operators share a complete set of eigenfunctions, which is what compatibility means; [x̂, p̂] = iħ sits at the far end of that scale, sharing not one. In three dimensions the zeros of iħδᵢⱼ read as a compatibility table: x and py are compatible, x and pₓ are not. UQMI-04.07 bounds the product of the spreads from two separate runs on one preparation below by ½|⟨[Â, B̂]⟩|. For most pairs that right side changes with the state and can vanish. For x̂ and p̂ it is ½|iħ| = ħ/2 = 5.27 × 10⁻³⁵ J s in every normalised state, and that state independence is inherited directly from the constant on the right of the canonical relation. Where the relation fails, so does the universal bound: on the ring, a momentum eigenstate has σₚ = 0 and a finite spread in arc length.
Key equations
What each relation says, and the units it is written in.
Canonical commutation relation
[x̂, p̂] = x̂p̂ − p̂x̂ = iħ
It names no state and no potential, so every one-dimensional problem in the course shares it: kinematics, fixed before any dynamics is chosen.
x̂ in m, p̂ in kg m s⁻¹, ħ = 1.055 × 10⁻³⁴ J s. An operator identity: it holds on every differentiable f.
No joint eigenfunction
x̂ψ = x₀ψ and p̂ψ = p₀ψ ⇒ [x̂, p̂]ψ = 0, yet it must equal iħψ
Not one state is sharp in both, which is stronger than lacking a shared basis. The mean ⟨[x̂, p̂]⟩ = iħ also rules out a normalisable eigenfunction of either.
x₀ in m, p₀ in kg m s⁻¹. Since iħ ≠ 0, the only function passing both tests is ψ = 0.
Trace test for finite matrices
tr(XP − PX) = 0, but tr(iħIN) = iħN
No finite matrices obey the relation, so a particle's state space is infinite-dimensional and a two-level system can carry no canonical pair.
X and P any N × N matrices, IN the identity. Uses only tr(XP) = tr(PX), never the entries.
Truncated oscillator matrices
XN PN − PN XN = iħ diag(1, 1, …, 1, 1 − N)
Every diagonal entry is right except the last, which absorbs the whole trace deficit. A state with weight w in the top kept level sees a mean commutator iħ(1 − Nw).
The lowest N × N block of x̂ and p̂ in the oscillator's energy basis; entries in m and kg m s⁻¹.
Any function of position
[f(x̂), p̂] = iħ f′(x̂)
Built from [x̂, p̂] = iħ and the Leibniz rule alone, never touching a wavefunction. It is iħ times the classical Poisson bracket {f, p} = f′.
f differentiable, f′ = df/dx. With f = V it gives [p̂, V̂] = −iħV′ = iħF, where F is the force in N.
On a ring of circumference L
[e(2πiŝ/L), p̂] = −(2πħ/L) e(2πiŝ/L)
An operator on the right, not a constant, so nothing forbids the discrete momenta 2πnħ/L: steps of 3.31 × 10⁻²⁵ kg m s⁻¹ when L = 2.0 nm.
ŝ is arc length in m, p̂ = −iħ d/ds on periodic functions. The periodic e(2πiŝ/L) replaces ŝ, which jumps at the cut.
Interactive lab
Change one variable. Predict first, then read the result.
Controls
Try this. Hold q = 0.5 and step N from 2 to 8: the corner bar deepens from −1 to −7, yet the mean commutator climbs from 0.33 iħ to 0.97 iħ, because less weight reaches the corner. Then raise q to 0.9, and even N = 8 gives only 0.33 iħ.
Live results
- CORNER ENTRY ÷ iħ
- -4
- TRACE OF iħIN ÷ iħ
- 5
- WEIGHT IN TOP LEVEL
- 0.032
- MEAN ⟨[XN, PN]⟩ ÷ iħ
- 0.839
Catch the common trap
The mistake this lesson is built to prevent.
The tempting reading is that x̂p̂ψ means measure momentum, then position, so that [x̂, p̂] = iħ records how much the second measurement upsets the first. Acting with an operator is not measuring. p̂ψ = −iħψ′ is a new function, usually not normalised and not the state a momentum measurement leaves, which lies close to an eigenfunction of the value found (UQMI-04.04). For a Gaussian centred on zero, x̂ψ = xψ vanishes at the centre and has two lobes of opposite sign: neither a position eigenfunction nor anything a detector produces. The commutator is a statement about the algebra of two operators, true on every function before anything is measured. It reaches the laboratory only through what it sets up: no eigenfunction shared by x̂ and p̂, so no preparation sharp in both, and the floor ħ/2 under the product of spreads from separate runs on fresh copies. Neither involves one measurement disturbing another.
Test it: what changes?
- Corner entry deepens from −1 to −7
- Commutator stays traceless at every N
- Mean commutator climbs from 0.33iħ to 0.97iħ
- Less weight reaches the top kept level
- Corner entry stays at −7
- More weight reaches the top kept level
- Mean commutator drops from 0.97iħ to 0.33iħ
Practice & worked examples
Three tiers. Try each before opening the solution.
EasyExample 1
An electron is prepared in ψ(x) = φ(x)e(ik₀x), where φ is a real, normalised Gaussian of any width s centred on x₀ = 2.0 nm, and k₀ = 5.0 nm⁻¹. Compute ⟨x̂p̂⟩ directly, obtain ⟨p̂x̂⟩ from the canonical relation, and decide whether the product x̂p̂ can be an observable.
View solution →
- Act with p̂ first: p̂ψ = (−iħφ′ + ħk₀φ)e(ik₀x), so ψ*x̂p̂ψ = xφ(−iħφ′ + ħk₀φ), the phase factors cancelling.
- Integrate. The second term gives ħk₀∫xφ² dx = ħk₀x₀. For the first, xφφ′ = ½x(φ²)′, and integration by parts with xφ² → 0 at both ends gives ∫xφφ′ dx = −½∫φ² dx = −½. So ⟨x̂p̂⟩ = ħk₀x₀ + iħ/2.
- The relation gives the other order without a second integral: ⟨p̂x̂⟩ = ⟨x̂p̂⟩ − iħ = ħk₀x₀ − iħ/2, the complex conjugate, as (x̂p̂)† = p̂x̂ requires.
- Numbers: ħk₀x₀ = 1.055 × 10⁻³⁴ J s × 5.0 × 10⁹ m⁻¹ × 2.0 × 10⁻⁹ m = 1.05 × 10⁻³³ J s, and ħ/2 = 5.27 × 10⁻³⁵ J s.
- Verdict: a Hermitian operator has a real mean in every state, and ⟨x̂p̂⟩ has imaginary part ħ/2 here and in every other state, so x̂p̂ is not an observable, as UQMI-04.01 found for real wavefunctions. The symmetrised ½(x̂p̂ + p̂x̂) is, with the real mean ħk₀x₀ = ⟨x⟩⟨p⟩ in this state.
- Checks: every term is in J s. The width s never appears, and the imaginary part does not depend on x₀ or k₀ either, because it comes from the constant iħ. As ⟨x⟩⟨p⟩ grows far beyond ħ, the ħ/2 becomes a vanishing fraction: the classical limit, where ordering stops mattering.
Answer. ⟨x̂p̂⟩ = (1.05 × 10⁻³³ + 5.27 × 10⁻³⁵ i) J s and ⟨p̂x̂⟩ is its complex conjugate. The imaginary part ħ/2 is fixed by [x̂, p̂] = iħ, so x̂p̂ is not an observable; ½(x̂p̂ + p̂x̂) is.
MediumExample 2
An electron sits in a harmonic trap with ħω = 0.50 eV. In the trap's energy basis, taken as data from a later unit, x̂ and p̂ have nonzero entries only beside the diagonal: X(n, n+1) = X(n+1, n) = b√(n + 1) and P(n+1, n) = −P(n, n+1) = i(ħ/2b)√(n + 1), with b = √(ħ/2mω). Keep three levels, form X₃P₃ − P₃X₃, test it against iħI₃, and find its mean in the normalised states (0.8, 0.6i, 0) and (0.6, 0, 0.8).
View solution →
- Scale: ω = 0.50 eV ÷ ħ = 7.60 × 10¹⁴ s⁻¹, so b = √(ħ/2mω) = 0.276 nm and ħ/2b = 1.91 × 10⁻²⁵ kg m s⁻¹. Then X₃ = b[[0, 1, 0], [1, 0, √2], [0, √2, 0]] and P₃ = i(ħ/2b)[[0, −1, 0], [1, 0, −√2], [0, √2, 0]], both Hermitian.
- Multiply: X₃P₃ = (iħ/2)[[1, 0, −√2], [0, 1, 0], [√2, 0, −2]] and P₃X₃ = (iħ/2)[[−1, 0, −√2], [0, −1, 0], [√2, 0, 2]]. Each b cancels against a 1/b, so the result is the same for every trap.
- Subtract: X₃P₃ − P₃X₃ = iħ diag(1, 1, −2). The off-diagonal ±√2 terms cancel and the first two diagonal entries match iħI₃, but the third is −2iħ where iħ was wanted.
- Trace: 1 + 1 − 2 = 0, as it must be for any commutator, while tr(iħI₃) = 3iħ. The whole shortfall of 3iħ sits in the corner entry, −2iħ against iħ.
- Means: for (0.8, 0.6i, 0), ⟨[X₃, P₃]⟩ = iħ(0.64 + 0.36) = iħ, exactly right. For (0.6, 0, 0.8) it is iħ(0.36 − 2 × 0.64) = −0.92iħ = −9.70 × 10⁻³⁵ i J s, wrong in size and in sign.
- Checks: both states are normalised, 0.64 + 0.36 = 1, and the commutator carries m × kg m s⁻¹ = J s, like ħ. The truncated algebra can be trusted only for states that never reach the last kept level; enlarging N moves the corner up without removing it.
Answer. X₃P₃ − P₃X₃ = iħ diag(1, 1, −2), traceless, for every ω. Its mean is iħ in (0.8, 0.6i, 0) but −0.92iħ = −9.7 × 10⁻³⁵ i J s in (0.6, 0, 0.8).
HardExample 3
An electron is confined to x ≥ 0 by a hard wall at x = 0, so allowed states obey ψ(0) = 0. Decide whether p̂ = −iħ d/dx and the kinetic-energy operator T̂ = −(ħ²/2m) d²/dx² are observables there, by computing each one's Hermiticity boundary term and testing for eigenfunctions. Use κ = 2.0 nm⁻¹ and k = 5.0 nm⁻¹ where numbers are needed.
View solution →
- Boundary term for p̂: ∫f*(p̂g) dx − ∫(p̂f)*g dx over x ≥ 0 equals −iħ∫(f*g)′ dx = iħf*(0)g(0), since both functions vanish at infinity. With the wall condition it is zero, so p̂ passes the Hermiticity test on allowed states.
- Eigenfunctions: −iħψ′ = pψ has only ψ = Ce(ipx/ħ), with |ψ(0)| = |C|. The wall demands ψ(0) = 0, so C = 0: no allowed function is an eigenfunction of p̂ for any p, real or complex. There is no set of definite-momentum states, and nothing for a probability |c|² to refer to.
- Drop the wall condition and it gets worse: ψ = √(2κ)e(−κx) is normalised on x ≥ 0, since 2κ∫e(−2κx) dx = 1, and p̂ψ = iħκψ, an imaginary eigenvalue of 2.11 × 10⁻²⁵ i kg m s⁻¹. The boundary term iħ|ψ(0)|² = 2iħκ = 4.22 × 10⁻²⁵ i kg m s⁻¹ is exactly ⟨p⟩ − ⟨p⟩*, an imaginary part no Hermitian operator allows.
- Boundary term for T̂: two integrations by parts leave (ħ²/2m)[f*(0)g′(0) − f′*(0)g(0)], zero when f(0) = g(0) = 0. Its eigenfunctions sin(kx) vanish at the wall, with the real energy ħ²k²/2m = (1.055 × 10⁻³⁴ J s)² × (5.0 × 10⁹ m⁻¹)² ÷ (2 × 9.109 × 10⁻³¹ kg) = 1.53 × 10⁻¹⁹ J = 0.95 eV.
- Read the state: sin(kx) is an equal mix of the full-line waves e(ikx) and e(−ikx), which the wall reflects into each other. The magnitude ħk = 5.27 × 10⁻²⁵ kg m s⁻¹ is sharp while the direction is not, which is how p̂² can be an observable when p̂ is not.
- Tie to the canonical relation: a Hermitian p̂ with [x̂, p̂] = iħ would generate the shifts ψ(x) → ψ(x − a) for every real a, and a shift to the left pushes probability through the wall. Checks: the p̂ term is in kg m s⁻¹ and the T̂ term in J; let the wall recede to −∞ and p̂ becomes an observable again.
Answer. p̂ is not an observable on x ≥ 0: no allowed function is an eigenfunction, and without the wall condition it has the imaginary eigenvalue 2.1 × 10⁻²⁵ i kg m s⁻¹. T̂ is an observable: sin(kx) gives a real 0.95 eV at k = 5.0 nm⁻¹.
Quick check
Choose an answer, then check it. Explain to yourself why the others fail.
Key takeaway
[x̂, p̂] = iħ is an operator identity, not a measurement.
The relation holds on every differentiable function, whatever the state or potential. Its nonzero constant means x̂ and p̂ share no eigenfunction and no finite matrices obey it. With the Leibniz rule it gives [f(x̂), p̂] = iħf′(x̂). It needs Cartesian x on the whole line; rings and half-lines break it.