Encyclopedia
In
mathematics, a
function relates each of its inputs to exactly one output. A standard notation for the output of the function
f with the input
x is
f. The set of all inputs that a function accepts is called the domain of the function. The set of all outputs is called the range.
For example, the expression
f =
x2 describes a function,
f, that relates each input,
x, with one output,
x2. Thus, an input of 3 is related to an output of 9. Once a function,
f, has been defined, we can write, for example,
f = 16.
It is a usual practice in mathematics to introduce functions with temporary names like
f; in the next paragraph we might define
f = 2
x+1, and then
f = 9. When a name for the function is not needed, often the form
y=x2 is used.
If we use a function often, we may give it a permanent name as, for example,
.
The essential property of a function is that for each input there must be one unique output. Thus, for example,
does not define a function, because it may have two outputs. The square roots of 9 are 3 and -3, for example. To make the square root a function, we must specify which square root to choose. The definition
,
for any non-negative input chooses the non-negative square root as an output.
A function need not involve numbers. An example of a function that does not use numbers is the function that assigns to each nation its current capital. In this case Capital =
Paris.
A more precise, but still informal definition follows. Let
A and
B be
sets. A function from
A to
B is determined by any association of a unique element of
B with each element of
A. The set
A is called the domain of the function; the set
B is called the codomain.
In some contexts, such as lambda calculus, the function notion may be taken as primitive rather than defined in terms of set theory.
In most mathematical fields, the terms
map,
mapping, and
transformation are usually synonymous with
function. However, in some contexts they may be defined with a more specialized meaning. For example, in
topology a map is sometimes defined to be a continuous function.
Mathematical definition of a function
A precise definition is required for the purposes of mathematics.
A
function is a binary relation,
f, with the property that for an element
x there is no more than one element
y such that
x is related to
y. This uniquely determined element
y is denoted by
f.
Because two definitions of binary relation are in use, there are actually two definitions of function, in effect.
First definition
The simplest definition of binary relation is "A binary relation is a set of ordered pairs". Under this definition, the binary relation "is less than" contains the ordered pair because 2 is less than 5.
A
function is then a set of ordered pairs with the property that if and are in the set, then
b must equal
c. Thus, the "is a square root of" relation is a function, and it contains for example, the pairs and ; while the converse, "is the square of" relation, is not a function because it contains both the pairs and , and 3 is not equal to -3. The "is less than" relation is not a function because it contains both the pairs and .
The
domain of a function is the set of elements
x occurring as first coordinate in a pair of the relation. If
x is not in the domain of
f, then
f is not defined.
The
range of a function is the set of elements
y occurring as second coordinate in a pair of the relation.
Second definition
Some authors require that the definition of a binary relation specify not only the ordered pairs but also the domain and codomain. These authors define a binary relation as an ordered triple , where
X and
Y are sets and
G is a subset of the cartesian product of
X and
Y . A
function is then a binary relation with the additional property that each element of
X occurs exactly once as the first coordinate of an element of
G. Under this second definition, a function has a uniquely determined codomain; this is not the case under the first definition.
This form of definition is essential in many contexts. For example, it is impossible to determine if a function is "
onto" without a specified codomain.
History of the concept
As a mathematical term, "
function" was coined by
Gottfried Leibniz in 1694, to describe a quantity related to a curve, such as a curve's
slope at a specific point. 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
limits and
derivatives; both are measurements of the output or the change in the output as it depends on the input or the change in the input. Such functions are the basis of
calculus.
The word function was later used by
Leonhard Euler during the mid-
18th century to describe an expression or formula involving various
arguments, e.g.
f = sin +
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 .
At first, the idea of a function was rather limited.
Joseph Fourier, for example, claimed that every function had a
Fourier series, something no mathematician would claim today.
By broadening the definition of functions, mathematicians were 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 have shown that these functions are in some sense "more common" than differentiable functions. Such functions have since been applied to the modeling of physical phenomena such as
Brownian motion.
Towards the end of the 19th century, mathematicians started to formalize all of mathematics using set theory, and they sought to define every mathematical object as a
set.
Dirichlet and
Lobachevsky independently and almost simultaneously gave the modern "formal" definition of function.
In this definition, a function is a special case of a relation, in particular a function is a relation in which every first element has a unique second element.
The notion of
function as a rule for computing, rather than a special kind of relation, has been studied extensively in mathematical logic and theoretical computer science. Models for these computable functions include the lambda calculus, the mu-recursive functions and
Turing machines.
Functions in other fields
Functions are used in every quantitative
science, to model relationships between all kinds of physical quantities — especially when one quantity is completely determined by another quantity. Thus, for example, one may use a function to describe how the temperature of water affects its density.
Functions are also used in computer science to model
data structures and the effects of
algorithms. However, the word is also used in computing in the very different sense of
procedure or
sub-routine; see function .
The vocabulary of functions
A specific input value to a function is called an
argument of the function. For each argument
x, the corresponding unique
y in the codomain is called the function
value at
x, or the
image of
x under f. The image of
x may be written as
f or as
y.
The
graph of a function f is the set of all ordered pairs , for all
x in the domain
X. If
X and
Y are subsets of
R, the real numbers, then this definition coincides with the familiar sense of "graph" as a picture or plot of the function, with the ordered pairs being the
Cartesian coordinates of points.
The concept of the
image can be extended from the image of a point to the image of a
set. If
A is any subset of the domain, then
f is the subset of the range consisting of all images of elements of A. We say the
f is the
image of A under f.
Notice that the range of
f is the image
f of its domain, and that the range of
f is a subset of its codomain.
The
preimage of a subset
B of the codomain
Y under a function
f is the subset of the domain
X defined by
- f −1 =
So, for example, the preimage of under the squaring function is the set .
In general, the preimage of a singleton set may contain any number of elements. For example, if
f = 7, then the preimage of is the empty set but the preimage of is the entire domain. Thus the preimage of an element in the codomain is a subset of the domain. The usual convention about the preimage of an element is that
f −1 means
f −1, i. e.
- f −1 =
Three important kinds of function are the
injections , which have the property that if
f =
f then
a must equal
b; the
surjections , which have the property that for every
y in the codomain there is an
x in the domain such that
f =
y; and the
bijections, which are both one-to-one and onto. This nomenclature was introduced by the Bourbaki group.
When the first definition of function given above is used, since the codomain is not defined, the "surjection" must be accompanied with a statement about the set the function maps onto. For example, we might say
f maps onto the set of all real numbers.
The
function composition of two or more functions uses the output of one function as the input of another. For example,
f =
sin is the composition of the sine function and the squaring function. The functions
f:
X ?
Y and
g:
Y ?
Z can be
composed by first applying
f to an argument
x to obtain
y =
f and then applying
g to
y to obtain
z =
g. The composite function formed in this way from general
f and
g may be written
-
-
The function on the right acts first and the function on the left acts second, reversing English reading order; we remember the order by reading the notation as "
g of
f".
Informally, the
inverse of a function
f is one that "undoes" the effect of
f, by taking each function value
f to its argument
x. The squaring function is the inverse of the non-negative square root function. Formally, since every function
f is a relation, its inverse
f−1 is just the inverse relation. That is, if
f has domain
X, codomain
Y, and graph
G, the inverse has domain
Y, codomain
X, and graph
- G−1 =
For example, if the graph of
f is
G = , then the graph of
f−1 is
G−1 = .
The relation
f−1 is a function if and only if for each
y in the codomain there is exactly one argument
x such that
f =
y; in other words, the inverse of a function
f is a function if and only if
f is a bijection. In that case,
f−1 =
x for every
x in
X, and
f =
y for any
y in
Y. Sometimes a function can be modified, often by replacing the domain with a subset of the domain, and making corresponding changes in the codomain and graph, so that the modified function has an inverse that is a function.
For example, the inverse of
y =
sin,
f =
arcsin , defined by
y =
arcsin if and only if
x =
sin, is not a function, because its graph contains both the ordered pair and the ordered pair . But if we change the domain of
y =
sin to -p/2 =
x = p/2 and change the codomain to -1 =
y = 1, then the resulting function does have an inverse, denoted with a capital letter A,
f =
Arcsin .
This does not work with every function, however, and inverses are sometimes difficult or impossible to find.
Specifying a function
If the domain
X is finite, a function
f may be defined by simply tabulating all the arguments
x and their corresponding function values
f.
More commonly, a function is defined by a formula, or more generally an
algorithm — that is, a recipe that tells how to compute the value of
f given any
x in the domain. More generally, a function can be defined by any mathematical condition relating the argument to the corresponding value. There are many other ways of defining functions. Examples include
recursion, algebraic or analytic closure, limits,
analytic continuation, infinite series, and as solutions to integral and
differential equations.
There is a technical sense in which most mathematical functions cannot be defined at all, in any effective way, explicit or implicit. A fundamental result of computability theory says that there are functions that can be precisely defined which cannot be computed.
Notation
It is common to omit the parentheses around the argument when there is little chance of ambiguity, thus: sin
x. In some formal settings, use of reverse Polish notation,
x f, eliminates the need for any parentheses; and, for example, the
factorial function is always written
n!, even though its generalization, the
gamma function, is written Γ.
Formal description of a function typically involves the function's name, its domain, its codomain, and a rule of correspondence. Thus we frequently see a two-part notation, an example being
-
-
Here the function named "
f" has the natural numbers as domain, the real numbers as codomain, and maps
n to itself divided by p. Less formally, this long form might be abbreviated
-
though with some loss of information; we no longer are explicitly given the domain and codomain. Even the long form here abbreviates the fact that the
n on the right-hand side is silently treated as a real number using the standard embedding.
Use of
f to denote the image of a subset
A⊂
X is consistent as long as no subset of the domain is also an element of the domain. A few authors write
f[
A] instead of
f, to emphasize the distinction between the two concepts; a few others write
f`
x instead of
f, and
f``
A instead of
f[
A].
Functions with multiple inputs and outputs
Functions of two variables
The concept of function can be extended to an object that takes a combination of two argument values to a single result. This intuitive concept is formalized by a function whose domain is the Cartesian product of two or more sets.
For example, consider the multiplication function that associates two integers to their product:
f =
x·
y. This function can be defined formally as having domain
Z×
Z , the set of all integer pairs; codomain
Z; and, for graph, the set of all pairs . Note that the first component of any such pair is itself a pair , while the second component is a single integer.
The function value of the pair is
f. However, it is customary to drop one set of parentheses and consider
f a
function of two variables,
x and
y.
Functions with output in a product set
The concept can still further be extended by considering a function that also produces output that is expressed as several variables. For example consider the function mirror = with domain
R×
R and codomain
R×
R as well. The pair is a single value in the codomain seen as a set.
Binary operations
The familiar binary operations of arithmetic,
addition and multiplication, can be viewed as functions from
Z×
Z to
Z. This view is generalized in abstract algebra, where
n-ary functions are used to model the operations of arbitrary algebraic structures. For example, an abstract group is defined as a set
X and a function
f from
X×
X to
X that satisfies certain properties.
Traditionally, addition and multiplication are written in the infix notation:
x+
y and
x×
y instead of + and ×.
Set of all functions
The set of all functions from a set
X to a set
Y is denoted by
X ?
Y, by [
X ?
Y], or by
YX. The latter notation is justified by the fact that |
YX| = |
Y|
|X|. See the article on
cardinal numbers for more details.
It is traditional to write
f:
X ?
Y to mean
f ? [
X ?
Y]; that is, "
f is a function from
X to
Y". This statement is sometimes read "
f is a
Y-valued function of an
X-valued variable". One often writes informally "Let
f:
X ?
Y" to mean "Let
f be a function from
X to
Y".
Is a function more than its graph?
Some mathematicians define a binary relation as an ordered triple , where
X and
Y are the domain and codomain sets, and
G is the graph of
f. However, other mathematicians define a relation as being simply the set of pairs
G, without explicitly giving the domain and co-domain.
There are advantages and disadvantages to each definition, but either of them is satisfactory for most uses of functions in mathematics. The explicit domain and codomain are important mostly in formal contexts, such as
category theory.
Partial functions and multi-functions
The condition for a binary relation
f from
X to
Y to be a function can be split into two conditions:
- f is total, or entire: for each x in X, there exists some y in Y such that x is related to y.
- f is single-valued: for each x in X, there is at most one y in Y such that x is related to y.
In some contexts, a relation that satisfies condition , but not necessarily , may be called a
multivalued function; and a relation that satisfies condition , but not necessarily , may be called a
partial function.
Other properties
There are many other special classes of functions that are important to particular branches of mathematics, or particular applications.
Here is a partial list:
Restrictions and extensions
Informally, a
restriction of a function
f is the result of trimming its domain.
More precisely, if
f is a function from a
X to
Y, and
S is any subset of
X, the
restriction of f to S is the function
f|
S from
S to
Y such that
f|
S =
f for all
s in
S.
If
g is any restriction of
f, we say that
f is an
extension of
g.
Pointwise operations
If
f:
X ?
R and
g:
X ?
R are functions with common domain
X and codomain is a ring
R, then one can define the sum function
f +
g:
X ?
R and the product function
f ×
g:
X ?
R as follows:
- = f + g
- = f × g
for all
x in
X.
This turns the set of all such functions into a ring. The binary operations in that ring have as domain ordered pairs of functions, and as codomain functions. This is an example of climbing up in abstraction, to functions of more complex types.
By taking some other algebraic structure
A in the place of
R, we can turn the set of all functions from
X to
A into an algebraic structure of the same type in an analogous way.
Computable and non-computable functions
The number of computable functions from integers to integers is countable, because the number of possible algorithms is. The number of all functions from integers to integers is higher: the same as the cardinality of the real numbers. This argument shows that there are functions from integers to integers that are not computable. For examples of noncomputable functions, see the articles on the halting problem and Rice's theorem.
Lambda calculus
The lambda calculus provides a powerful and flexible syntax for combining functions of several variables. In particular, composition becomes a special case of variable substitution; and
n-ary functions can be reduced to functions with fewer arguments by a process called currying.
Functions in category theory
The notion of function can be generalized to the notion of
morphism in the context of
category theory. A category is a collection of objects and morphisms. The collection of objects is completely arbitrary. The morphisms are the relationships between the objects. Each morphism is an ordered triple , where
X is an object called the domain,
Y is an object called the codomain, and
f connects
X to
Y. There are a few restrictions on the morphisms which guarantee that they are analogous to functions . However, because category theory is designed to work with objects that may not be sets or may not behave like sets do, morphisms are not the same as functions.
In a concrete category, each morphism is associated with an underlying function.
See also
- List of mathematical functions
- Functional
- Plateau
[i]
[i]
...
References
- Lawrence S. Husch . University of Tennessee.
- João Pedro da Ponte . The history of the concept of function and some educational implications. The Mathematics Educator 3, 3-8. available online in and formats.
- Anton, Howard . Calculus with analytical geometry.. New York:John Wiley and Sons. ISBN 0-471-03248-4.
External links
- , gives formulae and visualizations of many mathematical functions
- , a Java applet for exploring functions graphically.
- , online drawing program for mathematical functions.
- from cut-the-knot
-