# Hamiltonian of a Spin in a Magnetic Field

1. Mar 3, 2010

### Hart

1. The problem statement, all variables and given/known data

The hamiltonian of a spin in a magnetic field is given by:

$$\hat{H} = \alpha\left( B_{x}\hat{S_{x}} + B_{y}\hat{S_{y}} + B_{z}\hat{S_{z}}\right)$$

where $\alpha$ and the three components of B all are constants.

Question: Compute the energies and eigenstates of the spin.

2. Relevant equations

$$\hat{S_{x}} = \frac{\hbar}{2} \left[ \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right]$$

$$\hat{S_{y}} = \frac{\hbar}{2} \left[ \begin{array}{cc} 0 & -i \\ i & 0 \end{array} \right]$$

$$\hat{S_{z}} = \frac{\hbar}{2} \left[ \begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array} \right]$$

3. The attempt at a solution

.. I don't know how or where to start

2. Mar 3, 2010

### kuruman

Based on my previous experience with helping you, I think you should know where to start. Assemble the 2x2 Hamiltonian matrix, diagonalize it and find the eigenvectors and eigenvalues.

Last edited: Mar 3, 2010
3. Mar 3, 2010

### Hart

Well, this is actually what I've got so far..

By factoring in the $\frac{\hbar}{2}$ in each matrix:

$$B_{x}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{B_{x}\hbar^{2}}{2}\right) \\ \left(\frac{B_{x}\hbar^{2}}{2}\right) & 0 \end{array} \right]$$

$$B_{y}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{-iB_{y}\hbar^{2}}{2}\right) \\ \left(\frac{iB_{y}\hbar^{2}}{2}\right) & 0 \end{array} \right]$$

$$B_{z}\hat{S_{x}} = \left[ \begin{array}{cc} \left( \frac{B_{z}\hbar^{2}}{2}\right) & 0 \\ 0 & \left(\frac{-B_{z}\hbar^{2}}{2}\right) \end{array} \right]$$

Then by factoring in the $\alpha$:

$$B_{x}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{\alpha B_{x}\hbar^{2}}{2}\right) \\ \left(\frac{\alpha B_{x}\hbar^{2}}{2}\right) & 0 \end{array} \right]$$

$$B_{y}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{-i\alpha B_{y}\hbar^{2}}{2}\right) \\ \left(\frac{i\alpha B_{y}\hbar^{2}}{2}\right) & 0 \end{array} \right]$$

$$B_{z}\hat{S_{x}} = \left[ \begin{array}{cc} \left( \frac{\alpha B_{z} \hbar^{2}}{2}\right) & 0 \\ 0 & \left(\frac{-\alpha B_{z} \hbar^{2}}{2}\right) \end{array} \right]$$

Therefore the Hamiltonian $\hat{H}$ is the sum of these three matrices:

$$\hat{H} = \left[ \begin{array}{cc} \left(\frac{\alpha B_{z} \hbar^{2}}{2}\right) & \left(\frac{\alpha \hbar^{2}}{2}\left(B_{x} - iB_{y}\right)\right) \\ \left(\frac{\alpha \hbar^{2}}{2}\left(B_{x} + iB_{y}\right)\right) & \left(\frac{-\alpha B_{z} \hbar^{2}}{2}\right) \end{array} \right]$$

Hence my problem with what to do now.

4. Mar 3, 2010

5. Mar 3, 2010

### Hart

Righto, try again..

By factoring in the $\frac{\hbar}{2}$ in each matrix:

$$B_{x}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{B_{x}\hbar}{2}\right) \\ \left(\frac{B_{x}\hbar}{2}\right) & 0 \end{array} \right]$$

$$B_{y}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{-iB_{y}\hbar}{2}\right) \\ \left(\frac{iB_{y}\hbar}{2}\right) & 0 \end{array} \right]$$

$$B_{z}\hat{S_{x}} = \left[ \begin{array}{cc} \left( \frac{B_{z}\hbar}{2}\right) & 0 \\ 0 & \left(\frac{-B_{z}\hbar}{2}\right) \end{array} \right]$$

Then by factoring in the $\alpha$:

$$B_{x}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{\alpha B_{x}\hbar}{2}\right) \\ \left(\frac{\alpha B_{x}\hbar}{2}\right) & 0 \end{array} \right]$$

$$B_{y}\hat{S_{x}} = \left[ \begin{array}{cc} 0 & \left(\frac{-i\alpha B_{y}\hbar}{2}\right) \\ \left(\frac{i\alpha B_{y}\hbar}{2}\right) & 0 \end{array} \right]$$

$$B_{z}\hat{S_{x}} = \left[ \begin{array}{cc} \left( \frac{\alpha B_{z} \hbar}{2}\right) & 0 \\ 0 & \left(\frac{-\alpha B_{z} \hbar}{2}\right) \end{array} \right]$$

Therefore the Hamiltonian $\hat{H}$ is the sum of these three matrices:

