In mathematics, a function[1] is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. An example is the function that relates each real number x to its square x2. The output of a function f corresponding to an input x is denoted by f(x) (read "f of x"). In this example, if the input is −3, then the output is 9, and we may write f(−3) = 9. Likewise, if the input is 3, then the output is also 9, and we may write f(3) = 9. (The same output may be produced by more than one input, but each input gives only one output.) The input variable(s) are sometimes referred to as the argument(s) of the function.
Functions of various kinds are "the central objects of investigation" in most fields of modern mathematics. There are many ways to describe or represent a function. Some functions may be defined by a formula or algorithm that tells how to compute the output for a given input. Others are given by a picture, called the graph of the function. In science, functions are sometimes defined by a table that gives the outputs for selected inputs. A function could be described implicitly, for example as the inverse to another function or as a solution of a differential equation.
In modern mathematics,[3] a function is defined by its set of inputs, called the domain; a set containing the set of outputs, and possibly additional elements, as members, called its codomain (or target); and the set of all inputoutput pairs, called its graph. Sometimes the codomain is called the function's "range", but more commonly the word "range" is used to mean, instead, specifically the set of outputs (this is also called the image of the function). For example, we could define a function using the rule f(x) = x2 by saying that the domain and codomain are the real numbers, and that the graph consists of all pairs of real numbers (x, x2). The image of this function is the set of nonnegative real numbers. Collections of functions with the same domain and the same codomain are called function spaces, the properties of which are studied in such mathematical disciplines as real analysis, complex analysis, and functional analysis.
In analogy with arithmetic, it is possible to define addition, subtraction, multiplication, and division of functions, in those cases where the output is a number. Another important operation defined on functions is function composition, where the output from one function becomes the input to another function.
Contents
Introduction and examples[edit]
For an example of a function, let X be the set consisting of four shapes: a red triangle, a yellow rectangle, a green hexagon, and a red square; and let Y be the set consisting of five colors: red, blue, green, pink, and yellow. Linking each shape to its color is a function from X to Y: each shape is linked to a color (i.e., an element in Y), and each shape is "linked", or "mapped", to exactly one color. There is no shape that lacks a color and no shape that has more than one color. This function will be referred to as the "coloroftheshape function".
The input to a function is called the argument and the output is called the value. The set of all permitted inputs to a given function is called the domain of the function, while the set of permissible outputs is called the codomain. Thus, the domain of the "coloroftheshape function" is the set of the four shapes, and the codomain consists of the five colors. The concept of a function does not require that every possible output is the value of some argument, e.g. the color blue is not the color of any of the four shapes in X.
A second example of a function is the following: the domain is chosen to be the set of natural numbers (1, 2, 3, 4, ...), and the codomain is the set of integers (..., −3, −2, −1, 0, 1, 2, 3, ...). The function associates to any natural number n the number 4−n. For example, to 1 it associates 3 and to 10 it associates −6.
A third example of a function has the set of polygons as domain and the set of natural numbers as codomain. The function associates a polygon with its number of vertices. For example, a triangle is associated with the number 3, a square with the number 4, and so on.
The term range is sometimes used either for the codomain or for the set of all the actual values a function has.
Definition[edit]
The above diagram represents a function with domain {1, 2, 3}, codomain {A, B, C, D} and set of ordered pairs {(1,D), (2,C), (3,C)}. The image is {C,D}.
However, this second diagram does not represent a function. One reason is that 2 is the first element in more than one ordered pair. In particular, (2, B) and (2, C) are both elements of the set of ordered pairs. Another reason, sufficient by itself, is that 3 is not the first element (input) for any ordered pair. A third reason, likewise, is that 4 is not the first element of any ordered pair.
In order to avoid the use of the informally defined concepts of "rules" and "associates", the above intuitive explanation of functions is completed with a formal definition. This definition relies on the notion of the Cartesian product. The Cartesian product of two sets X and Y is the set of all ordered pairs, written (x, y), where x is an element of X and y is an element of Y. The x and the y are called the components of the ordered pair. The Cartesian product of X and Y is denoted by X × Y.
A function f from X to Y is a subset of the Cartesian product X × Y subject to the following condition: every element of X is the first component of one and only one ordered pair in the subset.[4] In other words, for every x in X there is exactly one element y such that the ordered pair (x, y) is contained in the subset defining the function f. This formal definition is a precise rendition of the idea that to each x is associated an element y of Y, namely the uniquely specified element y with the property just mentioned.
Considering the "coloroftheshape" function above, the set X is the domain consisting of the four shapes, while Y is the codomain consisting of five colors. There are twenty possible ordered pairs (four shapes times five colors), one of which is
("yellow rectangle", "red").The "coloroftheshape" function described above consists of the set of those ordered pairs,
(shape, color)where the color is the actual color of the given shape. Thus, the pair ("red triangle", "red") is in the function, but the pair ("yellow rectangle", "red") is not.
Notation[edit]
A function f is commonly declared by stating its domain X and codomain Y using the expression
f : X → Y {\displaystyle f\colon X\rightarrow Y}or
X → f Y . {\displaystyle X~{\stackrel {f}{\rightarrow }}~Y.}In this context, the elements of X are called arguments of f. 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. It is written as f(x). One says that f associates y with x or maps x to y. This is abbreviated by
y = f ( x ) . {\displaystyle y=f(x).}A general function, to be defined for a particular context, is usually denoted by a single letter, most often the lowercase letters f, g, h. Special functions that have universally (or widely) recognized names and definitions most often have 2 to 4letter symbols. These functions include, for instance, the trigonometric functions sine, cosine, and tangent with symbols sin, cos, tan (occasionally tg), the natural logarithm function, denoted by ln or loge, and the signum function, denoted by sgn. The value of the function f at a point x is denoted f(x), while the value of a function like sine at x can be notated as sin(x) or sin x, with the parentheses omitted if no ambiguity arises. Note that by convention, general functions are displayed using an italicized letter (like a variable), while special functions are set in roman type.
Although tending to pedantry when carefully observed on every occasion, one should distinguish between a function ("the machine") and its value at a particular point ("the output"): the symbol f represents the function, while f(x) is its value at x. Thus, it is sloppy and an abuse of notation to say: "Let f(x) be the function x2 + 1." A careful, precise statement should instead be "Let f : R → R be the function that maps x to the value x2 + 1," or "Let f: R → R be the function (defined by) x ↦ x 2 + 1 {\displaystyle x\mapsto x^{2}+1} " (see below for the usage of ↦ {\displaystyle \mapsto } ). In practice, sloppy statements are made (either intentionally or unintentionally) in order to avoid cumbersome circumlocutions like these.
The distinction between a function and its value becomes important, for instance, when one wishes to talk about the duality between a function and its argument. In these situations, it is desirable to show the symmetry between function and argument and place the function and the argument on an equal footing. One way to do so is to use bracket notation: we write [ x , f ] {\displaystyle [x,f]} for the expression f(x).[5] As examples, we can combine the bracket notation with the dot notation (discussed below) in the expression [ x 0 , ⋅ ] {\displaystyle [x_{0},\cdot ]} to represent the mapping (an example of a functional) f ↦ [ x 0 , f ] = f ( x 0 ) {\displaystyle f\mapsto [x_{0},f]=f(x_{0})} for a given, fixed x 0 {\displaystyle x_{0}} , without having to introduce the letter f, which is merely a placeholder ("dummy"). Although this notation might allow for cleaner expression of abstract mappings, applying it toward functions containing rational or polynomial expressions is awkward and unwieldy. Thus, this notation is seldom used in general mathematical or scientific settings. (For a related notation used in quantum mechanics, see braket notation.)
Practically speaking, the notation ↦ {\displaystyle \mapsto } ("maps to", an arrow with a bar at its tail) is flexible and convenient. It can be used to briefly mention and define a function without assigning it a name. In other cases, to define a function in full, a mapping defined with a "maps to" arrow could be stacked, in parallel, immediately below the declaration of the function name, domain, and the codomain. For example,
f : N → Z x ↦ 4 − x . {\displaystyle {\begin{aligned}f\colon \mathbb {N} &\to \mathbb {Z} \x&\mapsto 4x.\end{aligned}}}The first part can be read as:
 "f is a function from ℕ (the set of natural numbers) to ℤ (the set of integers)" or
 "f is a ℤvalued function of an ℕvalued variable".
