  We find a decoupling limit of planar N=4 super Yang-Mills (SYM) on R x S^3 in
which it becomes equivalent to the ferromagnetic XXX_{1/2} Heisenberg spin
chain in an external magnetic field. The decoupling limit generalizes the one
found in hep-th/0605234 corresponding to the case with zero magnetic field. The
presence of the magnetic field is seen to break the degeneracy of the vacuum
sector and it has a non-trivial effect on the low energy spectrum. We find a
general connection between the Hagedorn temperature of planar N=4 SYM on R x
S^3 in the decoupling limit and the thermodynamics of the Heisenberg chain.
This is used to study the Hagedorn temperature for small and large value of the
effective coupling. We consider the dual decoupling limit of type IIB strings
on AdS_5 x S^5. We find a Penrose limit compatible with the decoupling limit
that gives a magnetic pp-wave background. The breaking of the symmetry by the
magnetic field on the gauge theory side is seen to have a geometric counterpart
in the derivation of the Penrose limit. We take the decoupling limit of the
pp-wave spectrum and succesfully match the resulting spectrum to the low energy
spectrum on the gauge theory side. This enables us to match the Hagedorn
temperature of the pp-wave to the Hagedorn temperature of the gauge theory for
large effective coupling. This generalizes the results of hep-th/0608115 to the
case of non-zero magnetic field.
