# Matrix Representation of Operators in a Finite Basis

 P: 23 1. The problem statement, all variables and given/known data I have my quantum mechanics final creeping up on me and I just have a question about something that doesn't appear to be covered in the text. Let's say you have a wave function of the following form for a linear harmonic oscillator: $\Psi = c_1 | E_1 \rangle + c_2 | E_2 \rangle$ The basis is just the first two excited energy states. My question is how the Hamiltonian matrix is represented in this case. Is it $H = \hbar \omega \left( \begin{matrix} 0 & 0 & 0 \\ 0 & \frac{3}{2} & 0 \\ 0 & 0 & \frac{5}{2} \end{matrix} \right)$ Or do you just use the non-zero elements: $H = \hbar \omega \left( \begin{matrix} \frac{3}{2} & 0 \\ 0 & \frac{5}{2} \end{matrix} \right)$ Any help would be greatly appreciated. Thanks!
 P: 23 Matrix Representation of Operators in a Finite Basis I also would like to know how to represent the ladder operators of the harmonic oscillator in a finite basis of $| E_1 \rangle$ and $| E_2 \rangle$ as matrices. I get the proper position expectation values using the following representations: $a = \left( \begin{matrix} 0 & 0 \\ \sqrt{2} & 0 \end{matrix} \right) \hspace{5 mm} a^{\dagger} = \left( \begin{matrix} 0 & \sqrt{2} \\ 0 & 0 \end{matrix} \right)$ Using these, however, I do not have the proper relationship for the Hamiltonian matrix and the ladder operator product: $H = a a^{\dagger} + \frac{1}{2} = \left( \begin{matrix} \frac{3}{2} & 0 \\ 0 & \frac{5}{2} \end{matrix} \right)$ I get a matrix of the following form for $a a^{\dagger}$: $a a^{\dagger} = \left( \begin{matrix} 0 & 0 \\ 0 & 2 \end{matrix} \right)$ Am I correct in my initial matrices for the ladder operators and the relationship between H and $a a^{\dagger}$ doesn't hold for finite subsets of $\{ E_n \}$? Or were my initial ladder operator matrices incorrect? Thanks!