Solution (source code)

= Solution

For <observables> $A,B$, nonzero $[A,B]$ obstructs a complete common <eigenbasis>. In a finite-dimensional system, commuting <Hermitian operators> can be simultaneously diagonalized; <quantum degeneracy> may require choosing an appropriate basis inside the degenerate <eigenspace>. Noncommuting <observables> can still share particular <eigenvectors>, so incompatibility is not a claim that every individual state must have nonzero spreads in both quantities.

The <Robertson uncertainty relation> follows by applying <Cauchy-Schwarz inequality> to $(A-\langle A\rangle)|\psi\rangle$ and $(B-\langle B\rangle)|\psi\rangle$:
$$
\boxed{\Delta A\,\Delta B\geq\frac12|\langle[A,B]\rangle|}.
$$
In particular $[x,p_x]=i\hbar$ gives $\Delta x\,\Delta p_x\geq\hbar/2$. These are preparation spreads, not necessarily <measurement errors>. A zero <commutator> expectation can make this bound zero even when the <linear operators> do not commute.

Measurement order can matter: preparing $|+z\rangle$, measuring $S_x$, then measuring $S_z$ gives both z outcomes with <probability> $1/2$ when the intermediate result is ignored. A direct z measurement would give $+\hbar/2$ certainly. Finally the <Heisenberg equation of motion> $dA/dt=(i/\hbar)[H,A]+\partial A/\partial t$ relates commutation to conservation: an <observable> with no explicit time dependence and $[H,A]=0$ is conserved. For <unbounded self-adjoint operators> these statements require the appropriate common domains; a formal commutator calculation alone need not justify simultaneous spectral measurements.