The second part is read:
 "x maps to 4 − x."
In other words, this function has the natural numbers as domain, the integers as codomain. Strictly speaking, a function is properly defined only when the domain and codomain are specified. Moreover, the function
g : Z → Z x ↦ 4 − x . {\displaystyle {\begin{aligned}g\colon \mathbb {Z} &\to \mathbb {Z} \x&\mapsto 4x.\end{aligned}}}(with different domain) is a different function, even though the formulas defining f and g agree. Similarly, a function with a different codomain is also a different function. Nevertheless, many authors do not specify the domain and codomain, especially if these are clear from context. So in this example many just write f(x) = 4 − x. Sometimes, the maximal possible domain within a larger set implied by context is implicitly understood: a formula such as f ( x ) = x 2 − 5 x + 6 {\displaystyle \textstyle f(x)={\sqrt {x^{2}5x+6}}} may mean that the domain of f is the set of real numbers x where the square root is defined (in this case x ≤ 2 or x ≥ 3). However, in a different context, this expression might refer to a complexvalued function f : R → C {\displaystyle f:\mathbb {R} \to \mathbb {C} } .
Finally, dot notation is occasionally used to specify a function by replacement of the variable of interest in an expression with a dot. For example, a ( ⋅ ) 2 {\displaystyle a(\cdot )^{2}} may stand for x ↦ a x 2 {\displaystyle x\mapsto ax^{2}} , and ∫ a ( ⋅ ) f ( u ) d u {\displaystyle \textstyle \int _{a}^{\,(\cdot )}f(u)du} may stand for the integral function x ↦ ∫ a x f ( u ) d u {\displaystyle \textstyle x\mapsto \int _{a}^{x}f(u)du} .
Specifying a function[edit]
A function can be defined by any mathematical condition relating each argument (input value) to the corresponding output value. If the domain is finite, a function f may be defined by simply tabulating all the arguments x and their corresponding function values f(x). More commonly, a function is defined by a formula, or (more generally) an algorithm — a recipe that tells how to compute the value of f(x) given any x in the domain.
There are many other ways of defining functions. Examples include piecewise definitions, induction or recursion, algebraic or analytic closure, limits, analytic continuation, infinite series, and as solutions to integral and differential equations. The lambda calculus provides a powerful and flexible syntax for defining and combining functions of several variables. In advanced mathematics, some functions exist because of an axiom, such as the Axiom of Choice.
Graph[edit]
The graph of a function is its set of ordered pairs F. This is an abstraction of the idea of a graph as a picture showing the function plotted on a pair of coordinate axes; for example, (3, 9), the point above 3 on the horizontal axis and to the right of 9 on the vertical axis, lies on the graph of y = x2.
Formulas and algorithms[edit]
Different formulas or algorithms may describe the same function. For instance f(x) = (x + 1) (x − 1) is exactly the same function as f(x) = x2 − 1.[6] Furthermore, a function need not be described by a formula, expression, or algorithm, nor need it deal with numbers at all: the domain and codomain of a function may be arbitrary sets. One example of a function that acts on nonnumeric inputs takes English words as inputs and returns the first letter of the input word as output.
As an example, the factorial function is defined on the nonnegative integers and produces a nonnegative integer. It is defined by the following inductive algorithm: 0! is defined to be 1, and n! is defined to be n(n − 1)! for all positive integers n. The factorial function is denoted with the exclamation mark (serving as the symbol of the function) after the variable (postfix notation).
Computability[edit]
Functions that send integers to integers, or finite strings to finite strings, can sometimes be defined by an algorithm, which gives a precise description of a set of steps for computing the output of the function from its input. Functions definable by an algorithm are called computable functions. For example, the Euclidean algorithm gives a precise process to compute the greatest common divisor of two positive integers. Many of the functions studied in the context of number theory are computable.
Fundamental results of computability theory show that there are functions that can be precisely defined but are not computable. Moreover, in the sense of cardinality, almost all functions from the integers to integers are not computable. 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. Thus most functions from integers to integers are not computable. Specific examples of uncomputable functions are known, including the busy beaver function and functions related to the halting problem and other undecidable problems.
Basic properties[edit]
There are a number of general basic properties and notions. In this section, f is a function with domain X and codomain Y.
Image and preimage[edit]
If A is any subset of the domain X, then f(A) is the subset of the codomain Y consisting of all images of elements of A. We say the f(A) is the image of A under f. The image of f is given by f(X). On the other hand, the inverse image (or preimage, complete inverse image) of a subset B of the codomain Y under a function f is the subset of the domain X defined by
f − 1 ( B ) = { x ∈ X : f ( x ) ∈ B } . {\displaystyle f^{1}(B)=\{x\in X:f(x)\in B\}.}So, for example, the preimage of {4, 9} under the squaring function is the set {−3,−2,2,3}. The term range usually refers to the image,[7] but sometimes it refers to the codomain.
By definition of a function, the image of an element x of the domain is always a single element y of the codomain. However, the preimage of a singleton set (a set with exactly one element) may in general contain any number of elements. For example, if f(x) = 7 (the constant function taking value 7), then the preimage of {5} is the empty set but the preimage of {7} is the entire domain. It is customary to write f−1(b) instead of f−1({b}), i.e.
f − 1 ( b ) = { x ∈ X : f ( x ) = b } . {\displaystyle f^{1}(b)=\{x\in X:f(x)=b\}.}This set is sometimes called the fiber of b under f. (This notation is the same as that for the inverse function. However, the inverse function f − 1 : Y → X {\displaystyle f^{1}:Y\to X} of a function f : X → Y {\displaystyle f:X\to Y} is defined if and only if the function is onetoone and onto. See below of the definition of these terms.)
Use of f(A) to denote the image of a subset A ⊆ X is consistent so long as no subset of the domain is also an element of the domain. In some fields (e.g., in set theory, where ordinals are also sets of ordinals) it is convenient or even necessary to distinguish the two concepts; the customary notation is f[A] for the set { f(x): x ∈ A }. Likewise, some authors use square brackets to avoid confusion between the inverse image and the inverse function. Thus they would write f−1[B] and f−1[b] for the preimage of a set and a singleton.
Injective and surjective functions[edit]
A function is called injective (or onetoone; 11) if f(a) ≠ f(b) for any two elements a, b, a ≠ b of the domain. It is called surjective (or onto) if the range is identical to the codomain; that is, f(X) = Y. In other words, every element y in the codomain is mapped to by f from some x in the domain. Finally f is called bijective (or the function is a onetoone correspondence) if it is both injective and surjective. A function that is injective, surjective, or bijective is referred to as an injection, a surjection, or a bijection, respectively. The existence of injections, surjections, or bijections between sets is the key concept defining the relative cardinalities (sizes) of the sets.
"Onetoone" and "onto" are terms that were more common in the older English language literature; "injective", "surjective", and "bijective" were originally coined as French words in the second quarter of the 20th century by the Bourbaki group and imported into English. As a word of caution, "a onetoone function" is one that is injective, while a "onetoone correspondence" refers to a bijective function. Also, the statement "f maps A onto B" differs from "f maps A into B" in that the former implies that f is an onto function (i.e., surjective), while the latter makes no assertion about the nature of the mapping. In more complicated statements the one letter difference can easily be missed. Due to the confusing nature of this older terminology, these terms have declined in popularity relative to the Bourbakian terms.
The above "coloroftheshape" function is not injective, since two distinct shapes (the red triangle and the red rectangle) are assigned the same value. Moreover, it is not surjective, since the image of the function contains only three, but not all five colors in the codomain.
Function composition[edit]
The function composition of two functions takes the output of one function as the input of a second one. More specifically, the composition of f with a function g: Y → Z is the function g ∘ f : X → Z {\displaystyle g\circ f\colon X\rightarrow Z} defined by
( g ∘ f ) ( x ) = g ( f ( x ) ) . {\displaystyle (g\circ f)(x)=g(f(x)).}That is, the value of x is obtained by first applying f to x to obtain y = f(x) and then applying g to y to obtain z = g(y). In the notation g ∘ f {\displaystyle g\circ f} , the function on the right, f, acts first and the function on the left, g acts second, reversing English reading order. The notation can be memorized by reading the notation as "g of f" or "g after f". The composition g ∘ f {\displaystyle g\circ f} is only defined when the codomain of f is the domain of g. Assuming that, the composition in the opposite order f ∘ g {\displaystyle f\circ g} need not be defined. Even if it is, i.e., if the codomain of f is the codomain of g, it is not in general true that
g ∘ f = f ∘ g . {\displaystyle g\circ f=f\circ g.}That is, the order of the composition is important. For example, suppose f(x) = x2 and g(x) = x+1. Then g(f(x)) = x2+1, while f(g(x)) = (x+1)2, which is x2+2x+1, a different function.

