The Mathematical Definition of Function

Posted 2011/05/20

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:

I will use two running examples throughout this discussion:

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 ${f}$ is a mathematical object which determines and is completely determined bythe following data:

The operation of finding ${f(a)}$ given ${f}$ and ${a}$ is called evaluation.

Examples

Comment: The formula above that defines the function $G$ 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

Example: Graph of a function defined by a formula

The graph of the function ${G}$ given above has the functional property. The graph is the set

$\displaystyle \left\{ (x,{{x}^{2}}+2x+5)\,\mathsf{|}\,x\in {\mathbb R} \right\}.$

If you repeatedly plug in one real number over and over, you get out the same real number every time. Example:

This set has the functional property because if ${x}$ is any real number, the formula ${{{x}^{2}}+2x+5}$ defines a specific real number. (This description of the graph implicitly assumes that ${\text{dom } G={\mathbb R}}$.)  No other pair whose first coordinate is ${-2}$ is in the graph of ${G}$, only ${(-2, 5)}$. That is because when you plug ${-2}$ into the formula ${{{x}^{2}}+2x+5}$, you get ${5}$ every time. Of course, ${(0, 5)}$ is in the graph, but that does not contradict the functional property. ${(0, 5)}$ and ${(-2, 5)}$ 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 “${G(x)}$” for any ${x }$ in the domain of ${G}$ and not be ambiguous.

Mathematical definition of function

A function${f}$ is a mathematical structure consisting of the following objects:

Examples

According to the definition of function, ${F}$, ${G}$ and ${H}$ are three different functions.

Identity and inclusion

Suppose we have two sets A and B with ${A\subseteq B}$.

Remark The identity function and an inclusion function for the same set A have exactly the same graph, namely ${\left\{ (a,a)|a\in A \right\}}$.

Graphs and functions

Examples

The set ${\{(1,2), (2,4), (3,2), (5,8)\}}$ has the functional property, so it is the graph of a function. Call the function ${H}$. Then its domain is ${\{1,2,3,5\}}$ and ${H(1) = 2}$ and ${H(2) = 4}$. ${H(4)}$ is not defined because there is no ordered pair in H beginning with ${4}$ (hence ${4}$ is not in ${\text{dom } H}$.)

I showed above that the graph of the function ${G}$, ordinarily described as “the function ${G(x)={{x}^{2}}+2x+5}$”, 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 ${G}$ may be denoted by ${\Gamma(G)}$.  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, ${G=\Gamma(G)}$, 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.