Skip to content

Commutators

The commutator

[A,B]≡AB−BA[A,B]\equiv AB-BA

measures the failure of two ordered products to agree. It acts as a derivation, defines the Lie algebra of symmetry generators, controls Heisenberg evolution, and supplies the algebraic input to uncertainty relations.

This page is a calculation table. The canonical Commutators page develops the physical meaning of compatibility and noncommutativity; the Commutators and Anticommutators page develops the linear-algebra structure.

The anticommutator is

{A,B}≡AB+BA.\lbrace A,B\rbrace\equiv AB+BA.

Products are read in the written order, operators act on kets from the right, and the canonical Cartesian convention is

[xi,pj]=iℏδijI,pj=−iℏ∂∂xj[x_i,p_j]=i\hbar\delta_{ij}I, \qquad p_j=-i\hbar\frac{\partial}{\partial x_j}

in the position representation.

The purely algebraic identities below hold in any associative algebra wherever the displayed products exist. For bounded operators on a Hilbert space, this causes no domain problem. For unbounded operators, an equality initially means an equality on a stated common invariant domain or core. Closures, self-adjoint extensions, boundary conditions, and strong commutation may require separate analysis.

Let α\alpha and β\beta be scalars.

IdentityFormulaCondition or use
Self-commutator[A,A]=0[A,A]=0Immediate from the definition
Identity[A,I]=0[A,I]=0II is the multiplicative identity
Antisymmetry[A,B]=−[B,A][A,B]=-[B,A]Reversing order changes the sign
Bilinearity[A,αB+βC]=α[A,B]+β[A,C][A,\alpha B+\beta C]=\alpha[A,B]+\beta[A,C]Also linear in the first slot
Right product rule[A,BC]=[A,B]C+B[A,C][A,BC]=[A,B]C+B[A,C]Commutator as a derivation
Left product rule[AB,C]=A[B,C]+[A,C]B[AB,C]=A[B,C]+[A,C]BPreserve factor order
Jacobi identity[A,[B,C]]+[B,[C,A]]+[C,[A,B]]=0[A,[B,C]]+[B,[C,A]]+[C,[A,B]]=0Lie-algebra consistency
Adjoint[A,B]†=−[A†,B†][A,B]^\dagger=-[A^\dagger,B^\dagger]A commutator of Hermitian operators is anti-Hermitian
Similarity covarianceS[A,B]S−1=[SAS−1,SBS−1]S[A,B]S^{-1}=[SAS^{-1},SBS^{-1}]For invertible SS
Finite tracetr⁡[A,B]=0\operatorname{tr}[A,B]=0Finite matrices, or trace-class products where cyclicity applies

The product rule iterates to

[A,B1B2⋯Bn]=∑r=1nB1⋯Br−1[A,Br]Br+1⋯Bn.[A,B_1B_2\cdots B_n] = \sum_{r=1}^{n} B_1\cdots B_{r-1}[A,B_r]B_{r+1}\cdots B_n.

For a positive integer nn,

[A,Bn]=∑r=0n−1Br[A,B]Bn−1−r,[An,B]=∑r=0n−1Ar[A,B]An−1−r.\begin{aligned} [A,B^n] &= \sum_{r=0}^{n-1} B^r[A,B]B^{n-1-r}, \\ [A^n,B] &= \sum_{r=0}^{n-1} A^r[A,B]A^{n-1-r}. \end{aligned}

If [A,B][A,B] commutes with BB, the first formula reduces to

[A,Bn]=n[A,B]Bn−1.[A,B^n]=n[A,B]B^{n-1}.

If BB is invertible and all products are defined,

[A,B−1]=−B−1[A,B]B−1.[A,B^{-1}] =-B^{-1}[A,B]B^{-1}.

More generally, if [A,B][A,B] commutes with BB and ff has an appropriate power series or functional calculus,

[A,f(B)]=[A,B]f′(B).[A,f(B)]=[A,B]f'(B).

Do not use this derivative rule when [A,B][A,B] fails to commute with BB.

Operators on different tensor factors commute:

[A⊗I,I⊗B]=0.[A\otimes I,I\otimes B]=0.

A useful general identity is

[A⊗B,C⊗D]=12([A,C]⊗{B,D}+{A,C}⊗[B,D]).\begin{aligned} [A\otimes B,C\otimes D] =\frac{1}{2}\Big( &[A,C]\otimes\lbrace B,D\rbrace \\ &+\lbrace A,C\rbrace\otimes[B,D] \Big). \end{aligned}

It is often faster than expanding two many-body product operators entry by entry.

