# How to express a Hamiltonian operator as a matrix

Suppose we have Hamiltonian on $\mathbb{C}^2$ $$H=\hbar(W+\sqrt2(A^{\dagger}+A))$$ We also know $AA^{\dagger}=A^{\dagger}A-1$ and $A^2=0$, letting $W=A^{\dagger}A$

How can we express $H$ as $H=\hbar \Big(\begin{matrix} 0 & \sqrt2 \\ \sqrt2 & 1 \end{matrix} \Big)$

So far I've shown that if we consider the eigenvalues of $W$, $$W|\psi \rangle=w|\psi \rangle$$ It implies that $A|\psi \rangle$ and $A^{\dagger}|\psi \rangle$ are also eigenvectors of $W$ with eigenvalue $1-w$. Using $A^2=0$ we find that $w=0$ or $1$

I'm not entirely sure how you go about expressing operators as matrices, as the majority of my course has been using wave function notation, I'd really appreciate if someone could explain the next steps here just so I can have a more rigorous understanding of it.

• Can you solve for A, from the 2 equations that you wrote? assume general complex numbers a,b,c,d as the matrix values of A. I suspect this could work. – Prathyush Apr 8 '13 at 16:27

As @MichaelBrown has pointed out in the answer, to get the matrix element you just have to sandwich the operator between two states. So in the case of your Hamiltonian $H$, the matrix elements are given as $$H_{ij} = \langle i|H|j \rangle$$
I should point out that the $i$'s that you use should be the basis set that you're in. If you have a state $\psi$, then if $$|\psi \rangle = \sum_{i} c_i|i\rangle$$ only than can you express the matrix elements of your operator in this way. If you sandwich the operator between the state itself, you'll end up with the expectation of the state. $$\langle H \rangle = \langle\psi |H| \psi\rangle$$
The matrix element $O_{ij}$ of an operator are defined by $$O_{ij} = \langle i | \hat{O} | j \rangle,$$ and it is traditional that the $i$ index labels the row and $j$ labels the column. This way matrix multiplication works as you would expect: $$(O P)_{ij} = \sum_k O_{ik} P_{kj},$$ which you can show by inserting a complete set of states.