In mathematics, the domain of a function is the set of inputs accepted by the function. It is sometimes denoted by dom ( f ) {\displaystyle \operatorname {dom} (f)} or dom f {\displaystyle \operatorname {dom} f} , where f is the function. In layman's terms, the domain of a function can generally be thought of as "what x can be".
More precisely, given a function f : X → Y {\displaystyle f\colon X\to Y} , the domain of f is X. In modern mathematical language, the domain is part of the definition of a function rather than a property of it.
In the special case that X and Y are both sets of real numbers, the function f can be graphed in the Cartesian coordinate system. In this case, the domain is represented on the x-axis of the graph, as the projection of the graph of the function onto the x-axis.
For a function f : X → Y {\displaystyle f\colon X\to Y} , the set Y is called the codomain: the set to which all outputs must belong. The set of specific outputs the function assigns to elements of X is called its range or image. The image of f is a subset of Y, shown as the yellow oval in the accompanying diagram.
Any function can be restricted to a subset of its domain. The restriction of f : X → Y {\displaystyle f\colon X\to Y} to A {\displaystyle A} , where A ⊆ X {\displaystyle A\subseteq X} , is written as f | A : A → Y {\displaystyle \left.f\right|_{A}\colon A\to Y} .