The following entries use one Cartesian degree of freedom unless indices are shown.

IdentityResultAssumptions
Canonical relation[x,p]=iℏI[x,p]=i\hbar ICommon invariant domain
Cartesian components[xi,pj]=iℏδijI[x_i,p_j]=i\hbar\delta_{ij}ICartesian coordinates
Position components[xi,xj]=0[x_i,x_j]=0Standard position representation
Momentum components[pi,pj]=0[p_i,p_j]=0No gauge-covariant momentum substituted
Momentum power[x,pn]=iℏnpn−1[x,p^n]=i\hbar n p^{n-1}Positive integer nn
Position power[xn,p]=iℏnxn−1[x^n,p]=i\hbar n x^{n-1}Positive integer nn
Position function[f(x),p]=iℏf′(x)[f(x),p]=i\hbar f'(x)Sufficiently regular ff
Momentum function[x,g(p)]=iℏg′(p)[x,g(p)]=i\hbar g'(p)Sufficiently regular gg
Reversed position function[p,f(x)]=−iℏf′(x)[p,f(x)]=-i\hbar f'(x)Same convention
Quadratic example[x2,p2]=2iℏ(xp+px)[x^2,p^2]=2i\hbar(xp+px)Common domain for all products

For several Cartesian degrees of freedom,

[f(x),pj]=iℏ ∂jf(x),[xj,g(p)]=iℏ ∂g∂pj.[f(\boldsymbol x),p_j] =i\hbar\,\partial_j f(\boldsymbol x), \qquad [x_j,g(\boldsymbol p)] =i\hbar\,\frac{\partial g}{\partial p_j}.

These identities are exact for suitable polynomials and extend to broader classes only with appropriate domain or functional-calculus hypotheses.

With the active translation operator

T(a)=e−iap/ℏ,T(a)=e^{-iap/\hbar},

the canonical relation gives

[x,T(a)]=aT(a),T†(a)xT(a)=x+aI.[x,T(a)]=aT(a), \qquad T^\dagger(a)xT(a)=x+aI.

This is a useful sign check: T(a)T(a) shifts a localized state toward larger position by aa under the stated convention.

In the Heisenberg picture,

dAHdt=iℏ[HH,AH]+(∂A∂t)H.\frac{dA_H}{dt} =\frac{i}{\hbar}[H_H,A_H] +\left(\frac{\partial A}{\partial t}\right)_H.

For

H=p22m+V(x),H=\frac{p^2}{2m}+V(x),

the relevant commutators are

CommutatorResultHeisenberg equation
[x,H][x,H]iℏp/mi\hbar p/mx˙=p/m\dot x=p/m
[p,H][p,H]−iℏV′(x)-i\hbar V'(x)Use the reversed order with care
[H,x][H,x]−iℏp/m-i\hbar p/mx˙=(i/ℏ)[H,x]=p/m\dot x=(i/\hbar)[H,x]=p/m
[H,p][H,p]iℏV′(x)i\hbar V'(x)p˙=(i/ℏ)[H,p]=−V′(x)\dot p=(i/\hbar)[H,p]=-V'(x)

The two rows for each observable are deliberately redundant: they expose the sign change caused by reversing the commutator.

If AA has no explicit time dependence, [H,A]=0[H,A]=0 implies that its Heisenberg operator and expectation value are constant in time, subject to the domain conditions needed for the evolution.

Use ϵxyz=+1\epsilon_{xyz}=+1.

ObjectsRelationComment
Angular momentum[Ji,Jj]=iℏϵijkJk[J_i,J_j]=i\hbar\epsilon_{ijk}J_kGenerator algebra of rotations
Casimir[J2,Ji]=0[J^2,J_i]=0J2=Jx2+Jy2+Jz2J^2=J_x^2+J_y^2+J_z^2
Ladder with JzJ_z[Jz,J±]=±ℏJ±[J_z,J_\pm]=\pm\hbar J_\pmJ±=Jx±iJyJ_\pm=J_x\pm iJ_y
Ladder pair[J+,J−]=2ℏJz[J_+,J_-]=2\hbar J_zSign follows the ladder definition
Vector operator[Ji,Vj]=iℏϵijkVk[J_i,V_j]=i\hbar\epsilon_{ijk}V_kDefines Cartesian vector transformation
Pauli matrices[σi,σj]=2iϵijkσk[\sigma_i,\sigma_j]=2i\epsilon_{ijk}\sigma_kDimensionless spin-1/21/2 matrices
Spin one-half[Si,Sj]=iℏϵijkSk[S_i,S_j]=i\hbar\epsilon_{ijk}S_kSi=ℏσi/2S_i=\hbar\sigma_i/2

