Spherical harmonics can represent any scalar field (function of position) that satisfies certain properties. A magnetic field is a vector field, but if it is expressed in Cartesian components , each component is the derivative of the same scalar function called the "magnetic potential". Analyses of the Earth's magnetic field use a modified version of the usual spherical harmonics that differ by a multiplicative factor. A least-squares fit to the magnetic field measurements gives the Earth's field as the sum of spherical harmonics, each multiplied by the best-fitting "Gauss coefficient" or .