The magnetic force is centripetal, directing the particle into a circular path. This is the role of the main dipole magnets.
The magnetic force F (Lorentz force) on a particle with charge q in a magnetic field of strength B moving with velocity v is :
F = q v x B .
This force is centripetal, directing the particle into a circular path. This is the role of the main dipole magnets.
Quadrupole magnets can focus the beam of particles, but only in one direction. They focus the charged particles in the vertical direction, but unfortunately also defocus them in the horizontal direction. It is possible to focus particles back into the horizontal direction with a quadrupole magnet rotated by 90 degrees. The optimal result is obtained by alternating these two orientations.
The strength of the magnetic field along the focusing axis of a quadrupole grows linearly from the center of the field, where it is zero. There are many pairs of focusing-defocusing magnets (so called FODO cells) in circular accelerators.
Sextupoles can be used in combination with quadrupoles to align the particle momentum of particles as the radial positions of the circulating particles change with momentum. The strength of the field of sextupoles along the horizontal axis grows quadratically from the center, where it is zero.