# Domain of a function

In mathematics, the domain or set of departure of a function is the set into which all of the input of the function is constrained to fall. It is the set X in the notation f: XY, and is alternatively denoted as $\operatorname {dom} (f)$ . Since a (total) function is defined on its entire domain, its domain coincides with its domain of definition. However, this coincidence is no longer true for a partial function, since the domain of definition of a partial function can be a proper subset of the domain. A function f from X to Y. The red oval X is the domain of f. Graph of the real-valued square root function, f(x) = √x, whose domain consists of all nonnegative real numbers

A domain is part of a function f if f is defined as a triple (X, Y, G), where X is called the domain of f, Y its codomain, and G its graph.

A domain is not part of a function f if f is defined as just a graph. For example, it is sometimes convenient in set theory to permit the domain of a function to be a proper class X, in which case there is formally no such thing as a triple (X, Y, G). With such a definition, functions do not have a domain, although some authors still use it informally after introducing a function in the form f: XY.

For instance, the domain of cosine is the set of all real numbers, while the domain of the square root consists only of numbers greater than or equal to 0 (ignoring complex numbers in both cases).

If the domain of a function is a subset of the real numbers and the function is represented in a Cartesian coordinate system, then the domain is represented on the x-axis.