Back to the on-screen lesson ·

Commutators and the generalized uncertainty principle

Commutators, compatible observables, the bound $\sigma_A\sigma_B \ge \tfrac{1}{2}|\langle[A, B]\rangle|$, the energy–time relation and Ehrenfest's theorem.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to compute commutators, decide which observables are compatible, apply the generalized uncertainty principle, and use the energy–time relation to find linewidths.

2. What you already have

You know the Heisenberg relation $\sigma_x\sigma_p \ge \hbar/2$, the momentum operator $-i\hbar\,d/dx$, and from the last two lessons that observables are Hermitian operators and measurements collapse states onto their eigenvectors. You multiplied matrices in linear algebra and know that $AB$ and $BA$ can differ. This lesson shows that this difference is the source of every uncertainty relation.

3. Words for this lesson

TermWhat it means
Commutator$[\hat{A}, \hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A}$.
Canonical commutation relation$[\hat{x}, \hat{p}] = i\hbar$, the defining relation of quantum mechanics.
Compatible observablesObservables whose operators commute; they share eigenvectors and can be sharp together.
Generalized uncertainty principle$\sigma_A\sigma_B \ge \tfrac{1}{2}\vert \langle[\hat{A}, \hat{B}]\rangle\vert $.
Complete set of commuting observablesA set of compatible observables whose eigenvalues together label each state uniquely.
Ehrenfest's theorem$d\langle Q\rangle/dt = \tfrac{i}{\hbar}\langle[\hat{H}, \hat{Q}]\rangle + \langle\partial\hat{Q}/\partial t\rangle$.
Natural linewidthThe spread of a transition's frequency, $1/(2\pi\tau)$, set by the excited state's lifetime.

4. The commutator decides what can be known together

Two operators need not give the same result in either order. Their difference is the commutator, $[\hat{A}, \hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A}$. The most important one is found by acting on any function $f$:

$$[\hat{x}, \hat{p}]f = -i\hbar\left(x\frac{df}{dx} - \frac{d(xf)}{dx}\right) = i\hbar f, \qquad [\hat{x}, \hat{p}] = i\hbar.$$

If two operators commute, they share a complete set of eigenvectors, and a state can be sharp in both at once: they are compatible. If not, there is a trade-off. For any two observables and any state, the generalized uncertainty principle says

$$\sigma_A\sigma_B \ge \left|\frac{1}{2i}\langle[\hat{A}, \hat{B}]\rangle\right|.$$

With $x$ and $p$, the commutator is the constant $i\hbar$, so the bound is $\hbar/2$ in every state: Heisenberg's relation. With spin components, $[\hat{S}_x, \hat{S}_y] = i\hbar\hat{S}_z$, the bound depends on the state.

Commutators with the Hamiltonian also govern time. Ehrenfest's theorem says $d\langle Q\rangle/dt = (i/\hbar)\langle[\hat{H}, \hat{Q}]\rangle$ for an operator with no explicit time dependence, so anything that commutes with $\hat{H}$ is conserved. Applied to $x$ and $p$, it gives $d\langle p\rangle/dt = -\langle dV/dx\rangle$: Newton's second law, for averages.

Another way: picture

Picture two sets of perpendicular axes in the same plane. If they coincide, an arrow can lie exactly along an axis of both, and both questions have sharp answers. If one set is rotated relative to the other, any arrow along an axis of the first lies between the axes of the second, so its answer there is uncertain. The commutator measures how far the axes are rotated, and the uncertainty principle turns that angle into a bound on the spreads.

Another way: steps

  1. Compute the commutator: for matrices, $AB - BA$; for differential operators, act on a test function $f$.
  2. Use the rules $[A, B] = -[B, A]$ and $[AB, C] = A[B, C] + [A, C]B$ to reduce to known ones.
  3. Zero commutator: compatible, both can be sharp.
  4. Otherwise: $\sigma_A\sigma_B \ge \tfrac{1}{2}|\langle[A, B]\rangle|$.
  5. Conservation: $[\hat{H}, \hat{Q}] = 0$ means $\langle Q\rangle$ is constant.

