Quadrupole magnets, abbreviated as Q-magnets, consist of groups of four magnets laid out so that in the planar multipole expansion of the field, the dipole terms cancel and where the lowest significant terms in the field equations are quadrupole. Quadrupole magnets are useful as they create a magnetic field whose magnitude grows rapidly with the radial distance from its longitudinal axis. This is used in particle beam focusing.
The simplest magnetic quadrupole is two identical bar magnets parallel to each other such that the north pole of one is next to the south of the other and vice versa. Such a configuration will have no dipole moment, and its field will decrease at large distances faster than that of a dipole. A stronger version with very little external field involves using a k=3 Halbach cylinder.
In some designs of quadrupoles using electromagnets, there are four steel pole tips: two opposing magnetic north poles and two opposing magnetic south poles. The steel is magnetized by a large electric current in the coils of tubing wrapped around the poles. Another design is a Helmholtz coil layout but with the current in one of the coils reversed.
At the speeds reached in high energy particle accelerators, magnetic deflection is more powerful than electrostatic, and use of the magnetic term of the Lorentz force:
is enabled with various magnets that make up 'the lattice' required to bend, steer and focus a charged particle beam.
The quadrupoles in the lattice are of two types: 'F quadrupoles' (which are horizontally focusing but vertically defocusing) and 'D quadrupoles' (which are vertically focusing but horizontally defocusing). This situation is due to the laws of electromagnetism (the Maxwell equations) which show that it is impossible for a quadrupole to focus in both planes at the same time. The image on the right shows an example of a quadrupole focusing in the vertical direction for a positively charged particle going into the image plane (forces above and below the center point towards the center) while defocusing in the horizontal direction (forces left and right of the center point away from the center).