For orbital angular momentum L=x×p\boldsymbol L=\boldsymbol x\times\boldsymbol p, the canonical commutation relations imply the same angular-momentum algebra. The derivation belongs in the canonical Angular Momentum Algebra page.

ObjectsRelation
Ladder pair[a,a†]=I[a,a^\dagger]=I
Number and lowering[N,a]=−a[N,a]=-a
Number and raising[N,a†]=a†[N,a^\dagger]=a^\dagger
Number definitionN=a†aN=a^\dagger a
Hamiltonian and lowering[H,a]=−ℏωa[H,a]=-\hbar\omega a
Hamiltonian and raising[H,a†]=ℏωa†[H,a^\dagger]=\hbar\omega a^\dagger

Here

H=ℏω(N+12I).H=\hbar\omega\left(N+\frac12 I\right).

The relations show directly that aa and a†a^\dagger lower and raise energy by ℏω\hbar\omega, provided the resulting state is nonzero and lies in the relevant domain.

For independent bosonic modes,

[ar,as†]=δrsI,[ar,as]=[ar†,as†]=0.[a_r,a_s^\dagger]=\delta_{rs}I, \qquad [a_r,a_s]=[a_r^\dagger,a_s^\dagger]=0.

Fermionic modes instead obey canonical anticommutation relations:

{cr,cs†}=δrsI,{cr,cs}={cr†,cs†}=0.\lbrace c_r,c_s^\dagger\rbrace=\delta_{rs}I, \qquad \lbrace c_r,c_s\rbrace =\lbrace c_r^\dagger,c_s^\dagger\rbrace=0.

Replacing the fermionic anticommutators by commutators changes the algebra and is not a harmless notation choice.

Define

ad⁡A(B)≡[A,B],ad⁡A0(B)≡B.\operatorname{ad}_A(B)\equiv[A,B], \qquad \operatorname{ad}_A^0(B)\equiv B.

The Hadamard lemma is

eABe−A=∑n=0∞1n!ad⁡An(B),e^A B e^{-A} = \sum_{n=0}^{\infty} \frac{1}{n!}\operatorname{ad}_A^n(B),

when the series converges or when it is used as a controlled formal expansion. If the nested commutators terminate, the expression is finite.

An exact integral identity useful when [A,B][A,B] is not central is

[A,eB]=∫01esB[A,B]e(1−s)B ds.[A,e^B] = \int_0^1 e^{sB}[A,B]e^{(1-s)B}\,ds.

If [A,B][A,B] commutes with BB, this reduces to

[A,eB]=[A,B]eB.[A,e^B]=[A,B]e^B.

The Baker–Campbell–Hausdorff expansion begins

log⁡(eAeB)=  A+B+12[A,B]+112[A,[A,B]]+112[B,[B,A]]+⋯ .\begin{aligned} \log(e^Ae^B) =\;&A+B+\frac12[A,B] \\ &+\frac{1}{12}[A,[A,B]] +\frac{1}{12}[B,[B,A]] +\cdots. \end{aligned}

When [A,B][A,B] commutes with both AA and BB, all displayed nested commutators vanish and

eAeB=eA+B+12[A,B].e^Ae^B =e^{A+B+\frac12[A,B]}.

The central-commutator condition is essential. Applying this truncated formula to generic matrices gives a wrong result.

For unbounded operators, ABψAB\psi exists only if

ψ∈D(B)andBψ∈D(A).\psi\in\mathcal D(B) \quad\text{and}\quad B\psi\in\mathcal D(A).

Thus [A,B]ψ[A,B]\psi requires both ABψAB\psi and BAψBA\psi. A formal differential calculation commonly establishes an identity first on a dense invariant core, such as a suitable smooth rapidly decreasing domain. Whether the identity extends to self-adjoint closures is a separate question.

Two useful warnings follow:

  1. In finite dimensions, commuting Hermitian matrices admit a simultaneous orthonormal eigenbasis. For unbounded self-adjoint operators, vanishing of a formal commutator on a small domain need not imply that their spectral projections commute. The stronger spectral condition is called strong commutation.
  2. No finite-dimensional matrices can satisfy the exact canonical relation. If the dimension is dd, cyclicity gives
tr⁡[X,P]=0,\operatorname{tr}[X,P]=0,

whereas

tr⁡(iℏI)=iℏd≠0.\operatorname{tr}(i\hbar I)=i\hbar d\ne0.

Finite matrix approximations therefore modify the canonical commutator, typically near a truncation boundary.

  1. Fix the order of the requested commutator before substituting identities.
  2. Expand products with the derivation rule while preserving factor order.
  3. Use a simplified derivative formula only after checking that the basic commutator is central or commutes with the relevant operator.
  4. For unbounded operators, identify a common domain or state the calculation as formal.
  5. Check signs by swapping the order, taking an adjoint, or acting in a concrete representation.
  6. For symmetry algebras, verify at least one cyclic case and the Jacobi identity.
  • Writing [A,BC]=[A,B][A,C][A,BC]=[A,B][A,C] instead of using the product rule.
  • Reordering factors after expanding a commutator.
  • Forgetting the sign change between [A,B][A,B] and [B,A][B,A].
  • Using [A,f(B)]=[A,B]f′(B)[A,f(B)]=[A,B]f'(B) without checking the centrality condition.
  • Confusing the commutator of Pauli matrices with that of physical spin operators and losing a factor of ℏ/2\hbar/2.
  • Replacing fermionic anticommutators by commutators.
  • Applying the short Baker–Campbell–Hausdorff formula when nested commutators do not vanish.
  • Claiming that finite matrices obey [X,P]=iℏI[X,P]=i\hbar I exactly.
  • Inferring simultaneous spectral measurements from a merely formal commutator calculation.
  • Ignoring boundary terms when differential operators act on domains with boundaries.

Every algebraic row follows from associativity and the defining commutator. Standard quantum rows can be checked independently in the position representation, a finite spin representation, or the number-state basis. For an audit:

  1. expand each product identity directly;
  2. verify the canonical derivative identities on a smooth test function;
  3. derive one angular-momentum cyclic relation;
  4. apply oscillator commutators to ∣n⟩\lvert n\rangle;
  5. compare an exponential identity through second order in its parameters.

Last reviewed: 2026-08-19.

Use only the product rule and [x,p]=iℏI[x,p]=i\hbar I to calculate [x,p2][x,p^2].

Solution

The right product rule gives

[x,p2]=[x,p]p+p[x,p]=iℏp+p iℏ=2iℏp.\begin{aligned} [x,p^2] &=[x,p]p+p[x,p] \\ &=i\hbar p+p\,i\hbar \\ &=2i\hbar p. \end{aligned}

The scalar iℏi\hbar commutes with pp.

For H=p2/(2m)+V(x)H=p^2/(2m)+V(x), derive both [p,H][p,H] and [H,p][H,p], then recover the Heisenberg equation for p˙\dot p.

Solution

Because pp commutes with p2p^2,

[p,H]=[p,V(x)]=−iℏV′(x).[p,H]=[p,V(x)]=-i\hbar V'(x).

Antisymmetry then gives

[H,p]=iℏV′(x).[H,p]=i\hbar V'(x).

The Heisenberg equation uses the second ordering:

p˙=iℏ[H,p]=iℏ iℏV′(x)=−V′(x).\dot p =\frac{i}{\hbar}[H,p] =\frac{i}{\hbar}\,i\hbar V'(x) =-V'(x).

This is the operator form of force equals minus the potential gradient.

Exercise 3: Why truncation changes the canonical relation

Section titled “Exercise 3: Why truncation changes the canonical relation”

Suppose XX and PP are d×dd\times d matrices. Prove that they cannot satisfy [X,P]=iℏId[X,P]=i\hbar I_d exactly. What does this imply for a numerical oscillator basis truncated to finitely many states?

Solution

Cyclicity of the finite-dimensional trace gives

tr⁡[X,P]=tr⁡(XP)−tr⁡(PX)=0.\operatorname{tr}[X,P] =\operatorname{tr}(XP)-\operatorname{tr}(PX) =0.

If the canonical relation held exactly, the same trace would equal

tr⁡(iℏId)=iℏd,\operatorname{tr}(i\hbar I_d)=i\hbar d,

which is nonzero for ℏ≠0\hbar\ne0 and d>0d>0. This contradiction proves the claim. A finite oscillator truncation can reproduce the canonical relation well on low-lying states, but it must contain a compensating boundary correction, usually concentrated near the highest retained basis state.

  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  • J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020.
  • B. C. Hall, Quantum Theory for Mathematicians, Springer, 2013.
  • M. Reed and B. Simon, Methods of Modern Mathematical Physics I: Functional Analysis, revised and enlarged ed., Academic Press, 1980.
  • R. Gilmore, Lie Groups, Physics, and Geometry, Cambridge University Press, 2008.