Set of all things that may be the input of a mathematical function
A functionf fromX toY. The set of points in the red ovalX is the domain off.The set of points in the blue ovalY is the codomain off.The set of points in the yelllow oval is the range off.Graph of the arcsine and arccosine functions,f(x) = arcsin(x) andf(x) = arccos(x), each of whose domain consists of the set of real numbers [–1,1] inclusively
Inmathematics, thedomain of a function is theset of inputs accepted by thefunction. It is sometimes denoted by or, wheref is the function. In layman's terms, the domain of a function can generally be thought of as "what x can be".[1]
More precisely, given a function, the domain off isX. In modern mathematical language, the domain is part of the definition of a function rather than a property of it.
In the special case thatX andY are both sets ofreal numbers, the functionf can be graphed in theCartesian coordinate system. In this case, the domain is represented on thex-axis of the graph, as the projection of the graph of the function onto thex-axis.
For a function, the setY is called thecodomain: the set to which all outputs must belong. The set of specific outputs the function assigns to elements ofX is called itsrange orimage. The image of is a subset ofY, shown as the yellow oval in the accompanying diagram.
Any function can be restricted to a subset of its domain. Therestriction of to, where, is written as.
If areal functionf is given by a formula, it may be not defined for some values of the variable. In this case, it is apartial function, and the set of real numbers on which the formula can be evaluated to a real number is called thenatural domain ordomain of definition off. In many contexts, a partial function is called simply afunction, and its natural domain is called simply itsdomain.
The function defined by cannot be evaluated at 0. Therefore, the natural domain of is the set of real numbers excluding 0, which can be denoted by or.
Thepiecewise function defined by has as its natural domain the set of real numbers.
Thesquare root function has as its natural domain the set of non-negative real numbers, which can be denoted by, the interval, or.
Thetangent function, denoted, has as its natural domain the set of all real numbers which are not of the form for someinteger, which can be written as.
Sometimes such a domain is used as the domain of a function, although functions may be defined on more general sets. The two concepts are sometimes conflated as in, for example, the study ofpartial differential equations: in that case, adomain is the open connected subset of where a problem is posed, making it both an analysis-style domain and also the domain of the unknown function(s) sought.
For example, it is sometimes convenient inset theory to permit the domain of a function to be aproper classX, 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 formf:X →Y.[2]