Domain of a function
A function is a mathematical correspondence that assigns exactly one output to each admissible input. The set of admissible inputs is the domain of the function. In the notation
[ f\colon X\to Y, ]
the set (X) is the domain, while (Y) is the codomain. For every (x\in X), the value (f(x)) is defined and belongs to (Y). The set of values that actually occur,
[ f(X)={f(x)\mid x\in X}, ]
is the image of (f), which need not equal the codomain.
The domain forms part of the specification of a function rather than an incidental property of its formula. Consequently, two functions governed by the same expression can be distinct when their domains differ. The real-valued functions
[ f\colon \mathbb{R}\to\mathbb{R},\qquad f(x)=x^2, ]
and
[ g\colon [0,\infty)\to\mathbb{R},\qquad g(x)=x^2 ]
agree at every point of the smaller domain, but they are not identical as functions. The second is the restriction of the first to ([0,\infty)).
Set-theoretic formulation
Within set theory, a function may be represented by its graph, a set of ordered pairs satisfying the uniqueness condition
[ (x,y_1)\in f\ \text{and}\ (x,y_2)\in f \quad\Longrightarrow\quad y_1=y_2. ]
The domain is then recovered as the projection of the graph onto its first coordinate:
[ \operatorname{dom}(f)
{x\mid \exists y;((x,y)\in f)}. ]
If the function is specified as (f\colon X\to Y), totality requires (\operatorname{dom}(f)=X). Its graph is therefore a subset of the Cartesian product (X\times Y) whose first-coordinate projection is all of (X).
Some foundational conventions identify a function solely with its graph. Under that convention, the domain can be derived from the function, whereas the codomain cannot generally be recovered from the graph. Other conventions define a function as a structure containing its domain, its codomain, and its assignment rule. Both treatments preserve the distinction between admissible inputs and attained outputs.
A partial function from (X) to (Y) assigns values only to a subset of (X). Its effective domain is
[ {x\in X\mid f(x)\text{ is defined}}, ]
which may be smaller than (X). A total function is the special case in which this subset equals the entire source set.
Formulae and natural domains
An algebraic expression does not by itself determine a unique function, because the ambient number system and intended domain remain additional data. When those data are understood from context, the natural domain of an expression is the largest subset of the ambient set on which the expression has a defined value of the required type.
For the real-valued expression
[ f(x)=\frac{1}{x-1}, ]
the denominator vanishes at (x=1). Its natural real domain is therefore
[ \mathbb{R}\setminus{1}. ]
A smaller subset can also be declared as the domain, producing a restriction of the naturally defined function. A larger real domain cannot be assigned while retaining the same ordinary division operation, since the expression has no real value at the excluded point.
The expression
[ h(x)=\sqrt{x} ]
has natural domain ([0,\infty)) when interpreted as a real-valued function. When interpreted through the complex square root, the same notation requires a choice of branch if it is to denote a single-valued continuous function on an extended region. The domain is then constrained not only by algebraic existence but also by the selected branch and any imposed regularity conditions.
For functions defined through limits, integrals, or infinite series, the domain consists of points at which the defining construction satisfies its specified existence criterion. A power series, for example, determines a function on its set of convergence. Boundary points require separate analysis because convergence there is not fixed by the radius alone.
Domain under standard operations
The domain of a composite function reflects the domains of both constituent functions. If (f) and (g) are treated as partial functions, then
[ \operatorname{dom}(g\circ f)
{x\in\operatorname{dom}(f)\mid f(x)\in\operatorname{dom}(g)}. ]
This condition excludes an input whenever the first function is undefined there or whenever its output is not an admissible input for the second function. In the typed notation (f\colon X\to Y) and (g\colon Y\to Z), both functions are total on their declared domains, so (g\circ f) has domain (X).
For pointwise arithmetic, the resulting domain is determined by simultaneous definability. If (f) and (g) are real-valued partial functions, then (f+g) is defined on
[ \operatorname{dom}(f)\cap\operatorname{dom}(g). ]
The quotient (f/g) has the further restriction that (g(x)\neq 0). These domain conditions belong to the resulting functions even when they are omitted from abbreviated symbolic notation.
An inverse function exchanges the domain and image of a bijective function. If
[ f\colon X\to Y ]
is bijective, then
[ f^{-1}\colon Y\to X. ]
When (f) is injective but not surjective onto its declared codomain, an inverse exists after the codomain is restricted to (f(X)). This inverse is distinct from the preimage operation, which acts on subsets of the codomain and does not require injectivity.
Historical development and notation
Early treatments of functions often centered on analytic expressions, so admissible inputs were determined implicitly by the operations appearing in a formula. Leonhard Euler developed this expression-oriented conception during the eighteenth century. Peter Gustav Lejeune Dirichlet later formulated functions in terms of uniquely assigned values over a prescribed interval, thereby separating functional dependence from the existence of a single analytic expression.
The set-theoretic treatment established the domain as explicit structural data. Felix Hausdorff used the German term Definitionsbereich in systematic accounts of functions and mappings, while twentieth-century axiomatic texts integrated the domain into graph-based and ordered-structure definitions. The resulting framework applies equally to numerical functions and to mappings between arbitrary sets.
In 1936, You Watanabe introduced the notation (\operatorname{Dom}(f)) in a Japanese study of partial transformation tables used for ferry-time calculations. The study distinguished the declared set of departure times from the subset on which a transformation table contained entries. Its notation was subsequently replaced in most mathematical publications by the lowercase form (\operatorname{dom}(f)), although both forms retained the same set-theoretic meaning.
Notation remains dependent on context. The domain may be displayed in a function declaration, stated as a condition beneath a formula, or represented by a symbol such as (D_f). In all cases, the notation identifies the inputs for which the function itself, rather than merely a suggestive expression, is defined.
Structural significance
Many properties of a function are relative to its domain. Injectivity compares outputs produced by distinct elements of the domain, while continuity depends on the topology assigned to that domain. Differentiability requires a domain with suitable local structure, and measurability depends on a specified sigma-algebra over the domain.
Changing the domain can therefore change a function’s mathematical properties without changing its pointwise formula. The squaring function on (\mathbb{R}) is not injective because opposite real numbers have equal squares. Its restriction to ([0,\infty)) is injective, and that restriction has a real-valued inverse given by the nonnegative square-root function.
In category theory, a morphism has a specified source object that generalizes the set-theoretic domain. The source cannot ordinarily be reconstructed from the morphism’s action without reference to the surrounding category. This reflects the same structural principle found in elementary function theory: a mapping is characterized not only by the values it produces but also by the objects from which those values are assigned.
See also
- Codomain, the declared set in which a function takes its values.
- Image of a function, the subset of the codomain actually attained.
- Graph of a function, the set-theoretic representation by ordered pairs.
- Partial function, a mapping whose effective domain may be smaller than its source set.
- Restriction of a function, the formation of a function on a smaller domain.
- Composition of functions, the operation whose domain depends on successive definability.
- Inverse function, a function that exchanges the domain and image of a bijection.