5. The method, step by step, and how to check it

  1. Matrices. Multiply both ways and subtract. A diagonal matrix commutes with another matrix only if that matrix is diagonal too, or the diagonal entries are equal.
  2. Differential operators. Always act on a test function $f(x)$, apply the product rule, and drop $f$ at the end. Forgetting the test function is the most common source of lost terms.
  3. Algebra. Build complicated commutators from $[\hat{x}, \hat{p}] = i\hbar$ using linearity and the product rule. For instance $[\hat{x}, \hat{p}^n] = i\hbar n\hat{p}^{n-1}$, and more generally $[f(\hat{x}), \hat{p}] = i\hbar f'(\hat{x})$.
  4. Bound. Evaluate $\langle[A, B]\rangle$ in the state and halve its magnitude.

Checks. A commutator of two Hermitian operators is anti-Hermitian, so it is $i$ times a Hermitian operator: a real number times $i$ for the canonical pair. Swapping the order flips its sign. And any operator commutes with itself and with any function of itself.

6. Why commuting operators share eigenvectors

Let $\hat{A}f = af$ with $a$ nondegenerate, and suppose $[\hat{A}, \hat{B}] = 0$. Then $\hat{A}(\hat{B}f) = \hat{B}(\hat{A}f) = a(\hat{B}f)$, so $\hat{B}f$ is also an eigenvector of $\hat{A}$ with eigenvalue $a$. Since that eigenvalue has only one eigenvector, $\hat{B}f$ must be a multiple of $f$: $f$ is an eigenvector of $\hat{B}$ too. With degeneracy the argument works within each degenerate subspace, where the eigenvectors of $\hat{B}$ can be chosen as a basis.

So compatible observables can be measured in any order without disturbing each other: after measuring $A$, the state is an eigenvector of $B$ as well, and measuring $B$ leaves it alone. This is how states get their labels. For hydrogen, $\hat{H}$, $\hat{L}^2$ and $\hat{L}_z$ all commute, and the quantum numbers $n$, $l$ and $m$ are their eigenvalues; together they form a complete set of commuting observables.

7. Where the generalized uncertainty principle comes from

Define $|f\rangle = (\hat{A} - \langle A\rangle)|\Psi\rangle$ and $|g\rangle = (\hat{B} - \langle B\rangle)|\Psi\rangle$. Then $\sigma_A^2 = \langle f|f\rangle$ and $\sigma_B^2 = \langle g|g\rangle$. The Schwarz inequality, $\langle f|f\rangle\langle g|g\rangle \ge |\langle f|g\rangle|^2$, is just the statement that a cosine cannot exceed one. Any complex number's magnitude is at least that of its imaginary part, and the imaginary part of $\langle f|g\rangle$ works out to $\langle[\hat{A}, \hat{B}]\rangle/2i$. Putting it together gives the bound.

The derivation shows that the bound is about the state, not about the act of measuring. It says that no state has both spreads small, whatever instruments are used. The equality case, $|g\rangle$ proportional to $i|f\rangle$, gives the minimum-uncertainty states; for $x$ and $p$ these are exactly the Gaussians.

8. Energy and time

Time is not an operator in quantum mechanics, so the energy–time relation is different in character. Using Ehrenfest's theorem, define $\Delta t = \sigma_Q/|d\langle Q\rangle/dt|$, the time for the average of some observable to change by one standard deviation. The generalized principle with $\hat{H}$ and $\hat{Q}$ then gives

$$\sigma_E\,\Delta t \ge \frac{\hbar}{2}.$$

A stationary state has $\sigma_E = 0$ and nothing about it ever changes, consistent with $\Delta t = \infty$. An excited atom that decays in a time $\tau$ cannot have a perfectly sharp energy: its spectral line has a width of order $\hbar/\tau$ in energy, or $1/(2\pi\tau)$ in frequency. The shortest-lived particles, such as the Z boson, are identified by exactly this: its mass distribution has a width of $2.5$ GeV, implying a lifetime near $3 \times 10^{-25}$ s, far too short to measure directly.

9. Ehrenfest's theorem and the classical limit

Applying $d\langle Q\rangle/dt = (i/\hbar)\langle[\hat{H}, \hat{Q}]\rangle$ with $\hat{H} = \hat{p}^2/2m + V(\hat{x})$ gives two equations:

$$\frac{d\langle x\rangle}{dt} = \frac{\langle p\rangle}{m}, \qquad \frac{d\langle p\rangle}{dt} = -\left\langle\frac{dV}{dx}\right\rangle.$$

They look like Newton's laws, but the force is averaged over the wave packet, which is not the same as the force at the average position. For a harmonic oscillator, where $dV/dx$ is linear in $x$, the two agree exactly, and the center of any packet oscillates classically. For other potentials they agree only when the packet is narrow compared with the distance over which the force changes, which is the condition for classical mechanics to work.

The theorem also gives conservation laws: if $\hat{Q}$ commutes with $\hat{H}$, its average and all its probabilities are constant. Momentum is conserved for a free particle, and angular momentum for any central potential.

10. Commutators and symmetry

A commutator with the Hamiltonian is a test for symmetry. If rotating a system about the $z$ axis leaves its Hamiltonian unchanged, then $\hat{L}_z$, the generator of those rotations, commutes with $\hat{H}$, and angular momentum about $z$ is conserved. If shifting the system along $x$ leaves $\hat{H}$ unchanged, $\hat{p}_x$ commutes with it and linear momentum is conserved. This is the quantum form of Emmy Noether's theorem: every continuous symmetry gives a conserved quantity.

Symmetries also explain degeneracies. When two operators each commute with $\hat{H}$ but not with each other, as $\hat{L}_x$ and $\hat{L}_z$ do for a central potential, the energy levels must be degenerate, because one operator can move a state to a different eigenvector of the other without changing its energy. The $(2l + 1)$-fold degeneracy of each angular momentum level in any spherically symmetric atom comes from exactly this, and a magnetic field, which breaks the symmetry, splits the levels apart — the Zeeman effect met later in the course.

11. In the world: laser cooling and natural linewidths

Laser cooling, recognized with the 1997 Nobel Prize for Steven Chu, Claude Cohen-Tannoudji and William Phillips, slows atoms by having them absorb photons from a laser tuned slightly below a transition frequency. Each atom can only absorb light within the transition's natural linewidth, set by the energy–time relation: the excited state of sodium lives $16$ ns, so its line is $1/(2\pi \times 16\ \text{ns}) = 9.8$ MHz wide, a few parts in $10^8$ of the $509$ THz transition frequency.

That width decides nearly everything about the cooling. The laser must be stabilized to well within it, and the lowest temperature reachable by simple Doppler cooling is $k_BT = \hbar\Gamma/2$, where $\Gamma = 1/\tau$: about $240$ μK for sodium. Atomic clocks exploit the other extreme. The strontium lattice clocks at JILA in Boulder use a transition whose upper state lives about $150$ seconds, giving a natural linewidth of about a millihertz and a clock that would lose less than a second over the age of the universe.

12. In the world: squeezed light at gravitational-wave detectors

The LIGO detectors measure changes in the length of their $4$ km arms smaller than a ten-thousandth of a proton's width. At that level the quantum fluctuations of the laser light itself limit the measurement. Light's two quadratures — roughly, its amplitude and phase — are represented by operators that do not commute, so their spreads obey an uncertainty relation just like $x$ and $p$.

The bound fixes only the product of the spreads, not each one. Since 2019, LIGO has injected squeezed light, in which the phase fluctuations are reduced below the ordinary vacuum level at the cost of larger amplitude fluctuations. Because the detector's sensitivity at high frequencies depends mostly on phase, this improved it by a factor of about $1.5$ to $2$ in noise, increasing the number of detectable merging black holes and neutron stars by tens of percent. It is a practical use of the generalized uncertainty principle: the commutator cannot be beaten, but its cost can be moved to where it does no harm.

13. Uncertainty is not caused by clumsy instruments

Heisenberg's first explanation, a microscope whose photons kick the electron, suggested that uncertainty comes from measurement disturbance and might be reduced with gentler instruments. The generalized principle shows otherwise. It is derived for the state alone, with no measuring device in the argument: no state has $\sigma_x\sigma_p$ below $\hbar/2$, just as no chord of a circle is longer than its diameter.

