A comprehensive review is presented of the mathematical methods used t
o represent magnetic fields in the Earth's magnetosphere, of the way e
xisting data-based models use these methods and of the associated prob
lems and concepts. The magnetic field has five main components: the in
ternal field, the magnetopause, the ring current, the tail and Birkela
nd currents. Methods of representing separately each of these are disc
ussed, as is the deformation of magnetic fields; Appendix B traces the
connection between deformations and the Cauchy integral. A summary se
ction lists the uses of data-based models and their likely future evol
ution, and Appendix A supplements the text with a set of problems.