In mathematics, specifically in category theory, an exponential object is the categorical equivalent of a function space in set theory. Categories with all finite products and exponential objects are called cartesian closed categories. An exponential object may also be called a power object or map object.
Let C be a category with binary products and let Y and Z be objects of C. The exponential object ZY can be defined as a universal morphism from the functor –×Y to Z. (The functor –×Y from C to C maps objects X to X×Y and morphisms φ to φ×idY).
Explicitly, the definition is as follows. An object ZY, together with a morphism
is an exponential object if for any object X and morphism g : (X×Y) → Z there is a unique morphism
such that the following diagram commutes:
(Note: In functional programming languages, the morphism eval is often called apply, and the syntax is often written curry(g). The morphism eval here must not to be confused with the eval function in some programming languages, which evaluates quoted expressions.)
In the category of sets, the exponential object is the set of all functions from to . The map is just the evaluation map which sends the pair (f, y) to f(y). For any map the map is the curried form of :
In the category of topological spaces, the exponential object ZY exists provided that Y is a locally compact Hausdorff space. In that case, the space ZY is the set of all continuous functions from Y to Z together with the compact-open topology. The evaluation map is the same as in the category of sets. If Y is not locally compact Hausdorff, the exponential object may not exist (the space ZY still exists, but it may fail to be an exponential object since the evaluation function need not be continuous). For this reason the category of topological spaces fails to be cartesian closed.