Compound Angle formula using Matrices show that 
$$
\cos(A+B)=\cos(A)\cos(B)-\sin(A)\sin(B)\\
\text{ if } AB=BA
$$
the question gives a hint to use:
$$
\sin(A)=\frac{1}{2i}(e^{iA}-e^{-iA})\\
\cos(A)=\frac{1}{2}(e^{iA}+e^{-iA})
$$

$$
\cos(A+B)=\frac{1}{2}(e^{i(A+B)}+e^{-i(A+B)})\\
$$
and
$$
\cos(A)\cos(B)=\frac{1}{4}(e^{i(A+B)}+e^{i(A-B)}+e^{i(B-A)}+e^{-i(A+B)})\\
$$
and
$$
\sin(A)\sin(B)=\frac{-1}{4}(e^{i(A+B)}-e^{i(A-B)}-e^{i(B-A)}+e^{-i(A+B)})\\
$$
so
$$
\therefore \cos(A)\cos(B)-\sin(A)\sin(B)=\frac{1}{2}e^{i(A+B)}+\frac{1}{2}e^{-i(A+B)}
$$
