We take a very simple situation in which each atom can be approximated as a two state system. The thermal energy is so low that the atom is in the ground state. In this ground state, the atom is assumed to have no net orbital angular momentum but only one
unpaired electron to give it a spin of the half. In the presence of an external magnetic field, the ground state will split into two states having an energy difference proportional to the applied field. The spin of the unpaired electron is parallel to the field in the higher energy state and anti-parallel in the lower one. A
density matrix, \rho , is a matrix that describes a quantum system in a mixed state, a statistical ensemble of several quantum states (here several similar 2-state atoms). This should be contrasted with a single state vector that describes a quantum system in a pure state. The expectation value of a measurement, A , over the ensemble is \langle A \rangle = \operatorname{Tr} (A \rho) . In terms of a complete set of states, |i\rangle , one can write : \rho = \sum_{ij} \rho_{ij} |i\rangle \langle j| . Von Neumann's equation tells us how the density matrix evolves with time. : i \hbar \frac d {dt} \rho (t) = [H, \rho(t)] In equilibrium, one has [H, \rho] = 0 , and the allowed density matrices are f(H) . The
canonical ensemble has \rho = \exp(-H/T)/Z , where Z =\operatorname{Tr} \exp(-H/T) . For the 2-state system, we can write H = -\gamma \hbar B \sigma_3 . Here \gamma is the
gyromagnetic ratio. Hence Z = 2 \cosh(\gamma \hbar B/(2T)) , and : \rho(B,T) = \frac 1 {2 \cosh(\gamma \hbar B/(2T))} \begin{pmatrix} \exp (-\gamma \hbar B/(2T)) & 0 \\ 0 & \exp (\gamma \hbar B/(2T)) \end{pmatrix}. From which : \langle J_x \rangle = \langle J_y \rangle = 0, \langle J_z \rangle = - \frac \hbar 2 \tanh (\gamma \hbar B/(2T)). == Explanation of para and diamagnetism using perturbation theory ==