Introduction
This post is a completely rewritten version of the abstractmath article on the definition of function. Like every part of abstractmath, the chapter on functions is designed to get you started thinking about functions. It is no way complete. Wikipedia has much more complete coverage of mathematical functions, but be aware that the coverage is scattered over many articles.
The concept of function in mathematics is as important as any mathematical idea. The mathematician’s concept of function includes the kinds of functions you studied in calculus but is much more abstract and general. If you are new to abstract math you need to know:
- The precise meaning of the word “function” and other concepts associated with functions. That’s what this section is about.
- Notation and terminology for functions. (That will be a separate section of abstractmath.org which I will post soon.)
- The many different kinds of functions there are. (See Examples of Functions in abmath).
- The many ways mathematicians think about functions. The abmath article Images and Metaphors for Functions is a stub for this.
I will use two running examples throughout this discussion:
is the function defined on the set
as follows:
. This is a function defined on a finite set by explicitly naming each value.
is the real-valued function defined by the formula
.
Specification of function
We start by giving a specification of “function”. (See the abstractmath article on specification.) After that, we get into the technicalities of the definitions of the general concept of function.
Specification: A function is a mathematical object which determines and is completely determined bythe following data:
has a domain, which is a set. The domain may be denoted by
.
has a codomain, which is also a set and may be denoted by
.
- For each element
of the domain of
,
has a value at
, denoted by
.
- The value of
at
is completely determined by
and
.
- The value of
at
must be an element of the codomain of
.
The operation of finding given
and
is called evaluation.
Examples
- The definition above of the finite function
specifies that the domain is the set
. The value of
at each element of the domain is given explicitly. The value at 3, for example, is 2, because the definition says that
. The codomain of
is not specified, but must include the set
.
- The definition of
above gives the value at each element of the domain by a formula. The value at 3, for example, is
. The definition does not specify the domain or the codomain. The convention in the case of functions defined on the real numbers by a formula is to take the domain to be all real numbers at which the formula is defined. In this case, that is every real number, so the domain is
. The codomain must include all real numbers greater than or equal to 4. (Why?)
Comment: The formula above that defines the function in fact defines a function of complex numbers (even quaternions).
Definition of function
In the nineteenth century, mathematicians realized that it was necessary for some purposes (particularly harmonic analysis) to give a mathematical definition of the concept of function. A stricter version of this definition turned out to be necessary in algebraic topology and other fields, and that is the one I give here.
To state this definition we need a preliminary idea.
The functional property
A set R of ordered pairs has the functional property if two pairs in R with the same first coordinate have to have the same second coordinate (which means they are the same pair).
Examples
- The set
has the functional property, since no two different pairs have the same first coordinate. It is true that two of them have the same second coordinate, but that is irrelevant.
- The set
does not have the functional property. There are two different pairs with first coordinate 2.
- The graphs of functions in beginning calculus have the functional property.
- The empty set
has the functional property .
Example: Graph of a function defined by a formula
The graph of the function given above has the functional property. The graph is the set
If you repeatedly plug in one real number over and over, you get out the same real number every time. Example:
- if
, then
. You get 5 every time you plug in 0.
- if
, then
.
- if
, then
.
This set has the functional property because if is any real number, the formula
defines a specific real number. (This description of the graph implicitly assumes that
.) No other pair whose first coordinate is
is in the graph of
, only
. That is because when you plug
into the formula
, you get
every time. Of course,
is in the graph, but that does not contradict the functional property.
and
have the same second coordinate, but that is OK.
How to think about the functional property
The point of the functional property is that for any pair in the set of ordered pairs, the first coordinate determines what the second one is. That’s why you can write “” for any
in the domain of
and not be ambiguous.
Mathematical definition of function
A function is a mathematical structure consisting of the following objects:
- A set called the domain of
, denoted by
.
- A set called the codomain of
, denoted by
.
- A set of ordered pairs called the graph of
, with the following properties:
is the set of all first coordinates of pairs in the graph of
.
- Every second coordinate of a pair in the graph of
is in
(but
may contain other elements).
- The graph of
has the functional property. Using arrow notation, this implies that
.
Examples
- Let
have graph
and define
and
. Then
is a function.
- Let
have graph
(same as above), and define
and
. Then
is a (admittedly ridiculous) function. Note that all the second coordinates of the graph are in
, along with a bunch of miscellaneous suspicious characters that are not second coordinates of pairs in the graph.
- Let
have graph
. Then
is a function.
According to the definition of function, ,
and
are three different functions.
Identity and inclusion
Suppose we have two sets A and B with .
- The identity function on A is the function
defined by
for all
. (Many authors call it
).
- The inclusion function from A to B is the function
defined by
for all
. Note that there is a different function for each pair of sets A and B for which
. Some authors call it
or
.
Remark The identity function and an inclusion function for the same set A have exactly the same graph, namely .
Graphs and functions
- If
is a function, the domain of
is the set of first coordinates of all the pairs in
.
- If
, then
is the second coordinate of the only ordered pair in
whose first coordinate is
.
Examples
The set has the functional property, so it is the graph of a function. Call the function
. Then its domain is
and
and
.
is not defined because there is no ordered pair in H beginning with
(hence
is not in
.)
I showed above that the graph of the function , ordinarily described as “the function
”, has the functional property. The specification of function requires that we say what the domain is and what the value is at each point. These two facts are determined by the graph.
Other definitions of function
Because of the examples above, many authors define a function as a graph with the functional property. Now, the graph of a function may be denoted by
. This is an older, less strict definition of function that doesn’t work correctly with the concepts of algebraic topology, category theory, and some other branches of mathematics.
For this less strict definition of function, , which causes a clash of our mental images of “graph” and “function”. In every important way except the less-strict definition, they ARE different!
A definition is a device for making the meaning of math technical terms precise. When a mathematician think of “function” they think of many aspects of functions, such as a map of one shape into another, a graph in the real plane, a computational process, a renaming, and so on. One of the ways of thinking of a function is to think about its graph. That happens to be the best way to define the concept of function. (It is the less strict definition and it is a necessary concept in the modern definition given here.)
The occurrence of the graph in either definition doesn’t make thinking of a function in terms of its graph the most important way of visualizing it. I don’t think it is even in the top three.
Send to Kindle

