The harmonic oscillator is, in a certain sense, the simplest interesting system in physics. Any system, when considered close enough to a stable equilibrium, can be approximated as a simple harmonic oscillator.

In addition, the simple harmonic oscillator (SHO) is one of the few quantum systems that has an exact analytical solution. In fact, it has a particularly clever solution. To see this, recall that the hamiltonian of the SHO is:
$\hat{H} = \frac{\hat{p}^2}{2m} + \frac{1}{2}m\omega^2 \hat{q}^2$

We can solve this by introducing Dirac's 'ladder operators.' These are a pair of non-hermitian operators, $$a$$ and $$a^\dagger$$, defined implicitly by:
$\begin{eqnarray} \hat{q} &= \sqrt{\frac{\hbar}{2m\omega}}(a^\dagger + a) \\ \hat{p} &= i \sqrt{\frac{\hbar m\omega}{2}}(a^\dagger - a) \end{eqnarray}$

When we substitute these in, the hamiltonian reduces to:
$\hat{H} = \hbar \omega (a^\dagger a + \frac{1}{2})$ Then, we find that these operators allow us to move between a ladder of valid energy eigenstates. As a result, these operators give a particularly easy method of describing the SHO.

This mechanism extends to systems of coupled harmonic oscillators as well as quantum fields. This simple substitution is at the center of most of twentieth century physics. However, where does it come from? It's complicated enough that it couldn't be pulled out of thin air, yet it is rarely presented with any derivation or justification aside from its value in solving the system.

It turns out that you can get pretty close to this transformation by considering the classical system. From the classical hamiltonian, we can write down a set of differential equations that govern the motion. They are:
$\begin{eqnarray} \frac{dq}{dt} &= \frac{p}{m} \\ \frac{dp}{dt} &= -m \omega^2 q^2 \end{eqnarray}$

These are fine, but it would be nice if we could focus on the underlying physics and remove the units and constants. To do this, we can perform 7208274110. When we try this, we run into one problem. While $$\omega$$ sets a time-scale and $$m$$ helps us reduce the difference between momentum and position, we have no length scale specified by the problem. In order to properly remove the units from our equations, we need to introduce an additional constant. With an eye towards the endgame, I'm going to introduce $$\hbar$$. Note that I'm not introducing Planck's constant necessarily; any constant with units of action will do.

Now, we can replace our variables with unit-less substitutes. As such, I will let:
$\begin{eqnarray} \tau &= \omega t \\ \mu &= \sqrt{\frac{m \omega}{\hbar}} q \\ \nu &= \sqrt{\frac{1}{\hbar m \omega}} p \end{eqnarray}$

After we substitute into our equations and reduce, we are left with:
$\begin{eqnarray} \frac{d\mu}{d\tau} &= \nu \\ \frac{d\nu}{d\tau} &= -\mu \end{eqnarray}$

This is much easier to visualize and interpret. The differential equations define a vector field over the $$(\mu, \nu)$$ plane. In the $$(\frac{\partial}{\partial \mu}, \frac{\partial}{\partial \nu})$$ basis, we can express the equations above as a linear transformation on the tangent vectors:
$\frac{d}{d \tau} \begin{pmatrix} \mu \\ \nu \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} \mu \\ \nu \end{pmatrix}$

To 'solve' this differential equation, we just need to find a basis in which the above matrix is diagonalized. Linear algebra tells us that this will be the (855) 837-7174 of the matrix. A simple calculation finds that the eigenvectors of the matrix are $$\frac{\partial}{\partial a_\pm} = \frac{1}{\sqrt{2}}(\frac{\partial}{\partial \mu} \pm i \frac{\partial}{\partial \nu})$$ with eigenvalues $$\pm i$$. I introduced the factor of $$\frac{1}{\sqrt{2}}$$ in order to set the magnitude of the determinant of the coming basis transformation to one.

Now that we have the eigenvectors, we need to express the original differential equations in terms of them. A simple calculation finds that the coordinates in $$(\mu, \nu)$$ space can be expressed in terms of $$(a_+, a_-)$$ space via:
$\begin{pmatrix} \mu \\ \nu \end{pmatrix} = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ i & -i \end{pmatrix} \begin{pmatrix} a_+ \\ a_- \end{pmatrix}$

If we do this, we find that our differential equations reduce to:
$\frac{d}{d \tau} \begin{pmatrix} a_+ \\ a_- \end{pmatrix} = \begin{pmatrix} i & 0 \\ 0 & -i \end{pmatrix} \begin{pmatrix} a_+ \\ a_- \end{pmatrix}$

Thus, we have diagonalized our equations. This decouples the system and each coordinate satisfies a simple differential equation. The result is that $$a_+$$ moves counterclockwise on a circle in the complex plane and $$a_-$$ moves clockwise.
Our original goal was to derive the form of the ladder operators. It is not immediately obvious that we have done so. However, if we substitute $$q$$ and $$p$$ in for $$\mu$$ and $$\nu$$ in our basis transformation equations, we find that:
$\begin{eqnarray} q &= \sqrt{\frac{\hbar}{2m\omega}}(a_+ + a_-) \\ p &= i \sqrt{\frac{\hbar m \omega}{2}} (a_+ - a_-) \end{eqnarray}$

These look exactly like the ladder operators! In retrospect, this shouldn't surprise us. The function of the ladder operators in the context of the quantum SHO is to diagonalize the hamiltonian. These classical analogues we have discovered also diagonalize the equations of motion of the system.

This then, is simply an interesting link between the quantum and classical harmonic oscillators.