A composite function g(f(x)) can be visualized as the combination of two "machines". The first takes input x and outputs f(x). The second takes as input the value f(x) and outputs g(f(x)).

A concrete example of a function composition

Another composition. For example, we have here (g ∘ f )(c) = #.
Identity function[edit]
The unique function over a set X that maps each element to itself is called the identity function for X, and typically denoted by idX. Each set has its own identity function, so the subscript cannot be omitted unless the set can be inferred from context. Under composition, an identity function is "neutral": if f is any function from X to Y, then
f ∘ id X = f , id Y ∘ f = f . {\displaystyle {\begin{aligned}f\circ \operatorname {id} _{X}&=f,\\operatorname {id} _{Y}\circ f&=f.\end{aligned}}}Restrictions and extensions[edit]
Informally, a restriction of a function f is the result of trimming its domain. More precisely, if S is any subset of X, the restriction of f to S is the function fS from S to Y such that fS(s) = f(s) for all s in S. If g is a restriction of f, then it is said that f is an extension of g.
The overriding of f: X → Y by g: W → Y (also called overriding union) is an extension of g denoted as (f ⊕ g): (X ∪ W) → Y. Its graph is the settheoretical union of the graphs of g and fX \ W. Thus, it relates any element of the domain of g to its image under g, and any other element of the domain of f to its image under f. Overriding is an associative operation; it has the empty function as an identity element. If fX ∩ W and gX ∩ W are pointwise equal (e.g., the domains of f and g are disjoint), then the union of f and g is defined and is equal to their overriding union. This definition agrees with the definition of union for binary relations.
Inverse function[edit]
An inverse function for f, denoted by f−1, is a function in the opposite direction, from Y to X, satisfying
f ∘ f − 1 = id Y , f − 1 ∘ f = id X . {\displaystyle f\circ f^{1}=\operatorname {id} _{Y},f^{1}\circ f=\operatorname {id} _{X}.}That is, the two possible compositions of f and f−1 need to be the respective identity maps of X and Y.
As a simple example, if f converts a temperature in degrees Celsius C to degrees Fahrenheit F, the function converting degrees Fahrenheit to degrees Celsius would be a suitable f−1.
f ( C ) = 9 5 C + 32 f − 1 ( F ) = 5 9 ( F − 32 ) {\displaystyle {\begin{aligned}f(C)&={\frac {9}{5}}C+32\f^{1}(F)&={\frac {5}{9}}(F32)\end{aligned}}}Such an inverse function exists if and only if f is bijective. In this case, f is called invertible. The notation g ∘ f {\displaystyle g\circ f} (or, in some texts, just g f {\displaystyle gf} ) and f−1 are akin to multiplication and reciprocal notation. With this analogy, identity functions are like the multiplicative identity, 1, and inverse functions are like reciprocals (hence the notation).
Types of functions[edit]
Realvalued functions[edit]
A realvalued function f is one whose codomain is the set of real numbers or a subset thereof. If, in addition, the domain is also a subset of the reals, f is a real valued function of a real variable. The study of such functions is called real analysis.
Realvalued functions enjoy socalled pointwise operations. That is, given two functions
f, g: X → Ywhere Y is a subset of the reals (and X is an arbitrary set), their (pointwise) sum f+g and product f ⋅ g are functions with the same domain and codomain. They are defined by the formulas:
( f + g ) ( x ) = f ( x ) + g ( x ) , ( f ⋅ g ) ( x ) = f ( x ) ⋅ g ( x ) . {\displaystyle {\begin{aligned}(f+g)(x)&=f(x)+g(x),\(f\cdot g)(x)&=f(x)\cdot g(x).\end{aligned}}}In a similar vein, complex analysis studies functions whose domain and codomain are both the set of complex numbers. In most situations, the domain and codomain are understood from context, and only the relationship between the input and output is given, but if f ( x ) = x {\displaystyle f(x)={\sqrt {x}}} , then in real variables the domain is limited to nonnegative numbers.
The following table contains a few particularly important types of realvalued functions:
Linear function Quadratic function Discontinuous function Trigonometric functions  A quadratic function. 
f(x) = ax + b.  f(x) = ax2 + bx + c. 
 The sine and cosine functions. 
Roughly speaking, a continuous function is one whose graph can be drawn without lifting the pen.  f(x) = sin(x) (red), f(x) = cos(x) (blue) 
Multivariate functions[edit]
A multivariate function is one which takes several inputs.
Further types of functions[edit]
There are many other special classes of functions that are important to particular branches of mathematics, or particular applications. Here is a partial list:
Function spaces[edit]
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 motivated by the fact that, when X and Y are finite and of size X and Y, then the number of functions X → Y is YX = YX. This is an example of the convention from enumerative combinatorics that provides notations for sets based on their cardinalities. If X is infinite and there is more than one element in Y then there are uncountably many functions from X to Y, though only countably many of them can be expressed with a formula or algorithm.
Currying[edit]
An alternative approach to handling functions with multiple arguments is to transform them into a chain of functions that each takes a single argument. For instance, one can interpret Add(3,5) to mean "first produce a function that adds 3 to its argument, and then apply the 'Add 3' function to 5". This transformation is called currying: Add 3 is curry(Add) applied to 3. There is a bijection between the function spaces CA×B and (CB)A.
When working with curried functions it is customary to use prefix notation with function application considered leftassociative, since juxtaposition of multiple arguments—as in (f x y)—naturally maps to evaluation of a curried function. Conversely, the → and ⟼ symbols are considered to be rightassociative, so that curried functions may be defined by a notation such as f: ℤ → ℤ → ℤ = x ⟼ y ⟼ x·y.
Variants and generalizations[edit]
Alternative definition of a function[edit]
The above definition of "a function from X to Y" is generally agreed on,[citation needed] however there are two different ways a "function" is normally defined where the domain X and codomain Y are not explicitly or implicitly specified. Usually this is not a problem as the domain and codomain normally will be known. With one definition saying the function defined by f(x) = x2 on the reals does not completely specify a function as the codomain is not specified, and in the other it is a valid definition.
In the other definition a function is defined as a set of ordered pairs where each first element only occurs once. The domain is the set of all the first elements of a pair and there is no explicit codomain separate from the image.[8][9] Concepts like surjective have to be refined for such functions, more specifically by saying that a (given) function is surjective on a (given) set if its image equals that set. For example, we might say a function f is surjective on the set of real numbers.
If a function is defined as a set of ordered pairs with no specific codomain, then f: X → Y indicates that f is a function whose domain is X and whose image is a subset of Y. This is the case in the ISO standard.[7]Y may be referred to as the codomain but then any set including the image of f is a valid codomain of f. This is also referred to by saying that "f maps X into Y"[7] In some usages X and Y may subset the ordered pairs, e.g. the function f on the real numbers such that y=x2 when used as in f: [0,4] → [0,4] means the function defined only on the interval [0,2]. With the definition of a function as an ordered triple this would always be considered a partial function.
An alternative definition of the composite function g(f(x)) defines it for the set of all x in the domain of f such that f(x) is in the domain of g. Thus the real square root of −x2 is a function only defined at 0 where it has the value 0.
Functions are commonly defined as a type of relation. A relation from X to Y is a set of ordered pairs (x, y) with x ∈ X and y ∈ Y. A function from X to Y can be described as a relation from X to Y that is lefttotal and rightunique. However, when X and Y are not specified there is a disagreement about the definition of a relation that parallels that for functions. Normally a relation is just defined as a set of ordered pairs and a correspondence is defined as a triple (X, Y, F), however the distinction between the two is often blurred or a relation is never referred to without specifying the two sets. The definition of a function as a triple defines a function as a type of correspondence, whereas the definition of a function as a set of ordered pairs defines a function as a type of relation.
Many operations in set theory, such as the power set, have the class of all sets as their domain, and therefore, although they are informally described as functions, they do not fit the settheoretical definition outlined above, because a class is not necessarily a set. However some definitions of relations and functions define them as classes of pairs rather than sets of pairs and therefore do include the power set as a function.[12]
Partial and multivalued functions[edit]
In some parts of mathematics, including recursion theory and functional analysis, it is convenient to study partial functions in which some values of the domain have no association in the graph; i.e., singlevalued relations. For example, the function f such that f(x) = 1/x does not define a value for x = 0, since division by zero is not defined. Hence f is only a partial function from the real line to the real line. The term total function can be used to stress the fact that every element of the domain does appear as the first element of an ordered pair in the graph.
In other parts of mathematics, nonsinglevalued relations are similarly conflated with functions: these are called multivalued functions, with the corresponding term singlevalued function for ordinary functions.
Functions with multiple inputs and outputs[edit]
The concept of function can be extended to an object that takes a combination of two (or more) 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 function that associates two integers to their product: f(x, y) = x·y. This function can be defined formally as having domain ℤ×ℤ, the set of all integer pairs; codomain ℤ; and, for graph, the set of all pairs ((x, y), x·y). Note that the first component of any such pair is itself a pair (of integers), while the second component is a single integer.
The function value of the pair (x, y) is f((x, y)). However, it is customary to drop one set of parentheses and consider f(x, y) a function of two variables, x and y. Functions of two variables may be plotted on the threedimensional Cartesian as ordered triples of the form (x, y, f(x, y)).
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 integer divide function, with domain ℤ×ℕ and codomain ℤ×ℕ. The resultant (quotient, remainder) pair is a single value in the codomain seen as a Cartesian product.
Binary operations[edit]
The familiar binary operations of arithmetic, addition and multiplication, can be viewed as functions from ℝ×ℝ to ℝ. This view is generalized in abstract algebra, where nary 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 +(x, y) and ×(x, y).
Functors[edit]
The idea of structurepreserving functions, or homomorphisms, led to the abstract notion of morphism, the key concept of category theory. In fact, functions f: X → Y are the morphisms in the category of sets, including the empty set: if the domain X is the empty set, then the subset of X × Y describing the function is necessarily empty, too. However, this is still a welldefined function. Such a function is called an empty function. In particular, the identity function of the empty set is defined, a requirement for sets to form a category.
The concept of categorification is an attempt to replace settheoretic notions by categorytheoretic ones. In particular, according to this idea, sets are replaced by categories, while functions between sets are replaced by functors.[13]
History[edit]
See also[edit]
 ^ The words map or mapping, transformation, correspondence, and operator are often used synonymously. Halmos 1970, p. 30.
 ^ MacLane, Saunders; Birkhoff, Garrett (1967). Algebra (First ed.). New York: Macmillan. pp. 1–13.
 ^ Hamilton, A. G. Numbers, sets, and axioms: the apparatus of mathematics. Cambridge University Press. p. 83. ISBN 0521245095.
 ^ Halmos, Paul R. (1958). FiniteDimensional Vector Spaces (PDF). New York: Van Nostrand Company. pp. 21–25. ISBN 0387900934.
 ^ Hartley Rogers, Jr (1987). Theory of Recursive Functions and Effective Computation. MIT Press. pp. 1–2. ISBN 0262680521.
 ^ a b c Quantities and Units  Part 2: Mathematical signs and symbols to be used in the natural sciences and technology, page 15. ISO 800002 (ISO/IEC 20091201)
 ^ Apostol, Tom (1967). Calculus vol 1. John Wiley. p. 53. ISBN 0471000051.
 ^ Heins, Maurice (1968). Complex function theory. Academic Press. p. 4.
 ^ Tarski, Alfred; Givant, Steven (1987). A formalization of set theory without variables. American Mathematical Society. p. 3. ISBN 0821810413.
 ^ John C. Baez; James Dolan (1998). "Categorification". arXiv:math/9802029 .
References[edit]
Further reading[edit]
 Anton, Howard (1980). Calculus with Analytical Geometry. Wiley. ISBN 9780471032489.
 Bartle, Robert G. (1976). The Elements of Real Analysis (2nd ed.). Wiley. ISBN 9780471054641.
 Dubinsky, Ed; Harel, Guershon (1992). The Concept of Function: Aspects of Epistemology and Pedagogy. Mathematical Association of America. ISBN 0883850818.
 Hammack, Richard (2009). "12. Functions" (PDF). Book of Proof. Virginia Commonwealth University. Retrieved 20120801.
 Husch, Lawrence S. (2001). Visual Calculus. University of Tennessee. Retrieved 20070927.
 Katz, Robert (1964). Axiomatic Analysis. D. C. Heath and Company.
 Kleiner, Israel (1989). Evolution of the Function Concept: A Brief Survey. The College Mathematics Journal. 20. Mathematical Association of America. pp. 282–300. doi:10.2307/2686848. JSTOR 2686848.
 Lützen, Jesper (2003). "Between rigor and applications: Developments in the concept of function in mathematical analysis". In Roy Porter, ed. The Cambridge History of Science: The modern physical and mathematical sciences. Cambridge University Press. ISBN 0521571995. An approachable and diverting historical presentation.
 Malik, M. A. (1980). Historical and pedagogical aspects of the definition of function. International Journal of Mathematical Education in Science and Technology. 11. pp. 489–492. doi:10.1080/0020739800110404.
 Reichenbach, Hans (1947) Elements of Symbolic Logic, Dover Publishing Inc., New York NY, ISBN 0486240045.
 Ruthing, D. (1984). Some definitions of the concept of function from Bernoulli, Joh. to Bourbaki, N. Mathematical Intelligencer. 6. pp. 72–77.
 Thomas, George B.; Finney, Ross L. (1995). Calculus and Analytic Geometry (9th ed.). AddisonWesley. ISBN 9780201531749.
External links[edit]
Wikimedia Commons has media related to Functions. 
Comments
Tamorojefisave
17052017 22:26 Comments
My proTrump argument is that you have to spend 4 years earnestly writing about Trump while I get to tune out and enjoy life.
Gedigulavov
18052017 20:30 Comments
Lunch and Learn with first grade to learn about The Writing Strategies Book!
Tehagijexegu
31052017 19:44 Comments
Learn about courage and writing this Sat 5/27 at 10 am for the Library"s Free Writing Workshop!
Poxixeyofosiko
27062017 06:42 Comments
Just interviewed a black girl that was the star of one of the HS baseball teams here. When I say I"m hype about writing this story.
Rilozupoma
12072017 09:22 Comments
I am planning to write a about things I never said to you.
Yujagexeveno
03082017 02:54 Comments
Check out this helpful post about the proper use of articles from Highline Writing Center!
Yamoyicekoboc
19082017 07:59 Comments
Yes your right nothing right about it. And having Steven Miller writing it is even worse
Cemiroximiqu
10092017 01:29 Comments
I am not excited about the amount of errands I have to run and writing this personal essay.
Dexadodolowel
26092017 13:40 Comments
We do  ZERO evidence keeps busy writing stories about memos no one has seen phone calls that were bugged etc.
Gehoyofazodit
14102017 04:43 Comments
Working on overcoming self doubt, negative thinking, procrastination and toxic relationships. Writing about it as well.
Dotefete
06112017 12:54 Comments
SO fun + learning more about !! Also: Congrats on being 1st chapter !