  Since the early 1970s, inversion techniques have become the most useful tool
for inferring the magnetic, dynamic, and thermodynamic properties of the solar
atmosphere. The intrinsic model dependence makes it necessary to formulate
specific means that include the physics in a properly quantitative way. The
core of this physics lies in the radiative transfer equation (RTE), where the
properties of the atmosphere are assumed to be known while the unknowns are the
four Stokes profiles. The solution of the (differential) RTE is known as the
direct or forward problem. From an observational point of view, the problem is
rather the opposite: the data are made up of the observed Stokes profiles and
the unknowns are the solar physical quantities. Inverting the RTE is therefore
mandatory. Indeed, the formal solution of this equation can be considered an
integral equation. The solution of such an integral equation is called the
inverse problem. Inversion techniques are automated codes aimed at solving the
inverse problem.
  The foundations of inversion techniques are critically revisited with an
emphasis on making explicit the many assumptions underlying each of them. An
incremental complexity procedure is advised for the implementation in practice.
Coarse details of the profiles or coarsely sam- pled profiles should be
reproduced first with simple model atmospheres (with, for example, a few
physical quantities that are constant with optical depth). If the Stokes
profiles are well sampled and differences between synthetic and observed ones
are greater than the noise, then the inversion should proceed by using more
complex models (that is, models where physical quantities vary with depth or,
eventually, with more than one component). Significant im- provements are
expected as well from the use of new inversion techniques that take the spatial
degradation by the instruments into account.
