History
As a mathematical term, "function" was coined by Leibniz in 1694, to describe a quantity related to a curve, such as a curve's slope or a specific point of a curve. The functions Leibniz considered are today called differentiable functions, and they are the type of function most frequently encountered by nonmathematicians. For this type of function, one can talk about limitss and derivatives; both are measurements of the change of output values associated to a change of input values, and these measurements are the basis of calculus.
The word function was later used by Euler during the mid-18th century to describe an expression or formula involving various argumentss, e.g. f(x) = sin(x) + x3.
During the 19th century, mathematicians started to formalize all the different branches of mathematics. Weierstrass advocated building calculus on arithmetic rather than on geometry, which favoured Euler's definition over Leibniz's (see arithmetization of analysis).
By broadening the definition of functions, mathematicians were then able to study "strange" mathematical objects such as continuous functions that are nowhere differentiable. These functions were first thought to be only theoretical curiosities, and they were collectively called "monsters" as late as the turn of the 20th century. However, powerful techniques from functional analysis has shown that these functions are actually more common than differentiable functions. Such functions have since been applied to the modelling of physical phenomena such as Brownian motion.
Towards the end of the 19th century, mathematicians started trying to formalize all of mathematics using set theory, and they sought to define every mathematical object as a set. It was Dirichlet that gave the modern "formal" definition of function (see #Formal Definition below).
In Dirichlet's definition, a function is a special case of a relation. In most cases of practical interest, however, the differences between the modern definition and Euler's definition are negligible.
Formal definition
Formally, a function f from a set X of input values to a set Y of possible output values (written as f : X → Y) is a relation between X and Y which satisfies:
- f is total: for all x in X, there exists a y in Y such that x f y (x is f-related to y), i.e. for each input value, there is at least one output value in Y.
- f is many-to-one: if x f y and x f z, then y = z. i.e., many input values can be related to one output value, but one input value cannot be related to many output values.
For each input value x in the domain, the corresponding unique output value y in the codomain is denoted by f(x).
A more concise expression of the above definition is the following: a function from X to Y is a subset f of the cartesian product X × Y, such that for each x in X, there is a unique y in Y such that the ordered pair (x, y) is in f.
The set of all functions f : X → Y is denoted by YX. Note that |YX| = |Y||X| (refer to Cardinal numbers).
A relation between X and Y that satisfies condition (1) is a multivalued function. Every function is a multivalued function, but not every multivalued function is a function. A relation between X and Y that satisfies condition (2) is a partial function. Every function is a partial function, but not every partial function is a function. In this encyclopedia, the term "function" will mean a relation satisfying both conditions (1) and (2), unless otherwise stated.
Consider the following three examples: