" that for each input yields a corresponding output , because any
vertical line has exactly one crossing point with the curve. A
function from a
set to a set is an assignment of one element of to each element of . The set is called the
domain of the function and the set is called the
codomain of the function. If the element in is assigned to in by the function , one says that
maps to , and this is commonly written y=f(x). In this notation, is the
argument or
variable of the function. A specific element of is a
value of the variable, and the corresponding element of is the
value of the function at , or the
image of under the function. The
image of a function, sometimes called its
range, is the set of the images of all elements in the domain. A function , its domain , and its codomain are often specified by the notation f: X\to Y. One may write x\mapsto y instead of y=f(x), where the symbol \mapsto (read '
maps to') is used to specify where a particular element in the domain is mapped to by . This allows the definition of a function without naming. For example, the
square function is the function x\mapsto x^2. The domain and codomain are not always explicitly given when a function is defined. In particular, it is common that one might only know, without some (possibly difficult) computation, that the domain of a specific function is contained in a larger set. For example, if f:\R\to\R is a
real function, the determination of the domain of the function x\mapsto 1/f(x) requires knowing the
zeros of This is one of the reasons for which, in
mathematical analysis, "a function may refer to a function having a proper subset of as a domain. For example, a "function from the reals to the reals" may refer to a
real-valued function of a
real variable whose domain is a proper subset of the
real numbers, typically a subset that contains a non-empty
open interval. Such a function is then called a
partial function. A function on a set means a function from the domain , without specifying a codomain. However, some authors use it as shorthand for saying that the function is .
Formal definition The above definition of a function is essentially that of the founders of
calculus,
Leibniz,
Newton and
Euler. However, it cannot be
formalized, since there is no mathematical definition of an "assignment". It is only at the end of the 19th century that the first formal definition of a function could be provided, in terms of
set theory. This set-theoretic definition is based on the fact that a function establishes a
relation between the elements of the domain and some (possibly all) elements of the codomain. Mathematically, a
binary relation between two sets and is a
subset of the set of all
ordered pairs (x, y) such that x\in X and y\in Y. The set of all these pairs is called the
Cartesian product of and and denoted X\times Y. Thus, the above definition may be formalized as follows. A
function with domain and codomain is a binary relation between and that satisfies the two following conditions: • For every x in X there exists y in Y such that (x,y)\in R. • If (x,y)\in R and (x,z)\in R, then y=z. This definition may be rewritten more formally, without referring explicitly to the concept of a relation, but using more notation (including
set-builder notation): A function is formed by three sets (often as an ordered triple), the
domain X, the
codomain Y, and the
graph R that satisfy the three following conditions. • R \subseteq \{(x,y) \mid x\in X, y\in Y\} • \forall x\in X, \exists y\in Y, \left(x, y\right) \in R \qquad • (x,y)\in R \land (x,z)\in R \implies y=z\qquad A relation satisfying these conditions is called a
functional relation. The more usual terminology and notation can be derived from this formal definition as follows. Let be a function defined by a functional relation . For every in the domain of , the unique element of the codomain that is related to is denoted . If is this element, one writes commonly instead of or , and one says that " maps to ", " is the image by of ", or "the application of on gives ", etc.
Partial functions Partial functions are defined similarly to ordinary functions, with the "total" condition removed. That is, a
partial function from to is a binary relation between and such that, for every x\in X, there is
at most one in such that (x,y) \in R. Using functional notation, this means that, given x\in X, either f(x) is in , or it is undefined. The set of the elements of such that f(x) is defined and belongs to is called the
domain of definition of the function. A partial function from to is thus an ordinary function that has as its domain a subset of called the domain of definition of the function. If the domain of definition equals , one often says that the partial function is a
total function. In several areas of mathematics, the term "function" refers to partial functions rather than to ordinary (total) functions. This is typically the case when functions may be specified in a way that makes difficult or even impossible to determine their domain. In
calculus, a
real-valued function of a real variable or
real function is a partial function from the set \R of the
real numbers to itself. Given a real function f:x\mapsto f(x) its
multiplicative inverse x\mapsto 1/f(x) is also a real function. The determination of the domain of definition of a multiplicative inverse of a (partial) function amounts to compute the
zeros of the function, the values where the function is defined but not its multiplicative inverse. Similarly, a
function of a complex variable is generally a partial function whose domain of definition is a subset of the
complex numbers \Complex. The difficulty of determining the domain of definition of a
complex function is illustrated by the multiplicative inverse of the
Riemann zeta function: the determination of the domain of definition of the function z\mapsto 1/\zeta(z) is more or less equivalent to the proof or disproof of one of the major open problems in mathematics, the
Riemann hypothesis. In
computability theory, a
general recursive function is a partial function from the integers to the integers whose values can be computed by an
algorithm (roughly speaking). The domain of definition of such a function is the set of inputs for which the algorithm does not run forever. A fundamental theorem of computability theory is that there cannot exist an algorithm that takes an arbitrary general recursive function as input and tests whether belongs to its domain of definition (see
Halting problem).
Multivariate functions A
multivariate function,
multivariable function, or
function of several variables is a function that depends on several arguments. Such functions are commonly encountered. For example, the position of a car on a road is a function of the time travelled and its average speed. Formally, a function of variables is a function whose domain is a set of -tuples. For example, multiplication of
integers is a function of two variables, or
bivariate function, whose domain is the set of all
ordered pairs (2-tuples) of integers, and whose codomain is the set of integers. The same is true for every
binary operation. The graph of a bivariate surface over a two-dimensional real domain may be interpreted as defining a
parametric surface, as used in, e.g.,
bivariate interpolation. Commonly, an -tuple is denoted enclosed between parentheses, such as in (1,2,\ldots, n). When using
functional notation, one usually omits the parentheses surrounding tuples, writing f(x_1,\ldots,x_n) instead of f((x_1,\ldots,x_n)). Given sets X_1,\ldots, X_n, the set of all -tuples (x_1,\ldots,x_n) such that x_1\in X_1, \ldots, x_n\in X_n is called the
Cartesian product of X_1,\ldots, X_n, and denoted X_1\times\cdots\times X_n. Therefore, a multivariate function is a function that has a Cartesian product or a
proper subset of a Cartesian product as a domain. f: U\to Y, where the domain has the form U\subseteq X_1\times\cdots\times X_n. If all the X_i are equal to the set \R of the
real numbers or to the set \C of the
complex numbers, one talks respectively of a
function of several real variables or of a
function of several complex variables. == Notation ==