  The Halbach cylinder is a construction of permanent magnets used in
applications such as nuclear magnetic resonance apparatus, accelerator magnets
and magnetic cooling devices. In this paper the analytical expression for the
magnetic vector potential, magnetic flux density and magnetic field for a two
dimensional Halbach cylinder are derived. The remanent flux density of a
Halbach magnet is characterized by the integer $p$. For a number of
applications the force and torque between two concentric Halbach cylinders are
important. These quantities are calculated and the force is shown to be zero
except for the case where $p$ for the inner magnet is one minus $p$ for the
outer magnet. Also the force is shown never to be balancing. The torque is
shown to be zero unless the inner magnet $p$ is equal to minus the outer magnet
$p$. Thus there can never be a force and a torque in the same system.