$$\hat{H} = \left[ \begin{array}{cc} \left(\frac{\alpha B_{z} \hbar}{2}\right) & \left(\frac{\alpha \hbar}{2}\left(B_{x} - iB_{y}\right)\right) \\ \left(\frac{\alpha \hbar}{2}\left(B_{x} + iB_{y}\right)\right) & \left(\frac{-\alpha B_{z} \hbar}{2}\right) \end{array} \right]$$

That should be correct now then.

As far as then diagonalizing the Hamiltonian matrix derived, I have read the info on that Wiki page, and a few other places online, but I still don't get how to diagonalize it.. or atleast, not in a way that doesn't get horribly messy.

I've got an idea, but to ease on latex code inclusion on a method that could be completely wrong, I've simplified it..

So say for a matrix:

$$H = \left[ \begin{array}{cc} 5 & 4 \\ (-4) & 2 \end{array} \right]$$

I take these steps:

$$det(H) = det\left[ \begin{array}{cc} (5-\lambda) & 4 \\ (-4) & (2-\lambda) \end{array} \right]=0$$

$$\left[\left(5 - \lambda\right)\left(2-\lambda\right)\right] - \left[(4)(-4)\right] = 0$$

$$\left[10 - 7\lambda + \lambda^{2} + 16\right] = \lambda^{2} - 7\lambda + 26 = 0$$

And then the Eigenvalues are the values of $\lambda$ for which that equation holds. Obviously the numbers I chose were not very good as to give a nice answer, but hopefully the jist is clear.

.. do I do it at all something like this?!?

6. Mar 3, 2010

### kuruman

You do it exactly like this, but with the Hamiltonian 2x2 matrix that you assembled.

7. Mar 3, 2010

### Hart

Good good, right I've had a go at that and got to this stage:

$$\lambda^{2} - \left(\left(\frac{\alpha^{2}\hbar^{2}}{4}\right)\left(\hat{B_{x}^{2}} + \hat{B_{y}^{2}} + \hat{B_{z}^{2}}\right)\right) = \lambda^{2} - \left(\left(\frac{\alpha^{2}\hbar^{2}}{4}\right)\left(B\right)\right) = \lambda^{2} - \left(\frac{\alpha^{2}\hbar^{2}B}{4}\right)\right) = 0$$

Then the eigenvalues of $\hat{H}$ are the valid values of $\lambda$:

$$\lambda = \sqrt{\left(\frac{\alpha^{2}\hbar^{2}B}{4}\right)\right)} = \frac{\alpha \hbar \sqrt{B}}{2}\right)$$

.. hopefully this is heading towards a correct solution?

8. Mar 3, 2010

### kuruman

First off Bx2+By2+Bz2=B2

Also, the equation λ2-A2 = 0 has two solutions. What are they?

9. Mar 4, 2010

### Hart

.. so it should be:

$$\lambda = \sqrt{\left(\frac{\alpha^{2}\hbar^{2}B^{2}}{4}\right)\ \right)} = \pm \left( \frac{\alpha \hbar {B}}{2}\right)\right)$$

??

10. Mar 4, 2010

### kuruman

You have correctly found the eigenvalues. Now proceed to find the eigenvectors as outlined in the wikipedia example.

11. Mar 4, 2010

### Hart

Right, I've looked at the Wiki example but got stuck at this point, where I have two linear equations:

$$\frac{\alpha \hbar}{2}\left(xB_{z}+y\left(B_{x} + iB_{y}\right)\left) = \frac{\alpha \hbar}{2}\left(Bx\right)$$

$$\frac{\alpha \hbar}{2}\left(x\left(B_{x}+iB_{y}\right)-2yB\right) = \frac{\alpha \hbar}{2}\left(By\right)$$

I know I have to somehow equate these, then set/choose eigenvectors, something like that.

.. just can't see where to go with it now at the moment though.

12. Mar 5, 2010

### kuruman

You need to select one eigenvalue, say λ1 and write down
(H11 - λ1)x + H12y = 0
where Hij are the matrix elements of the Hamiltonian. The equation above and the normalization condition
x2 + y2 = 1

should give you the eigenvector for λ1. Repeat with λ2.

Note: I will be signing off for the next few days, so if you need more help, perhaps someone else may be able to do it.

13. Mar 5, 2010

### Hart

Right from what you said I've got this:

Chosen eigenvalue:

$$\lambda_{1} = \left( \frac{\alpha \hbar {B}}{2}\right)\right)$$

Then use:

(H11 - λ1)x + (H12)y = 0

where Hij are the matrix elements of the Hamiltonian.

Hence:

$$\left(\left(\frac{\alpha B_{z} \hbar}{2}\right) - \left( \frac{\alpha \hbar {B}}{2}\right)\right)\right) x + \left(\frac{\alpha \hbar}{2}\left(B_{x} - iB_{y}\right)\right) y = 0$$

Then I need to find what the values of x and y are, which are the respective components of the eigenvector associated to this eigenvalue.

You said to use $x^{2} + y^{2}=1$ and I should be able to use this to solve the above equation to get the eigenvector, but I just can't see what to do. I'm sure it's not too difficult, but hopefully I'm on the right track so far.

Note: Thanks for letting me know you wont be online for a while now, hopefully someone else will comment on this thread with some help.