  We present a rigorous mathematical solution to photometric redshift
estimation and the more general inversion problem. The challenge we address is
to meaningfully constrain unknown properties of astronomical sources based on
given observables, usually multicolor photometry, with the help of a training
set that provides an empirical relation between the measurements and the
desired quantities. We establish a formalism that blurs the boundary between
the traditional empirical and template-fitting algorithms, as both are just
special cases that are discussed in detail to put them in context. The new
approach enables the development of more sophisticated methods that go beyond
the classic techniques to combine their advantages. We look at the directions
for further improvement in the methodology, and examine the technical aspects
of practical implementations. We show how training sets are to be constructed
and used consistently for reliable estimation.
