The short version. If you're curious about how the x matrix for a harmonic oscillator moves an element within the oscillator state column matrix, this post may hurry things along for you. I was curious and spent bits and pieces of a few days trying to work it all out. Here's what I found hastily jotted down so I won't forget and so I can get back to studying for finals.
We're rapidly plowing towards finals week, so this may be rather disjointed, but I wanted to capture a few notes on actually using matrix operations before they escaped. In Hecht's book when calculating the perturbtion of an harmonic oscillator due to an x ubed, or an x to the fourth potential he makes a rather light reference to using the 'known' matrix elements of the x operator of the harmonic oscillator. I've seen the references quite frequenlty and decide for once rather than just using the elelments the book wrote down, seeminly from nowhere, that I'd go calculate them. It was a bit of work! It basically invovled three days of pondering and pulling hair out that I couldn't really spare. I won't waste your time or mine with all the mistakes I made since I don't want either of us to remember how to do things incorrectly.
Here's what I came up with after all that. I'll just run through my notes up to the x squared operator. First, the x operator, (see first picture), is the sum of the raising and lowering ladder operators. There's a factor out in front there, but we'll just ignore that since it won't effect the matrix operations.
The raising operator raises the eigenstate index of an oscillator state by one, (to a higher energy), and the lowering operator lowers it one to a lower energy. If we write them out in matrices, (second picture), they look like this:
The above picture of the matrix is what took the majority of my time by the way. While I had a number of books that quaintly said to 'simply use the matrix elements', none of them actually bothered to write the elements down.
You can see what's going on just by looking at the elements of the matrix. I ultimately wanted to work with the x squared operator, (applying the matrix on the left twice), so I placed my single state, n, in the middle of the column matrix to give the raising and lowering operators room to move it up/down twice without falling out of the matrix. Take a look at the first row. The only non-zero element is in the second column. That element will operate on the second element in the state vector column. The result will be deposited in the first row of the state column matrix. The matrix multiply itself 'lowered' the element in the second row into the first row after operating on it. All the matrix elements above the diagonal, (marked in red), will do this, they're the lowering operators. The matrix elements below the diagonal, (marked in green), do the opposite. They correspond to raising operators and will move an element in the column state matrix up in energy, (down one row in the column matrix).
And that's all for now.