A second misconception is that every pair of observables trades off. Only noncommuting pairs do. Position along $x$ and momentum along $y$ commute and can both be sharp; energy and angular momentum in hydrogen commute, which is why each state has definite values of both. And for pairs like spin components, the bound depends on the state and can be zero.

14. The canonical commutator and its consequences

  1. Act with $\hat{x}\hat{p}$ on a test function.

    $\hat{x}\hat{p}f = -i\hbar x\dfrac{df}{dx}$

    Apply $\hat{p}$ first, then multiply by $x$.

  2. Act with $\hat{p}\hat{x}$ on the same function.

    $\hat{p}\hat{x}f = -i\hbar\dfrac{d(xf)}{dx} = -i\hbar\left(f + x\dfrac{df}{dx}\right)$

    The product rule produces an extra term.

  3. Subtract the two results.

    $[\hat{x}, \hat{p}]f = i\hbar f$

    The derivative terms cancel.

  4. Drop the test function.

    $[\hat{x}, \hat{p}] = i\hbar$

    True for every $f$, so it is an operator identity.

  5. Find the uncertainty bound it implies.

    $\sigma_x\sigma_p \ge \dfrac{1}{2}|i\hbar| = \dfrac{\hbar}{2}$

    The same in every state, because the commutator is a constant.

15. Commutators by algebra

  1. State the product rule for commutators.

    $[\hat{A}, \hat{B}\hat{C}] = \hat{B}[\hat{A}, \hat{C}] + [\hat{A}, \hat{B}]\hat{C}$

    Expand both sides to check: the extra terms cancel.

  2. Apply it to $[\hat{x}, \hat{p}^2]$.

    $[\hat{x}, \hat{p}^2] = \hat{p}[\hat{x}, \hat{p}] + [\hat{x}, \hat{p}]\hat{p}$

    With $\hat{B} = \hat{C} = \hat{p}$.

  3. Substitute the canonical commutator.

    $[\hat{x}, \hat{p}^2] = 2i\hbar\hat{p}$

    A constant commutes with everything.

  4. Commute position with the Hamiltonian.

    $[\hat{H}, \hat{x}] = \dfrac{1}{2m}[\hat{p}^2, \hat{x}] = -\dfrac{i\hbar}{m}\hat{p}$

    $V(\hat{x})$ commutes with $\hat{x}$.

  5. Apply Ehrenfest's theorem.

    $\dfrac{d\langle x\rangle}{dt} = \dfrac{i}{\hbar}\left(-\dfrac{i\hbar}{m}\langle p\rangle\right) = \dfrac{\langle p\rangle}{m}$

    Velocity is momentum over mass, on average.

  6. Check it for a stationary state.

    $\dfrac{d\langle x\rangle}{dt} = 0 \quad\Rightarrow\quad \langle p\rangle = 0$

    Any stationary state has zero average momentum.

16. A state-dependent bound for spin

  1. Write the spin matrices along $x$ and $y$.

    $S_x = \dfrac{\hbar}{2}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad S_y = \dfrac{\hbar}{2}\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}$

    Half of $\hbar$ times the Pauli matrices.

  2. Multiply them in the first order.

    $S_xS_y = \dfrac{\hbar^2}{4}\begin{pmatrix} i & 0 \\ 0 & -i \end{pmatrix}$

    Row times column.

  3. Multiply them in the other order.

    $S_yS_x = \dfrac{\hbar^2}{4}\begin{pmatrix} -i & 0 \\ 0 & i \end{pmatrix}$

    The signs flip.

  4. Subtract to get the commutator.

    $[S_x, S_y] = \dfrac{\hbar^2}{2}\begin{pmatrix} i & 0 \\ 0 & -i \end{pmatrix} = i\hbar S_z$

    With $S_z = \tfrac{\hbar}{2}\,\text{diag}(1, -1)$.

  5. Take the state spin-up along $z$.

    $\chi = \begin{pmatrix} 1 \\ 0 \end{pmatrix}: \quad \langle S_z\rangle = \dfrac{\hbar}{2}$

    An eigenstate of $S_z$.

  6. Find the bound in this state.

    $\sigma_{S_x}\sigma_{S_y} \ge \dfrac{\hbar}{2} \cdot \dfrac{\hbar}{2} = \dfrac{\hbar^2}{4}$

    The largest possible bound for spin one-half.

  7. Compute the actual spreads.

    $\langle S_x\rangle = \langle S_y\rangle = 0, \quad \langle S_x^2\rangle = \langle S_y^2\rangle = \dfrac{\hbar^2}{4} \quad\Rightarrow\quad \sigma_{S_x}\sigma_{S_y} = \dfrac{\hbar^2}{4}$

    The bound is met exactly.

  8. Compare with a state along $x$.

    $\chi = \tfrac{1}{\sqrt{2}}(1, 1): \quad \langle S_z\rangle = 0, \quad \sigma_{S_x} = 0$

    The bound drops to zero, and $S_x$ becomes sharp.

