# Domain of a function

In mathematics, the domain of a function is the set of inputs accepted by the function. It is sometimes denoted by ${\displaystyle \operatorname {dom} (f)}$, where f is the function.

More precisely, given a function ${\displaystyle f\colon X\to Y}$, the domain of f is X. Note that 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 subsets of ${\displaystyle \mathbb {R} }$, 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 ${\displaystyle f\colon X\to Y}$, the set Y is called the codomain, and the set of values attained by the function (which is a subset of Y) is called its range or image.

Any function can be restricted to a subset of its domain. The restriction of ${\displaystyle f\colon X\to Y}$ to ${\displaystyle A}$, where ${\displaystyle A\subseteq X}$, is written as ${\displaystyle \left.f\right|_{A}\colon A\to Y}$.