# On the optical properties of quadrupolar magnets

Here's the magnetic field produced by a quadrupole

Citing from Barr, Giles; Devenish, Robin; Walczak, Roman; Weidberg, Tony Particle Physics in the LHC Era (Oxford Master Series in Physics) (p.55,56). OUP Oxford:

One says that the quadrupole is focusing in one plane and defocusing in another plane, perpendicular to the first. There is a complete analogy with geometrical optics, and for a quadrupole of length $$l$$, with quadrupole strength $$k$$, one can define its focal length $$f$$: $$\frac 1 f = kl \qquad$$

Where does this formula come from?