For two matrices $A$ and $B$ it is well known that they do not in general commute, that is
$$AB\neq BA$$
The commutator of $A$ and $B$ measures the extent to which $A$ and $B$ fail to commute and is defined by
$$[A, B]= AB\mathbin{-}BA$$
Where the expression $[A,B]$ simply means “the commutator of A and B”. We see immediately that
$$[A,A]=0$$
$$[B,A]=\mathbin{-}[A,B]$$
$A$ and $B$ are not necessarily matrices, they can also be operators. An operator is an instruction to do something on what follows. For example, $\frac{\partial}{\partial x}$ may be regarded as an operator that tells you to take the partial derivative with respect to $x$ of whatever follows on the right of the operator. Similarly $x$ may be regarded as an operator that instructs you to multiply whatever follows on the right by the variable $x$. So we can already list six operators: $x, y, z, \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z}$. Let us now find the commutator of $\frac{\partial}{\partial x}$ and $x$.
$$\left[\frac{\partial}{\partial x}, x\right]=\frac{\partial}{\partial x}x\mathbin{-}x\frac{\partial}{\partial x}$$
If you are seeing this for this first time you might think the first term is $\frac{\partial x}{\partial x}=1$ but that’s not correct. To make sense of the commutator equation we must think of it as an operator equation and give it a dummy function $f$ to act on.
$$\left[\frac{\partial}{\partial x}, x\right]f=\frac{\partial}{\partial x}xf\mathbin{-}x\frac{\partial}{\partial x}f$$
In the first term $x$ operates on $f$ then $\frac{\partial}{\partial x}$ operates on the resulting product $xf$. Hence we must use the product rule from elementary calculus.
$$\left[\frac{\partial}{\partial x},x\right]f=\left(f\frac{\partial x}{\partial x}+x\frac{\partial f}{\partial x}\right)\mathbin{-}x\frac{\partial}{\partial x}f=f$$
Now dropping the dummy function $f$ we have
$$\left[\frac{\partial}{\partial x}, x\right]=1$$
we have equivalent expressions for $y$ and $z$ so we may write
$$\left[\frac{\partial}{\partial x},x\right]=\left[\frac{\partial}{\partial y},y\right]=\left[\frac{\partial}{\partial z},z\right]=1$$
What about other commutators we can form from the set $\{x, y, z, \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z}\}$. Well since anything commutes by itself we have
$$\left[\frac{\partial}{\partial x},\frac{\partial}{\partial x}\right]=0$$
And by Clairaut’s Theorem on the equality of mixed partial derivatives we have
$$\left[\frac{\partial}{\partial x},\frac{\partial}{\partial y}\right]=\frac{\partial}{\partial x}\frac{\partial}{\partial y}\mathbin{-}\frac{\partial}{\partial y}\frac{\partial}{\partial x}=\frac{\partial^2}{\partial x\partial y}\mathbin{-}\frac{\partial^2}{\partial y\partial x}=0$$
In fact every other commutator from the set above is zero. It is now time to develop five theorems about commutators that will later come in handy:
Theorem (i)
$$[A+B,C+D]=[A,C]+[A,D]+[B,C]+[B,D]$$
Proof:
$$[A+B,C+D]=(A+B)(C+D)\mathbin{-}(C+D)(A+B)=(AC\mathbin{-}CA)+(AD\mathbin{-}DA)+(BC\mathbin{-}CB)+(BD\mathbin{-}DB)=[A,C]+[A,D]+[B,C]+[B,D]$$
Theorem (ii)
$$[A,BC]=B[A,C]+[A,B]C$$
Proof:
$$[A,BC]=ABC\mathbin{-}BAC+BAC\mathbin{-}BCA=(AB\mathbin{-}BA)C+B(AC\mathbin{-}CA)=B[A,C]+[A,B]C$$
Theorem (iii)
$$[AB,C]=A[B,C]+[A,C]B$$
Proof:
$$[A,BC]=ABC\mathbin{-}BAC+BAC\mathbin{-}BCA=(AB\mathbin{-}BA)C+B(AC\mathbin{-}CA)=B[A,C]+[A,B]C$$
The commutator [AB,CD] has two related expressions that it simplifies to. These are explored in Theorems (iv) and (v)
Theorem (iv)
$$[AB,CD]=A[B,C]D+CA[B,D]+[A,C]BD+C[A,D]B$$
Proof:
Left as an exercise, simply use Theorem (ii) followed by Theorem (iii)
Theorem (v)
$$[AB,CD]=A[B,C]D+AC[B,D]+[A,C]DB+C[A,D]B$$
Proof:
Also left as an exercise, simply use Theorem (iii) followed by Theorem (ii)
Having developed our mathematical toolbox its now time to turn to physics. As you know angular momentum comes is various forms: orbital angular momentum $\mathbf{L}$ (think of earth’s annual revolution about the sun), spin angular momentum $\mathbf{S}$ (think of earth’s daily rotation on its axis). To get the total angular momentum $\mathbf{J}$ we perform vector addition:
$$\mathbf{J}=\mathbf{S}+\mathbf{L}$$
Les us now look at orbital angular momentum in more detail. Classically it is defined as the moment of the momentum $\mathbf{p}=m\mathbf{v}$ about the point the object revolves around. Thus
$$\mathbf{L}=\mathbf{r}\times\mathbf{p}$$
Now to convert this classical formula to its quantum analogue we use Heisenberg’s prescription
$$\mathbf{r}\rightarrow\mathbf{r}$$
$$\mathbf{p}\rightarrow\mathbin{-}i\hbar\mathbf{\nabla}$$
From now on we will drop the pesky $\mathbin{-}i\hbar$ factor and later put it back in at the end. Thus in quantum mechanics we write orbital angular momentum as
$$\mathbf{L}=\mathbf{r}\times\mathbf\nabla=(x\mathbf{i}+y\mathbf{j}+z\mathbf{k})\times\left(\frac{\partial}{\partial x}\mathbf{i}+\frac{\partial}{\partial y}\mathbf{j}+\frac{\partial}{\partial z}\mathbf{k}\right)$$
Let us now evaluate the cross product as a determinant
$$\mathbf{L}=\begin{vmatrix}\mathbf{i}&\mathbf{j}&\mathbf{k}\\x&y&z\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}&\frac{\partial}{\partial z}\end{vmatrix}=\left(y\frac{\partial}{\partial z}\mathbin{-}z\frac{\partial}{\partial y}\right)\mathbf{i}+\left(z\frac{\partial}{\partial x}\mathbin{-}x\frac{\partial}{\partial z}\right)\mathbf{j}+\left(x\frac{\partial}{\partial y}\mathbin{-}y\frac{\partial}{\partial x}\right)\mathbf{k}$$
Or in component form
$$L_x=y\frac{\partial}{\partial z}\mathbin{-}z\frac{\partial}{\partial y}$$
$$L_y=z\frac{\partial}{\partial x}\mathbin{-}x\frac{\partial}{\partial z}$$
$$L_z=x\frac{\partial}{\partial y}\mathbin{-}y\frac{\partial}{\partial x}$$
Les us now find the commutator of $L_x$ and $L_y$
$$[L_x,L_y]=\left[y\frac{\partial}{\partial z}\mathbin{-}z\frac{\partial}{\partial y},z\frac{\partial}{\partial x}\mathbin{-}x\frac{\partial}{\partial z}\right]=\left[y\frac{\partial}{\partial z}, z\frac{\partial}{\partial x}\right]\mathbin{-}\left[y\frac{\partial}{\partial z},x\frac{\partial}{\partial z}\right]\mathbin{-}\left[z\frac{\partial}{\partial y},z\frac{\partial}{\partial x}\right]+\left[z\frac{\partial}{\partial y},x\frac{\partial}{\partial z}\right]$$
Where we have used Theorem (i) to get an expression involving four commutators. Now we can use our formula for $[AB,CD]$ to break each of these into a further four commutators producing a grand to total of sixteen commutators! Fear not! As we saw above most of these (fourteen in fact) are zero. Of the remaining two one is +1 and one is $\mathbin{-}$1. We get (remember we have to insert the $\mathbin{-}i\hbar$ factor we dropped earlier).
$$[L_x,L_y]=\mathbin{-}i\hbar\left(y\frac{\partial}{\partial x}\mathbin{-}x\frac{\partial}{\partial y}\right)=i\hbar\left(x\frac{\partial}{\partial y}\mathbin{-}y\frac{\partial}{\partial x}\right)=i\hbar L_z$$
From Heisenberg’s prescription we have
$$\mathbf{p}=\mathbin{-}i\hbar\nabla=\mathbin{-}i\hbar\left(\frac{\partial}{\partial x}\mathbf{i}+\frac{\partial}{\partial y}\mathbf{j}+\frac{\partial}{\partial z}\mathbf{k}\right)$$
in terms of components we can write
$$p_x=\mathbin{-}i\hbar\frac{\partial}{\partial x}$$
$$p_y=\mathbin{-}i\hbar\frac{\partial}{\partial y}$$
$$p_z=\mathbin{-}i\hbar\frac{\partial}{\partial z}$$
The set of position and momentum operators $\{x,y,z,p_x,p_y,p_z\}$ is very similar to our earlier set of $\{x,y,z,\frac{\partial}{\partial x},\frac{\partial}{\partial y}, \frac{\partial}{\partial z}\}$. The only difference that $p_x$ etc. is not just $\frac{\partial}{\partial x}$ but has a “quantum factor” of $\mathbin{-}i\hbar$ in front. Let us now find some commutators
$$[x,p_x]=[x,\mathbin{-}i\hbar\frac{\partial}{\partial x}]=\mathbin{-}i\hbar[x,\frac{\partial}{\partial x}]=i\hbar[\frac{\partial}{\partial x},x]=i\hbar$$
We have corresponding formulas for $y$ and $z$ so we may write
$$[x,p_x]=[y,p_y]=[z,p_z]=i\hbar$$
all other commutators in the set $\{x,y,z,p_x,p_y,p_z\}$ may be shown to be zero. In our next lesson we show that the commutator $[x,p_x]=i\hbar$ leads to the famous Heisenberg uncertainty principle
$$\Delta x\Delta p_x\geq\frac{\hbar}{2}$$