17. Your turn: an electron is confined with $\sigma_x = 0.1$ nm. What is the smallest possible spread in its momentum?

  1. Write the uncertainty bound.

    $\sigma_p \ge \dfrac{\hbar}{2\sigma_x}$

    From $[\hat{x}, \hat{p}] = i\hbar$.

  2. Substitute the values.

    $\sigma_p \ge \dfrac{1.0546 \times 10^{-34}}{2 \times 10^{-10}}$

    The spread in meters.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Evaluate the bound.

18. Guided practice

Which pair of observables of a single particle can both have sharp values at the same time?

19. Guided practice

Complete the worked solution: for $A = \begin{pmatrix} 7 & 0 \\ 0 & 2 \end{pmatrix}$ and $B = \begin{pmatrix} 0 & 2 \\ 2 & 0 \end{pmatrix}$, find the top-right entry of $[A, B]$.

  1. Find the top-right entry of the product $AB$.

    $(AB)_{12} = 7 \times 2 =$ p

    Row one of $A$ times column two of $B$.

  2. Find the top-right entry of the product $BA$.

    $(BA)_{12} = 2 \times 2 =$ q

    Row one of $B$ times column two of $A$.

  3. Subtract the second product from the first.

    $[A, B]_{12} =$ r

    Nonzero, so the two observables are incompatible.

20. Guided practice

Match each commutator to its value.

$i\hbar$$2i\hbar\hat{p}$$2i\hbar\hat{x}$$0$
$[\hat{x}, \hat{p}]$
$[\hat{x}, \hat{p}^2]$
$[\hat{x}^2, \hat{p}]$
$[\hat{H}, \hat{H}]$

21. Practice

Let $A = \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix}$. Fill in the entries of $[A, B] = AB - BA$.

column 1column 2
row 1
row 2

22. Practice

An electron is localized with position spread $\sigma_x = 0.5$ nm. What is the smallest possible spread in its velocity, in km/s? Use $\hbar/2m = 5.789 \times 10^{-5}$ m²/s.

Answer: km/s

23. Practice

A spin-½ particle is in the state $\chi = \tfrac{1}{25}\begin{pmatrix} 7 \\ 24 \end{pmatrix}$. Use $[\hat{S}_x, \hat{S}_y] = i\hbar\hat{S}_z$ to find the lower bound on $\sigma_{S_x}\sigma_{S_y}$, in units of $\hbar^2$.

Answer: ħ²

24. Somewhere new

Laser cooling of potassium atoms uses a transition whose excited state lives $\tau = 26.37$ ns before emitting a photon. How wide in frequency is the absorption line, in MHz?

Answer: MHz

25. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

26. Test question

Let $A = \begin{pmatrix} 5 & 0 \\ 0 & 3 \end{pmatrix}$ and $B = \begin{pmatrix} 0 & 3 \\ 1 & 0 \end{pmatrix}$. Fill in the entries of $[A, B] = AB - BA$.

column 1column 2
row 1
row 2

27. What you can do now

You can use commutators to decide what can be known together. Explain to someone why position along $x$ and momentum along $y$ can both be sharp.

Working for the steps left to you

17. Your turn: an electron is confined with $\sigma_x = 0.1$ nm. What is the smallest possible spread in its momentum?, step 3

$\sigma_p \ge 5.27 \times 10^{-25}\ \text{kg m/s}$

A velocity spread of about $580$ km/s for an electron.