Geomagnetic field modeling consists in converting large numbers of magnetic observations into a linear combination of elementary mathematical functions that best describes those observations. The set of numerical coefficients defining this linear combination is then what one refers to as a geomagnetic field model. Such models can be used to produce maps. More importantly, they form the basis for the geophysical interpretation of the geomagnetic field, by providing the possibility of separating fields produced by various sources and extrapolating those fields to places where they cannot be directly measured. In this chapter, the mathematical foundation of global (as opposed to regional) geomagnetic field modeling is reviewed, and the spatial modeling of the field in spherical coordinates is focused. Time can be dealt with as an independent variable and is not explicitly considered. The relevant elementary mathematical functions are introduced, their properties are reviewed, and how they can be used to describe the magnetic field in a source-free (such as the Earth’s neutral atmosphere) or source-dense (such as the ionosphere) environment is explained. Completeness and uniqueness properties of those spatial mathematical representations are also discussed, especially in view of providing a formal justification for the fact that geomagnetic field models can indeed be constructed from ground-based and satellite-born observations, provided those reasonably approximate the ideal situation where relevant components of the field can be assumed perfectly known on spherical surfaces or shells at the time for which the model is to be recovered.