# 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 , where *f* is the function.

More precisely, given a function , 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 , 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 , 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 to , where , is written as .