# Function space

In mathematics, a function space is a set of functions between two fixed sets. Often, the domain and/or codomain will have additional structure which is inherited by the function space. For example, the set of functions from any set X into a vector space has a natural vector space structure given by pointwise addition and scalar multiplication. In other scenarios, the function space might inherit a topological or metric structure, hence the name function space.

## In linear algebra

Let F be a field and let X be any set. The functions X → F can be given the structure of a vector space over F where the operations are defined pointwise, that is, for any f, g : X → F, any x in X, and any c in F, define ${\begin{aligned}(f+g)(x)&=f(x)+g(x)\\(c\cdot f)(x)&=c\cdot f(x)\end{aligned}}$ When the domain X has additional structure, one might consider instead the subset (or subspace) of all such functions which respect that structure. For example, if V and also X itself are vector spaces over F, the set of linear maps X → V form a vector space over F with pointwise operations (often denoted Hom(X,V)). One such space is the dual space of X: the set of linear functionals X → F with addition and scalar multiplication defined pointwise.
The cardinal dimension of a function space with no extra structure can be found by the Erdős–Kaplansky theorem.

## Examples

Function spaces appear in various areas of mathematics:
* In set theory, the set of functions from X to Y may be denoted {X → Y} or Y$^X$.
** As a special case, the power set of a set X may be identified with the set of all functions from X to {0, 1}, denoted 2$^X$.
* The set of bijections from X to Y is denoted $X\leftrightarrow Y$. The factorial notation X! may be used for permutations of a single set X.
* In functional analysis, the same is seen for continuous linear transformations, including topologies on the vector spaces in the above, and many of the major examples are function spaces carrying a topology; the best known examples include Hilbert spaces and Banach spaces.
* In functional analysis, the set of all functions from the natural numbers to some set X is called a sequence space. It consists of the set of all possible sequences of elements of X.
* In topology, one may attempt to put a topology on the space of continuous functions from a topological space X to another one Y, with utility depending on the nature of the spaces. A commonly used example is the compact-open topology, e.g. loop space. Also available is the product topology on the space of set theoretic functions (i.e. not necessarily continuous functions) Y$^X$. In this context, this topology is also referred to as the topology of pointwise convergence.
* In algebraic topology, the study of homotopy theory is essentially that of discrete invariants of function spaces;
* In the theory of stochastic processes, the basic technical problem is how to construct a probability measure on a function space of paths of the process (functions of time);
* In category theory, the function space is called an exponential object or map object. It appears in one way as the representation canonical bifunctor; but as (single) functor, of type $[X,-]$, it appears as an adjoint functor to a functor of type $-\times X$ on objects;
* In functional programming and lambda calculus, function types are used to express the idea of higher-order functions.
* In domain theory, the basic idea is to find constructions from partial orders that can model lambda calculus, by creating a well-behaved Cartesian closed category.
* In the representation theory of finite groups, given two finite-dimensional representations V and W of a group G, one can form a representation of G over the vector space of linear maps Hom(V,W) called the Hom representation.

## Functional analysis

Functional analysis is organized around adequate techniques to bring function spaces as topological vector spaces within reach of the ideas that would apply to normed spaces of finite dimension. Here we use the real line as an example domain, but the spaces below exist on suitable open subsets $\Omega \subseteq \mathbb {R} ^{n}$
* $C(\mathbb {R} )$ continuous functions endowed with the uniform norm topology
* $C_{c}(\mathbb {R} )$ continuous functions with compact support
* $B(\mathbb {R} )$ bounded functions
* $C_{0}(\mathbb {R} )$ continuous functions which vanish at infinity
* $C^{r}(\mathbb {R} )$ continuous functions that have r continuous derivatives.
* $C^{\infty }(\mathbb {R} )$ smooth functions
* $C_{c}^{\infty }(\mathbb {R} )$ smooth functions with compact support (i.e. the set of bump functions)
* $C^{\omega }(\mathbb {R} )$ real analytic functions
* $L^{p}(\mathbb {R} )$, for $1\leq p\leq \infty$, is the L$^p$ space of measurable functions whose p-norm ‖f‖$_p$=(∫$_R$|f|$^p$)$^{1/p}${\textstyle \|f\|_{p}=\left(\int _{\mathbb {R} }|f|^{p}\right)^{1/p}} is finite
* ${\mathcal {S}}(\mathbb {R} )$, the Schwartz space of rapidly decreasing smooth functions and its continuous dual, ${\mathcal {S}}'(\mathbb {R} )$ tempered distributions
* $D(\mathbb {R} )$ compact support in limit topology
* $W^{k,p}$ Sobolev space of functions whose weak derivatives up to order k are in $L^{p}$
* ${\mathcal {O}}_{U}$ holomorphic functions
* linear functions
* piecewise linear functions
* continuous functions, compact open topology
* all functions, space of pointwise convergence
* Hardy space
* Hölder space
* Càdlàg functions, also known as the Skorokhod space
* ${\text{Lip}}_{0}(\mathbb {R} )$, the space of all Lipschitz functions on $\mathbb {R}$ that vanish at zero.

## Norm

If y is an element of the function space ${\mathcal {C}}(a,b)$ of all continuous functions that are defined on a closed interval [a, b], the norm $\|y\|_{\infty }$ defined on ${\mathcal {C}}(a,b)$ is the maximum absolute value of y (x) for a ≤ x ≤ b, $\|y\|_{\infty }\equiv \max _{a\leq x\leq b}|y(x)|\qquad {\text{where}}\ \ y\in {\mathcal {C}}(a,b)$
is called the uniform norm or supremum norm ('sup norm').