Function (mathematics)


In mathematics, a function from a set to a set assigns to each element of exactly one element of. The set is called the domain of the function and the set is called the codomain of the function.
Functions were originally the idealization of how a varying quantity depends on another quantity. For example, the position of a planet is a function of time. Historically, the concept was elaborated with the infinitesimal calculus at the end of the 17th century, and, until the 19th century, the functions that were considered were differentiable. The concept of a function was formalized at the end of the 19th century in terms of set theory, and this greatly increased the possible applications of the concept.
A function is often denoted by a letter such as, or. The value of a function at an element of its domain is denoted by ; for example, the value of at is denoted by. Commonly, a specific function is defined by means of an expression depending on, such as in this case, some computation, called , may be needed for deducing the value of the function at a particular value; for example, if then
Given its domain and its codomain, a function is uniquely represented by the set of all pairs, called the graph of the function, a popular means of illustrating the function. When the domain and the codomain are sets of real numbers, each such pair may be thought of as the Cartesian coordinates of a point in the plane.
Functions are widely used in science, engineering, and in most fields of mathematics. It has been said that functions are "the central objects of investigation" in most fields of mathematics.
The concept of a function has evolved significantly over centuries, from its informal origins in ancient mathematics to its formalization in the 19th century. See History of the function concept for details.

Definition

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 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 One may write instead of, where the symbol 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
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 computation, that the domain of a specific function is contained in a larger set. For example, if is a real function, the determination of the domain of the function 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 elements of the codomain. Mathematically, a binary relation between two sets and is a subset of the set of all ordered pairs such that and The set of all these pairs is called the Cartesian product of and and denoted 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:
This definition may be rewritten more formally, without referring explicitly to the concept of a relation, but using more notation :
A function is formed by three sets, the domain the codomain and the graph that satisfy the three following conditions.
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 there is at most one in such that
Using functional notation, this means that, given either is in, or it is undefined.
The set of the elements of such that 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 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 of the real numbers to itself. Given a real function its multiplicative inverse is also a real function. The determination of the domain of definition of a multiplicative inverse of a 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. 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 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. 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.

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 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 When using functional notation, one usually omits the parentheses surrounding tuples, writing instead of
Given sets the set of all -tuples such that is called the Cartesian product of and denoted
Therefore, a multivariate function is a function that has a Cartesian product or a proper subset of a Cartesian product as a domain.
where the domain has the form
If all the are equal to the set of the real numbers or to the set of the complex numbers, one talks respectively of a function of several real variables or of a function of several complex variables.

Notation

There are various standard ways for denoting functions. The most commonly used notation is functional notation, which is the first notation described below.

Functional notation

The functional notation requires that a name is given to the function, which, in the case of an unspecified function is often the letter. Then, the application of the function to an argument is denoted by its name followed by its argument enclosed between parentheses, such as in
The argument between the parentheses may be a variable, often, that represents an arbitrary element of the domain of the function, a specific element of the domain, or an expression that can be evaluated to an element of the domain. The use of an unspecified variable between parentheses is useful for defining a function explicitly such as in "let ".
When the symbol denoting the function consists of several characters and no ambiguity may arise, the parentheses of functional notation might be omitted. For example, it is common to write instead of.
Functional notation was first used by Leonhard Euler in 1734. Some widely used functions are represented by a symbol consisting of several letters. In this case, a roman type is customarily used instead, such as "" for the sine function, in contrast to italic font for single-letter symbols.
The functional notation is often used colloquially for referring to a function and simultaneously naming its argument, such as in "let be a function". This is an abuse of notation that is useful for a simpler formulation.