# Definition of function

Note: This is a revision of the article on specification and definition of functions from abstractmath.org. Many of the links in this article take you to other articles in abstractmath.org.

 A function is a mathematical object.

To deal with functions as a math object, you need a precise definition of “function”. That is what this article gives you.

• The article starts by giving a specification of “function”.
• After that, we get into the technicalities of the
definitions of the general concept of function.
• Things get complicated because there are several inequivalent definitions of “function” in common use.

## Specification of “function”

A function $f$ is a mathematical object which determines and is completely determined by the following data:

• (DOM) $f$ has a domain, which is a set. The domain may be denoted by $\text{dom} f$.
• (COD) $f$ has a codomain, which is also a set and may be denoted by $\text{cod} f$.
• (VAL) For each element $a$ of the domain of $f$, $f$ has a value at $a$.
• (FP) The value of $f$ at $a$ is
completely determined by $a$ and $f$.
• (VIC) The value of $f$ at $a$ must be an element of the codomain of $f$.

• The value of $f$ at $a$ is most cohttp://www.abstractmath.org/MM/MMonly written $f(a)$, but see Functions: Notation and Terminology.
• To evaluate $f$ at $a$ means to determine $f(a)$. The two examples of functions below show that different functions may have different strategies for evaluating them.
• In the expression “$f(a)$”, $a$ is called the input or (old-fashioned) argument of $f$.
• “FP” means functional property.
• “VIC” means “value in codomain”.

### Examples

I give two examples here. The examples of functions chapter contains many other examples.

#### A finite function

Let $F$ be the function defined on the set $\left\{\text{a},\text{b},\text{c},\text{d}\right\}$ as follows: $F(\text{a})=\text{a},\,\,\,F(\text{b})=\text{c},\,\,\,F(\text{c})=\text{c},\,\,\,F(\text{d})=\text{b}$In this definition, $\text{a},\text{b},\text{c},\text{d}$ are letters of the alphabet, not variables. This is the function called “Finite” in the chapter on examples of functions.

• The definition of $F$ says “$F$ is defined on the set $\left\{\text{a},\,\text{b},\,\text{c},\,\text{d} \right\}$”. The phrase “is defined on”
means that the domain is that set. That is standard terminology.
• The value of $F$ at each element of the domain is given explicitly. The value at
$\text{b}$, for example, is $\text{c}$, because the definition says that $F(\text{b}) = \text{c}$. No other reason needs to be given. Mathematical definitions can be arbitrary.
• The codomain of $F$ is not specified, but must include the set $\{\text{a},\text{b},\text{c}\}$. The codomain of a function is often not specified when it is not important, which is most of the time in freshman calculus (for example).
• The diagram below shows how $F$ obeys the rule that the value of an element $x$ in the domain is completely determined by $x$ and $F$.
• If two arrows had started from the same element of the domain, then $F$ would not be a function. (It would be a multivalued function).
• If there were an element of the domain that no arrow started from, it $F$ would not be a function. (It would be a partial function.)
• In this example, to evaluate $F$ at $b$ (to determine the value of $F$ at $b$) means to look at the definition of $F$, which says among other things that the value is $c$ (or alternatively, look at the diagram above and see what letter the arrow starting at $b$ points to). In this case, “evaluation” does not imply calculating a formula.

#### A real-valued function

Let $G$ be the real-valued function defined by the formula $G(x)={{x}^{2}}+2x+5$.

• The definition of $G$ gives the value at each element of the domain by a formula. The value at $3$, for example, is obtained by calculating $G(3)=3^2+2\cdot3+5=20$
• The definition of $G$
does not specify the domain. 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 $\mathbb{R}$.
• The definition of $G$ does not specify the codomain, either. However, the codomain must include all real numbers greater than or equal to $4$. (Why?)
• So if an author wrote, “Let $H(x)=\frac{1}{x}$”, the domain would be the set of all real numbers except $0$. But a careful author would write, “Let $H(x)=\frac{1}{x}$ ($x\neq0$).”

### What the specification means

• The specification guarantees that a function satisfies all five of the properties listed.
• The specification does not define a mathematical structure in the way mathematical structures have been defined in the past: In particular, it does not require a function to be one or more sets with structure.
• Even so, it is useful to have the specification, because:

 Many mathematical definitions introduce extraneous technical elements which clutter up your thinking about the object they define.

## History

The discussion below is an over­simpli­fication of the history of mathe­matics, which many people have written thick books about. A book relevant to these ideas is Plato’s Ghost, by Jeremy Gray.

Until late in the nineteenth century, functions were usually thought of as defined by formulas (including infinite series). Problems arose in the theory of harmonic analysis which made mathematicians require a more general notion of function. They came up with the concept of function as a set of ordered pairs with the functional property (discussed below), and that understanding revolutionized our understanding of math.

In particular, this definition, along with the use of set theory, enabled abstract math (ahem) to become a cohttp://www.abstractmath.org/MM/MMon tool for understanding math and proving theorems. It is conceivable that some readers may wish it hadn’t. Well, tough.

The modern definition of function given here (which builds on the ordered pairs with functional property definition) came into use beginning in the 1950’s. The modern definition became necessary in algebraic topology and is widely used in many fields today.

The concept of function as a formula never disappeared entirely, but was studied mostly by logicians who generalized it to the study of function-as-algorithm. Of course, the study of algorithms is one of the central topics of modern computing science, so the notion of function-as-formula (updated to function-as-algorithm) has achieved a new importance in recent years.

To state both the definition, we need a preliminary idea.

## The functional property

A set $P$ of ordered pairs has the functional property if two pairs in $P$ with the same first coordinate have to have the same second coordinate (which means they are the same pair). In other words, if $(x,a)$ and $(x,b)$ are both in $P$, then $a=b$.

#### 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 (which is just what requirement FP says in the specification). That’s why you can write “$G(x)$” for any $x$ in the domain of $G$ and not be ambiguous.

#### Examples

• The set $\{(1,2), (2,4), (3,2), (5,8)\}$ has the functional property, since no two different pairs have the same first coordinate. Note that there are two different pairs with the same second coordinate. This is irrelevant to the functional property.
• The set $\{(1,2), (2,4), (3,2), (2,8)\}$ does not have the functional property. There are two different pairs with first coordinate 2.
• The empty set $\emptyset$ has the function property vacuously.

#### Example: graph of a function defined by a formula

In calculus books, a picture like this one (of part of $y=x^2+2x+5$) is called a graph. Here I use the word “graph” to denote the set of ordered pairs
$\left\{ (x,{{x}^{2}}+2x+5)\,\mathsf{|}\,x\in \mathbb{R } \right\}$
which is a mathematical object rather than some ink on a page or pixels on a screen.

The graph of any function studied in beginning calculus has the functional property. For example, the set of ordered pairs above has the functional property because if $x$ is any real number, the formula ${{x}^{2}}+2x+5$ defines a specific real number.

• if $x = 0$, then ${{x}^{2}}+2x+5=5$, so the pair $(0, 5)$ is an element of the graph of $G$. Each time you plug in $0$ in the formula you get 5.
• if $x = 1$, then ${{x}^{2}}+2x+5=8$.
• if $x = -2$, then ${{x}^{2}}+2x+5=5$.

You can measure where the point $\{-2,5\}$ is on the (picture of) the graph and see that it is on the blue curve as it should be. 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$ and nothing else. 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.

## Mathematical definition of function

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

• A set called the domain of $f$, denoted by $\text{dom} f$.
• A set called the codomain of $f$, denoted by $\text{cod} f$.
• A set of ordered pairs called the graph of $f$, with the following properties:
• $\text{dom} f$ \text{dom} fis the set of all first coordinates of pairs in the graph of $f$.
• Every second coordinate of a pair in the graph of $f$ is in $\text{cod} f$ (but $\text{cod} f$ may contain other elements).
• The graph of $f$ has the functional property.

Using arrow notation, this implies that $f:\text{dom}f\to\text{cod} f$.

#### Remark

The main difference between the specification of function given previously and this definition is that the definition replaces the statement “$f$ has a value at $a$” by introducing a set of ordered pairs (the graph) with the functional property.

• This set of ordered pairs is extra structure introduced by the definition mainly in order to make the definition a classical sets-with-structure.
• This makes the graph, which should be a concept derived from the concept of function, appear to be a necessary part of the function.
• That suggests incorrectly that the graph is more of a primary intuition that other intuitions such as function as map, function as transformer, and other points of view discussed in the article Images and meta­phors for functions.
• The concept of graph of a function is indeed an important intuition, and is discussed with examples in the articles Graphs of continuous functions and Graphs of finite functions.
• Nevertheless, the fact that the concept of graph appears in the definition of function does not make it the most important intuition.

### Examples

• Let $F$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$ and define $A = \{1, 2, 3, 5\}$ and $B = \{2, 4, 8\}$. Then $F:A\to B$ is a function. In speaking, we would usually say, “$F$ is a function from $A$ to $B$.”
• Let $G$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$ (same as above), and define $A = \{1, 2, 3, 5\}$ and $C = \{2, 4, 8, 9, 11, \pi, 3/2\}$. Then $G:A\to C$ is a (admittedly ridiculous) function. Note that all the second coordinates of the graph are in the codomain $C$, along with a bunch of miscellaneous suspicious characters that are not second coordinates of pairs in the graph.
• Let $H$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$. Then $H:A\to \mathbb{R}$ is a function, since $2$, $4$ and $8$ are all real numbers.
• Let $D = \{1, 2, 5\}$ and $E = \{1, 2, 3, 4, 5\}$. Then there is no function $D\to A$ and no function $E\to A$ with graph $\{(1,2), (2,4), (3,2), (5,8)\}$. Neither $D$ nor $E$ has exactly the same elements as the first coordinates of the graph.

### Identity and inclusion

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

• The identity function on A is the function ${{\operatorname{id}}_{A}}:A\to A$ defined by ${{\operatorname{id}}_{A}}(x)=x$ for all $x\in A$. (Many authors call it ${{1}_{A}}$).
• When $A\subseteq B$, the inclusion function from $A$ to $B$ is the function $i:A\to B$ defined by $i(x)=x$ for all $x\in A$. Note that there is a different function for each pair of sets $A$ and $B$ for which $A\subseteq B$. Some authors call it ${{i}_{A,\,B}}$ or $\text{in}{{\text{c}}_{A,\,B}}$.

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\}$. More about this below.

## Other definitions of function

### Original abstract definition of function

#### Definition

• A function $f$ is a set of ordered pairs with the functional property.
• If $f$ is a function according to this definition, the domain of $f$ is the set of first coordinates of all the pairs in $f$.
• If $x\in \text{dom} f$, then we define the value of $f$ at $x$, denoted by $f(x)$, to be the second coordinate of the only ordered pair in $f$ whose first coordinate is $x$.

#### Remarks

• This definition is still widely used in mathematical writing.
• Many authors do not tell you which definition they are using.
• For many purposes (including freshman calculus for the most part) it does not matter which definition is used.
• In some branches of math, the modern definition adds great clarity to many complicated situations; using the older definition can even make it difficult to describe some important constructions. There is more about this in New Approaches below.

#### Possible confusion

Some confusion can result because of the presence of these two different definitions.

• For example, since the identity function ${{\operatorname{id}}_{A}}:A\to A$ and the inclusion function ${{i}_{A,\,B}}:A\to B$ have the same graph, users of the older definition are required in theory to say they are the same function.
• Also it requires you to say that the graph of a function is the same thing as the function.
• In my observation, this does not make a problem in practice, unless there is a very picky person in the room.
• It also appears to me that the modern definition is (quite rightly) winning and the original abstract definition is disappearing.

### Multivalued function

The phrase multivalued function refers to an object that is like a function $f:S\to T$ except that for $s\in S$, $f(s)$ may denote more than one value.

#### Examples

• Multivalued functions arose in considering complex functions. In cohttp://www.abstractmath.org/MM/MMon practice, the symbol $\sqrt{4}$ denoted $2$, although $-2$ is also a square root of $4$. But in complex function theory, the square root function takes on both the values $2$ and $-2$. This is discussed in detail in Wikipedia.
• The antiderivative is an example of a multivalued operator. For any constant $C$, $\frac{x^3}{3}+C$ is an antiderivative of $x^2$, so that $\frac{x^3}{3}$, $\frac{x^3}{3}+42$, $\frac{x^3}{3}-1$ and $\frac{x^3}{3}+2\pi$ are among the infinitely many antiderivatives of $x^2$.

A multivalued function $f:S\to T$ can be modeled as a function with domain $S$ and codomain the set of all subsets of $T$. The two meanings are equivalent in a strong sense (naturally equivalent). Even so, it seems to me that they represent two differ­ent ways of thinking about
multivalued functions. (“The value may be any of these things…” as opposed to “The value is this whole set of things.”)

Some older mathematical papers in com­plex func­tion theory do not tell you that their functions are multi­valued. There was a time when com­plex func­tion theory was such a Big Deal in research mathe­matics that the phrase “func­tion theory” meant complex func­tion theory and every mathe­ma­tician with a Ph. D. knew that complex functions were multi­valued.

### Partial function

A partial function $f:S\to T$ is just like a function except that its input may be defined on only a subset of $S$. For example, the function $f(x):=\frac{1}{x}$ is a partial function from the real numbers to the real numbers.

This models the behavior of computer programs (algorithms): if you consider a program with one input and one output as a function, it may not be defined on some inputs because for them it runs forever (or gives an error message).

In some texts in computing science and mathematical logic, a function is by
convention a partial function, and this fact may not be mentioned explicitly, especially in research papers.

The phrases “multivalued function” and “partial function” upset some picky types who say things like, “But a multi­valued func­tion is not a func­tion!”. A hot dog is not a dog, either. I once had a Russian teacher who was Polish and a German teacher who was Hungarian. So what? See the Hand­book (click on
radial category).

## New approaches to functions

All the definitions of function given here produce mathematical structures, using the traditional way to define mathematical objects in terms of sets. Such definitions have disadvantages.

Mathematicians have many ways to think about functions. That a function is a set of ordered pairs with a certain property (functional) and possibly some ancillary ideas (domain, codomain, and others) is not the way we usually think about them$\ldots$Except when we need to reduce the thing we are studying to its absolutely most abstract form to make sure our proofs are correct.
That most abstract form is what I have called the rigorous view or the dry bones and it is when that reasoning is needed that the sets-with-structure approach has succeeded.

Our practice of abstraction has led us to new approaches to talking about functions. The most important one currently is category theory. Roughly, a category is a bunch of objects together with some arrows going between them that can be composed head to tail. Functions between sets are examples of this: the sets are the objects and the functions the arrows. But arrows in a category do not have to be functions; in that way category theory is an abstraction of functions.

This abstracts the idea of function in a way that brings out common ideas in various branches of math. Research papers in many branches of mathematics now routinely use the language of category theory. Categories now appear in some undergraduate math courses, meaning that Someone needs to write a chapter on category theory for abstractmath.org.

Besides category theory, computing scientists have come up with other abstract ways of dealing with functions, for example type theory. It has not come as far along as category theory, but has shown recent signs of major progress.

Both category theory and type theory define math objects in terms of their effect on and relationship with other math objects. This makes it possible to do abstract math entirely without using sets-with-structure as a means of defining concepts.

## References

• Functions in Wikipedia. This is an extensive and mostly well-done description of the use of functions in mathematics.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Send to Kindle

# Representations of functions III

## Introduction to this post

I am writing a new abstractmath chapter called Representations of Functions. It will replace some of the material in the chapter Functions: Images, Metaphors and Representations. This post is a draft of the sections on representations of finite functions.

The diagrams in this post were created using the Mathematica Notebook Constructions for cographs and endographs of finite functions.nb.
You can access this notebook if you have Mathematica, which can be bought, but is available for free for faculty and students at many universities, or with Mathematica CDF Player, which is free for anyone and runs on Windows, Mac and Linux.

Like everything in abstractmath.org, the notebooks are covered by a Creative Commons ShareAlike 3.0 License.

## Graphs of finite functions

When a function is continuous, its graph shows up as a curve in the plane or as a curve or surface in 3D space. When a function is defined on a set without any notion of continuity (for example a finite set), the graph is just a set of ordered pairs and does not tell you much.

A finite function $f:S\to T$ may be represented in these ways:

• Its graph $\{(s,f(s))|s\in S\}$. This is graph as a mathematical object, not as a drawing or as a directed graph — see graph (two meanings)).
• A table, rule or two-line notation. (All three of these are based on the same idea, but differ in presentation and are used in different mathematical specialties.)
• By using labels with arrows between them, arranged in one of two ways:
• A cograph, in which the domain and the codomain are listed separately.
• An endograph, in which the elements of the domain and the codomain are all listed together without repetition.

All these techniques can also be used to show finite portions of infinite discrete functions, but that possibility will not be discussed here.

### Introductory Example

Let $\text{f}:\{a,b,c,d,e\}\to\{a,b,c,d\}$ be the function defined by requiring that $f(a)=c$, $f(b)=a$, $f(c)=c$, $f(d)=b$, and $f(e)=d$.

#### Graph

The graph of $f$ is the set
$(a,c),(b,a),(c,c),(d,b),(e,d)$
As with any set, the order in which the pairs are listed is irrelevant. Also, the letters $a$, $b$, $c$, $d$ and $e$ are merely letters. They are not variables.

#### Table

$\text{f}$ is given by this table:

This sort of table is the format used in databases. For example, a table in a database might show the department each employee of a company works in:

#### Rule

The rule determined by the finite function $f$ has the form

$(a\mapsto b,b\mapsto a,c\mapsto c,d\mapsto b,e\mapsto d)$

Rules are built in to Mathematica and are useful in many situations. In particular, the endographs in this article are created using rules. In Mathematica, however, rules are written like this:

$(a\to b,b\to a,c\to c,d\to b,e\to d)$

This is inconsistent with the usual math usage (see barred arrow notation) but on the other hand is easier to enter in Mathematica.

In fact, Mathematica uses very short arrows in their notation for rules, shorter than the ones used for the arrow notation for functions. Those extra short arrows don’t seems to exist in TeX.

#### Two-line notation

Two-line notation is a kind of horizontal table.

$\begin{pmatrix} a&b&c&d&e\\c&a&c&b&d\end{pmatrix}$

The three notations table, rule and two-line do the same thing: If $n$ is in the domain, $f(n)$ is shown adjacent to $n$ — to its right for the table and the rule and below it for the two-line.

Note that in contrast to the table, rule and two-line notation, in a cograph each element of the codomain is shown only once, even if the function is not injective.

#### Cograph

To make the cograph of a finite function, you list the domain and codomain in separate parallel rows or columns (even if the domain and codomain are the same set), and draw an arrow from each $n$ in the domain to $f(n)$ in the codomain.

This is the cograph for $\text{f}$, represented in columns

and in rows (note that $c$ occurs only once in the codomain)

Pretty ugly, but the cograph for finite functions does have its uses, as for example in the Wikipedia article composition of functions.

In both the two-line notation and in cographs displayed vertically, the function goes down from the domain to the codomain. I guess functions obey the law of gravity.

##### Rearrange the cograph

There is no expectation that in the cograph $f(n)$ will be adjacent to $n$. But in most cases you can rearrange both the domain and the codomain so that some of the structure of the function is made clearer; for example:

The domain and codomain of a finite function can be rearranged in any way you want because finite functions are not continuous functions. This means that the locations of points $x_1$ and $x_2$ have nothing to do with the locations of $f(x_1)$ and $f(x_2)$: The domain and codomain are discrete.

#### Endograph

The endograph of a function $f:S\to T$ contains one node labeled $s$ for each $s\in S\cup T$, and an arrow from $s$ to $s’$ if $f(s)=s’$. Below is the endograph for $\text{f}$.

The endograph shows you immediately that $\text{f}$ is not a permutation. You can also see that with whatever letter you start with, you will end up at $c$ and continue looping at $c$ forever. You could have figured this out from the cograph (especially the rearranged cograph above), but it is not immediately obvious in the cograph the way it in the endograph.

There are more examples of endographs below and in the blog post
A tiny step towards killing string-based math. Calculus-type functions can also be shown using endographs and cographs: See Mapping Diagrams from A(lgebra) B(asics) to C(alculus) and D(ifferential) E(quation)s, by Martin Flashman, and my blog posts Endographs and cographs of real functions and Demos for graph and cograph of calculus functions.

### Example: A permutation

Suppose $p$ is the permutation of the set $\{0,1,2,3,4,5,6,7,8,9\}$given in two-line form by
$\begin{pmatrix} 0&1&2&3&4&5&6&7&8&9\\0&2&1&4&5&3&7&8&9&6\end{pmatrix}$

#### Endograph

Again, the endograph shows the structure of the function much more clearly than the cograph does.

The endograph consists of four separate parts (called components) not connected with each other. Each part shows that repeated application of the function runs around a kind of loop; such a thing is called a cycle. Every permutation of a finite set consists of disjoint cycles as in this example.

#### Disjoint cycle notation

Any permutation of a finite set can be represented in disjoint cycle notation: The function $p$ is represented by:

$(0)(1,2)(3,4,5)(6,7,8,9)$

Given the disjoint cycle notation, the function can be determined as follows: For a given entry $n$, $p(n)$ is the next entry in the notation, if there is a next entry (instead of a parenthesis). If there is not a next entry, $p(n)$ is the first entry in the cycle that $n$ is in. For example, $p(7)=8$ because $8$ is the next entry after $7$, but $p(5)=3$ because the next symbol after $5$ is a parenthesis and $3$ is the first entry in the same cycle.

The disjoint cycle notation is not unique for a given permutation. All the following notations determine the same function $p$:

$(0)(1,2)(4,5,3)(6,7,8,9)$
$(0)(1,2)(8,9,6,7)(3,4,5)$
$(1,2)(3,4,5)(0)(6,7,8,9)$
$(2,1)(5,3,4)(9,6,7,8)$
$(5,3,4)(1,2)(6,7,8,9)$

Cycles such as $(0)$ that contain only one element are usually omitted in this notation.

### Example: A tree

Below is the endograph of a function $t:\{0,1,2,3,4,5,6,7,8,9\}\to\{0,1,2,3,4,5,6,7,8,9\}$

This endograph is a tree. The graph of a function $f$ is a tree if the domain has a particular element $r$ called the root with the properties that

• $f(r)=r$, and
• starting at any element of the domain, repreatedly applying $f$ eventually produces $r$.

In the case of $t$, the root is $4$. Note that $t(4)=4$, $t(t(7))=4$, $t(t(t(9)))=4$, $t(1)=4$, and so on.

The endograph

shown here is also a tree.

See the Wikipedia article on trees for the usual definition of tree as a special kind of graph. For reading this article, the definition given in the previous paragraph is sufficient.

### The general form of a finite function

This is the endograph of a function $t$ on a $17$-element set:

It has two components. The upper one contains one $2$-cycle, and no matter where you start in that component, when you apply $t$ over and over you wind up flipping back and forth in the $2$-cycle forever. The lower component has a $3$-cycle with a similar property.

This illustrates a general fact about finite functions:

• The endograph of any finite function contains one or more components $C_1$ through $C_k$.
• Each component $C_k$ contains exactly one $n_k$ cycle, for some integer $n_k\geq 1$, to which are attached zero or more trees.
• Each tree in $C_k$ is attached in such a way that its root is on the unique cycle contained in $C_k$.

In the example above, the top component has three trees attached to it, two to $3$ and one to $4$. (This tree does not illustrate the fact that an element of one of the cycles does not have to have any trees attached to it).

You can check your understanding of finite functions by thinking about the following two theorems:

• A permutation is a finite function with the property that its cycles have no trees attached to them.
• A tree is a finite function that has exactly one component whose cycle is a $1$-cycle.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Send to Kindle

# Representations of functions II

## Introduction to this post

I am writing a new abstractmath chapter called Representations of Functions. It will replace some of the material in the chapter Functions: Images, Metaphors and Representations.

This post includes a draft of the introduction to the entire new chapter (immediately below) and of the sections on graphs of continuous functions of one variable with values in the plane and in 3-space. Later posts will concern multivariable continuous functions and finite discrete functions.

## Introduction to the new Chapter

Functions can be represented visually in many different ways. There is a sharp difference between representing continuous functions and representing discrete functions.

For a continuous function $f$, $f(x)$ and $f(x’)$ tend to be close together when $x$ and $x’$ are close together. That means you can represent the values at an infinite number of points by exhibiting them for a bunch of close-together points. Your brain will automatically interpret the points nearby that are not represented.

Nothing like this works for discrete functions. Many different arrangements of the inputs and outputs can be made. Different arrangements may be useful for representing different properties of the function.

### Illustrations

The illustrations were created using these Mathematica Notebooks:

These notebooks contain many more examples of the ways functions can be represented than are given in this article. The notebooks also contain some manipulable diagrams which may help you understand the diagrams. In addition, all the 3D diagrams can be rotated using the cursor to get different viewpoints. You can access these tools if you have Mathematica, which is available for free for faculty and students at many universities, or with Mathematica CDF Player, which runs on Windows, Mac and Linux.

Like everything in abstractmath.org, the notebooks are covered by a Creative Commons ShareAlike 3.0 License.

## Functions from a subset of $\mathbb{R}$ to $\mathbb{R}\times\mathbb{R}$

Suppose $F:\mathbb{R}\to\mathbb{R}\times\mathbb{R}$. That means you put in one number and get out a pair of numbers.

### The unit circle

An example is the unit circle, which is the graph of the function $t\mapsto(\cos t,\sin t)$. That has this parametric plot:

Because $\cos^2 t+\sin^2 t=1$, every real number $t$ produces a point on the unit circle. Four point are shown. For example,$(\cos\pi,\,\sin\pi)=(-1,0)$ and
$(\cos(5\pi/3),\,\sin(5\pi/3))=(\frac{1}{2},\frac{\sqrt3}{2})\approx(.5,.866)$

#### $t$ as time

In graphing functions $f:\mathbb{R}\to\mathbb{R}$, the plot is in two dimensions and consists of the points $(x,f(x))$: the input and the output. The parametric plot shown above for $t\mapsto(\cos^2 t+\sin^2)$ shows only the output points $(\cos t,\sin t)$; $t$ is not plotted on the graph at all. So the graph is in the plane instead of in three-dimensional space.

An alternative is to use time as the third dimension: If you start at some number $t$ on the real line and continually increase it, the value $f(t)$ moves around the circle counterclockwise, repeating every $2\pi$ times. If you decrease $t$, the value moves clockwise. The animated gif circlemovie.gif shows how the location of a point on the circle moves around the circle as $t$ changes from $0$ to $2\pi$. Every point is traversed an infinite number of times as $t$ runs through all the real numbers.

#### The unit circle with $t$ made explicit

Since we have access to three dimensions, we can show the input $t$ explicitly by using a three-dimensional graph, shown below. The blue circle is the function $t\mapsto(\cos t,\sin t,0)$ and the gold helix is the function $t\mapsto(\cos t,\sin t,.2t)$.

The introduction of $t$ as the value in the vertical direction changes the circle into a helix. The animated .gif covermovie.gif shows both the travel of a point on the circle and the corresponding point on the helix.

As $t$ changes, the circle is drawn over and over with a period of $2\pi$. Every point on the circle is traversed an infinite number of times as $t$ runs through all the real numbers. But each point on the helix is traversed exactly once. For a given value of $t$, the point on the helix is always directly above or below the point on the circle.

The helix is called the universal covering space of the circle, and the set of points on the helix over (and under) a particular point $p$ on the circle is called the fiber over $p$. The universal cover of a space is a big deal in topology.

### Figure-8 graph

This is the parametric graph of the function $t\mapsto(\cos t,\sin 2t)$.

Notice that it crosses itself at the origin, when $t$ is any odd multiple of $\frac{\pi}{2}$.

Below is the universal cover of the Figure-8 graph. As you can see, the different instances of crossing at $(0,0)$ are separated. The animated.gif Fig8movie shows the paths taken as $t$ changes on the figure 8 graph and on its universal cover

## Functions from a subset of $\mathbb{R}$ to $\mathbb{R}\times\mathbb{R}\times\mathbb{R}$

The graph of a function from a subset of $\mathbb{R}$ to $\mathbb{R}\times\mathbb{R}\times\mathbb{R}$ can also be drawn as a parametric graph in three-dimensional space, giving a three-dimensional curve. The trick that I used in the previous section of showing the input parameter so that you can see the universal cover won’t work in this case because it would require four dimensions.

### Universal covers

The gold curves in the figures for the universal covers of the circle and the figure 8 are examples of functions from $\mathbb{R}$ to $\mathbb{R}\times\mathbb{R}\times\mathbb{R}$.

### The seven-pointed crown

Here are views from three different angles of the graph of the function $t\mapsto(\cos t, \sin t, \sin 7t)$:

The animated gif crownmovie.gif represents the parameter $t$ in time.

### Another curve in space

Below are two views of the curve defined by $t\mapsto({-4t^2+53t)/18,t,.4(-t^2+1-10t)}$.

The following plots the $x$-curve $-4t^2+53t)/18$ gold in the $yz$ plane and the $z$ curve $.4(-t^2+1-10t)$ in the $xy$ plane. The first and third views are arranged so that you see the curve just behind one of those two planes.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Send to Kindle

# Representations of functions I

## Introduction to this post

I am writing a new abstractmath chapter called Representations of Functions. It will replace some of the material in the chapter Functions: Images, Metaphors and Representations.

This post includes a draft of the introduction to the new chapter (immediately below) and of the section Graphs of continous functions of one variable. Later posts will concern multivariable continuous functions, probably in two or three sections, and finite discrete functions.

## Introduction to the new abstractmath chapter on representations of functions

Functions can be represented visually in many different ways. There is a sharp difference between representing continuous functions and representing discrete functions.

For a continuous function $f$, $f(x)$ and $f(x’)$ tend to be close together when $x$ and $x’$ are close together. That means you can represent the values at an infinite number of points by exhibiting them for a bunch of close-together points. Your brain will automatically interpret the points nearby that are not represented.

Nothing like this works for discrete functions. As you will see in the section on discrete functions, many different arrangements of the inputs and outputs can be made. In fact, different arrangements may be useful for representing different properties of the function.

### Illustrations

The illustrations were created using these Mathematica Notebooks:

These notebooks contain many more examples of the ways functions can be represented than are given in this article. The notebooks also contain some manipulable diagrams which may help you understand the diagrams. In addition, all the 3D diagrams can be rotated using the cursor to get different viewpoints. You can access these tools if you have Mathematica, which is available for free for faculty and students at many universities, or with Mathematica CDF Player, which runs on Windows, Mac and Linux.

Like everything in abstractmath.org, the notebooks are covered by a Creative Commons ShareAlike 3.0 License.

## Graphs of continous functions of one variable

The most familiar representations of continuous functions are graphs of functions with one real variable. Students usually first see these in secondary school. Such representations are part of the subject called Analytic Geometry. This section gives examples of such functions.

There are other ways to represent continuous functions, in particular the cograph and the endograph. These will be the subject of a separate post.

The graph of a function $f:S\to T$ is the set of ordered pairs $\{(x,f(x))\,|\,x\in S\}$. (More about this definition here.)

In this section, I consider continuous functions for which $S$ and $T$ are both subsets of the real numbers. The mathematical graph of such a function are shown by plotting the ordered pairs $(x,f(x))$ as points in the two-dimensional $xy$-plane. Because the function is continuous, when $x$ and $x’$ are close to each other, $f(x)$ and $f(x’)$ tend to be close to each other. That means that the points that have been plotted cause your brain to merge together into a nice curve that allows you to visualize how $f$ behaves.

#### Example

This is a representation of the graph of the curve $g(x):=2-x^2$ for approximately the interval $(-2,2)$. The blue curve represents the graph.

The brown right-angled line in the upper left side, for example, shows how the value of independent variable $x$ at $(0.5)$ is plotted on the horizontal axis, and the value of $g(0.5)$, which is $1.75$, is plotted on the vertical axis. So the blue graph contains the point $(0.5,g(0.5))=(0.5,1.75)$. The animated gif upparmovie.gif shows a moving version of how the curve is plotted.

#### Fine points

• The mathematical definition of the graph is that it is the set $\{(x,2-x^2)\,|\,x\in\mathbb{R}\}$. The blue curve is not, of course, the mathematical graph, it represents the mathematical graph.
• The blue curve consists of a large but finite collection of pixels on your screen, which are close enough together to appear to form a continuous curve which approximates the mathematical graph of the function.
• Notice that I called the example the “representation of the graph” instead of just “graph”. That maintains the distinction between the mathematical ordered pairs $(x,g(x))$ and the pixels you see on the screen. But in fact mathe­maticians and students nearly always refer to the blue line of pixels as the graph. That is like pointing to a picture of your grandmother and saying “this is my grandmother”. There is nothing wrong with saying things that way. But it is worth understanding that two different ideas are being merged.

### Discontinuous functions

A discontinuous function which is continuous except for a small finite number of breaks can also be represented with a graph.

#### Example

Below is the function $f:\mathbb{R}\to\mathbb{R}$ defined by
f(x):=\left\{ \begin{align} 2-x^2\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(x\gt0) \\ 1-x^2\,\,\,\,\,\,(-1\lt x\lt 0) \\ 2-x^2\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(x\lt-1) \end{align}\right.

##### Example

The Dirichlet function is defined by
$F(x):= \begin{cases} 1 & \text{if }x\text{ is rational}\\ \frac{1}{2} & \text{if }x\text{ is irrational}\\ \end{cases}$  for all real $x$.

The abmath article Examples of functions spells out in detail what happens when you try to draw this function.

### Graphs can fool you

The graph of a continuous function cannot usually show the whole graph, unless it is defined only on a finite interval. This can lead you to jump to conclusions.

##### Example

For example, you can’t tell from the the graph of the function $y=2-x^2$ whether it has a local minimum (because the graph does not show all of the function), although you can tell by using calculus on the formula that it does not have one. The graph looks like it might have a vertical asymptotes, but it doesn’t, again as you can tell from the formula.

Discovering facts about a function
by looking at its graph
is useful but dangerous.

##### Example

Below is the graph of the function
$f(x)=.0002{{\left( \frac{{{x}^{3}}-10}{3{{e}^{-x}}+1} \right)}^{6}}$

If you didn’t know the formula for the function (but know it is continuous), you could still see that it has a local maximum somewhere to the right of $x=1$. It looks like it has one or more zeroes around $x=-1$ and $x=2$. And it looks like it has an asymptote somewhere to the right of $x=2.5$.

If you do know the formula, you can find out many things about the function that you can’t depend on the graph to see.

• You can see immediately that $f$ has a zero at $x=\sqrt[3]{10}$, which is about $2.15$.
• If you notice that the denominator is positive for all $x$, you can figure out that
• $\sqrt[3]{10}$ is the only root.
• $f(x)\geq0$ for all $x$.
• $f$ has an asymptote as $x\to-\infty$ (use L’Hôpital).
• Numerical analysis (I used Mathematica) shows that $f'(x)$ has two zeros, at $\sqrt[3]{10}$ and at about $x=1.1648$. $f”(1.1648)$ is about $-10.67$ , which strongly suggests that $f$ has a local max near $1.1648$, consistent with the graph.
• Since $f$ is defined for every real number, it can’t have a vertical asymptote anywhere. The graph looks like it becomes vertical somewhere to the right of $x=2.4$, but that is simply an illustration of the unbelievably fast growth of any exponential function.
• The section on Zooming and Chunking gives other details.

## Acknowledgments

Sue VanHattum.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Send to Kindle

# Functions: Metaphors, Images and Representations

Please read this post at abstractmath.org. I originally posted the document here but some of the diagrams would not render, and I haven’t been able to figure out why. Sorry for having to redirect.

Send to Kindle

# Demos for graph and cograph of calculus functions

The interactive examples in this post require installing Wolfram CDF player, which is free and works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome. The source code is the Mathematica Notebook GraphCograph.nb, which is available for free use under a Creative Commons Attribution-ShareAlike 2.5 License. The notebook can be read by CDF Player if you cannot make the embedded versions in this post work properly.

This post provides interactive examples of the endograph and cograph of real functions. Those two concepts were defined and discussed in the previous post Endograph and cograph of real functions.

Such representations of functions, put side by side with the conventional graph, may help students understand how to interpret the usual graph representation. For example: What does it mean when the arrows slant to the left? spread apart? squeeze together? flip over? Going back and forth between the conventional graph and the cograph or engraph for a particular function should make you much more in tune to the possibilities when you see only the conventional graph of another function.

This is not a major advance for calculus teachers, but it may be a useful tool.

## Line segment

$y=a x+b$

## Cubic

$y=a x^3-b x$

## Sine

$y=\sin a x$.

## Sine and its derivative

$y=\sin a x$ (blue) and $y=a\cos a x$ (red)

## Quintic with three parameters

$y=a x^5-b x^4-0.21 x^3+0.2 x^2+0.5 x-c$

Thanks to Martin Flashman for corrections.

Send to Kindle

# Inverse image demo revisited

This post is an update of the post Demonstrating the inverse image of a function.

To manipulate the demos in this post, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website. CDF Player works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome.

The code for the demos, with some explanatory remarks, is in the file InverseImage.nb on my ,Mathematica website. That website also includes some other examples as .cdf files.

If the diagrams don’t appear, or appear but show pink diagrams, or if the formulas in the text are too high or too low, refresh the screen.

• The vertical red interval has the horizontal green interval(s) as inverse image.
• You can move the sliders back and forth to move to different points on the curve. The sliders control the vertical red interval. $a$ is the lower point of the vertical red line and $b$ is the upper point.
• As you move the sliders back and forth you will see the inverse image breaking up into a disjoint union in intervals, merging into a single interval, or disappearing entirely.
• The arrow at the upper right makes it run automatically.
• If you are using Mathematica, you can enter values into the boxes, but if you are using CDF Player, you can only change the number using the slider or the plus and minus incrementers.

This is the graph of $y=x^2-1$.

The graph of $-.5 + .5 x + .2 x^2 – .19 x^3 – .015 x^4 + .01 x^5$

The graph of the rational function $0.5 x+\frac{1.5 \left(x^4-1\right)}{x^4+1}$

The graph of a straight line whose slope can be changed. You can design demos of other functions with variable parameters.

The graph of the sine function. The other demos were coded using the Mathematica Reduce function to get the inverse image. This one had to be done in an ad hoc way as explained in the InverseImage.nb file.

Send to Kindle

# The definition of “function”

This is the new version of the abstractmath article on the definition of function. I had to adapt the formatting and some of it looks weird, but legible. It is prettier on abstractmath.org.

I expect to announce new revisions of other abmath articles on this blog, with links, but not to publish them here. This article brings out a new point of view about defining functions that I wanted to call attention to, so I am publishing it here, as well.

# FUNCTIONS: SPECIFICATION AND DEFINITION

It is essential that you understand many of the images, metaphors and terminology that mathe­maticians use when they think and talk about functions. For many purposes, the precise mathematical definition of "function" does not play much of a role when you are trying to understand particular kinds of functions. But there is one point of view about functions that has resulted in fundamental progress in math:

A function is a mathematical object.

To deal with functions in that way you need a precise definition of "function". That is what this article gives you.

• The article starts by giving a specification of "function".
• After that, we get into the technicalities of the definitions of the general concept of function.
• Things get complicated because there are several inequivalent definitions of "function" in common use.

## Specification of "function"

A function $f$ is a mathematical object which determines and is completely determined by the following data:

(DOM) $f$ has a domain, which is a set. The domain may be denoted by $\text{dom} f$.

(COD) $f$ has a codomain, which is also a set and may be denoted by $\text{cod} f$.

(VAL) For each element $a$ of the domain of $f$, $f$ has a value at $a$, denoted by $f(a)$.

(FP) The value of $f$ at $a$ is completely determined by $a$ and $f$.

(VIC) The value of $f$ at $a$ must be an element of the codomain of $f$.

• The operation of finding $f(a)$ given $f$ and $a$ is called evaluation.
• "FP" means functional property.
• "VIC" means "value in codomain".

### Examples

The examples of functions chapter contains many examples. The two I give here provide immediate examples.

#### A finite function

Let $F$ be the function defined on the set $\left\{1,\,2,3,6 \right\}$ as follows: $F(1)=3,\,\,\,F(2)=3,\,\,\,F(3)=2,\,\,\,F(6)=1$. This is the function called "Finite'' in the chapter on examples of functions.

• The definition of $F$ says "$F$ is defined on the set $\left\{1,\,2,\,3,\,6 \right\}$". That phrase means that the domain is that set.
• The value of $F$ at each element of the domain is given explicitly. The value at 3, for example, is 2, because the definition says that $F(2) = 3$. No other reason needs to be given. Mathematical definitions can be arbitrary.
• The codomain of $F$ is not specified, but must include the set $\{1,2,3\}$. The codomain of a function is often not specified when it is not important — which is most of the time in freshman calculus (for example).

#### A real-valued function

Let $G$ be the real-valued function defined by the formula $G(x)={{x}^{2}}+2x+5$.

• The definition of $G$ gives the value at each element of the domain by a formula. The value at $3$, for example, is $G(3)=3^2+2\cdot3+5=20$.
• The definition of $G$ does not specify the domain. 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 $\mathbb{R}$.
• The definition does not specify the codomain, either. However, must include all real numbers greater than or equal to 4. (Why?)

### What the specification means

• The specification guarantees that a function satisfies all five of the properties listed.
• The specification does not define a mathematical structure in the way mathematical structures have been defined in the past: In particular, it does not require a function to be one or more sets with structure.
• Even so, it is useful to have the specification, because:

Many mathematical definitions
introduce extraneous technical elements
which clutter up your thinking
about the object they define.

I will say more about this when I give the various definitions that are in use.

## History

Until late in the nineteenth century, functions were usually thought of as defined by formulas (including infinite series). Problems arose in the theory of harmonic analysis which made mathematicians require a more general notion of function. They came up with the concept of function as a set of ordered pairs with the functional property (discussed below), and that understanding revolutionized our understanding of math.

This discussion is an over­simpli­fication of the history of mathe­matics, which many people have written thick books about. A book relevant to these ideas is Plato's Ghost, by Jeremy Gray.

In particular, this definition, along with the use of set theory, enabled abstract math (ahem) to become a common tool for understanding math and proving theorems. It is conceivable that some of you may wish it hadn't. Well, tough.

The more modern definition of function given here (which builds on the older definition) came into use beginning in the 1950's. The strict version became necessary in algebraic topology and is widely used in many fields today.

The concept of function as a formula never disappeared entirely, but was studied mostly by logicians who generalized it to the study of function-as-algorithm. Of course, the study of algorithms is one of the central topics of modern computing science, so the notion of function-as-formula (updated to function-as-algorithm) has achieved a new importance in recent years.

To state both the old abstract definition and the modern one, we need a preliminary idea.

## The functional property

A set $P$ of ordered pairs has the functional property if two pairs in $P$ with the same first coordinate have to have the same second coordinate (which means they are the same pair). In other words, if $(x,a)$ and $(x,b)$ are both in $P$, then $a=b$.

#### 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.

#### Examples

• The set $\{(1,2), (2,4), (3,2), (5,8)\}$ has the functional property, since no two different pairs have the same first coordinate. Note that there are two different pairs with the same second coordinate. This is irrelevant to the functional property.
• The set $\{(1,2), (2,4), (3,2), (2,8)\}$ does not have the functional property. There are two different pairs with first coordinate 2.
• The empty set $\emptyset$ has the function property vacuously.

#### Example: graph of a function defined by a formula

In calculus books, a picture like this one (of part of $y=x^2+2x+5$) is called a graph. Here I use the word "graph" to denote the set of ordered pairs $\left\{ (x,{{x}^{2}}+2x+5)\,\mathsf{|}\,x\in \mathbb{R } \right\}$ which is a mathematical object rather than some ink on a page or pixels on a screen.

The graph of any function studied in beginning calculus has the functional property. For example, the set of ordered pairs above has the functional property because if $x$ is any real number, the formula ${{x}^{2}}+2x+5$ defines a specific real number.

• if $x = 0$, then ${{x}^{2}}+2x+5=5$, so the pair $(0, 5)$ is an element of the graph of $G$. Each time you plug in $0$ in the formula you get 5.
• if $x = 1$, then ${{x}^{2}}+2x+5=8$.
• if $x = -2$, then ${{x}^{2}}+2x+5=5$.

You can measure where the point $\{-2,5\}$ is on the (picture of) the graph and see that it is on the blue curve as it should be. 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$ and nothing else. 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.

## Modern mathematical definition of function

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

• A set called the domain of $f$, denoted by $\text{dom} f$.
• A set called the codomain of $f$, denoted by $\text{cod} f$.
• A set of ordered pairs called the graph of $f$, with the following properties:
• $\text{dom} f$ is the set of all first coordinates of pairs in the graph of $f$.
• Every second coordinate of a pair in the graph of $f$ is in $\text{cod} f$ (but $\text{cod} f$ may contain other elements).
• The graph of $f$ has the functional property.

Using arrow notation, this implies that $f:A\to B$.

#### Remark

The main difference between the specification of function given previously and this definition is that the definition replaces the statement "$f$ has a value at $a$" by introducing a set of ordered pairs (the graph) with the functional property.

• This set of ordered pairs is extra structure introduced by the definition mainly in order to make the definition a classical sets-with-structure, which makes the graph, which should be a concept derived from the concept of function, into an apparently necessary part of the function.
• That suggests incorrectly that the graph is more of a primary intuition that other intuitions such as function as relocator, function as transformer, and other points of view discussed in the article Intuitions and metaphors for functions.

### Examples

• Let $F$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$ and define $A = \{1, 2, 3, 5\}$ and $B = \{2, 4, 8\}$. Then $F:A\to B$ is a function. In speaking, we would usually say, "$F$ is a function from $A$ to $B$."
• Let $G$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$ (same as above), and define $A = \{1, 2, 3, 5\}$ and $C = \{2, 4, 8, 9, 11, \pi, 3/2\}$. Then $G:A\to C$ is a (admittedly ridiculous) function. Note that all the second coordinates of the graph are in $C$, along with a bunch of miscellaneous suspicious characters that are not second coordinates of pairs in the graph.
• Let $H$ have graph $\{(1,2), (2,4), (3,2), (5,8)\}$. Then $H:A\to \mathbb{R}$ is a function, since $2$, $4$ and $8$ are all real numbers.
• Let $D = \{1, 2, 5\}$ and $E = \{1, 2, 3, 4, 5\}$. Then there is no function $D\to A$ and no function $E\to A$ with graph $\{(1,2), (2,4), (3,2), (5,8)\}$. Neither $D$ nor $E$ has exactly the same elements as the first coordinates of the graph.

### Identity and inclusion

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

• The identity function on A is the function ${{\operatorname{id}}_{A}}:A\to A$ defined by ${{\operatorname{id}}_{A}}(x)=x$ for all $x\in A$. (Many authors call it ${{1}_{A}}$).
• When $A\subseteq B$, the inclusion function from $A$ to $B$ is the function $i:A\to B$ defined by $i(x)=x$ for all $x\in A$. Note that there is a different function for each pair of sets $A$ and $B$ for which $A\subseteq B$. Some authors call it ${{i}_{A,\,B}}$ or $\text{in}{{\text{c}}_{A,\,B}}$.

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\}$. More about this below.

## Other definitions of function

### Multivalued function

Some older mathematical papers in com­plex func­tion theory do not tell you that their functions are multi­valued. There was a time when com­plex func­tion theory was such a Big Deal in research mathe­matics that the phrase "func­tion theory" meant complex func­tion theory and all the cogno­scenti knew that their functions were multi­valued.

The phrase multivalued function refers to an object that is like a function $f:S\to T$ except that for $s\in S$, $f(s)$ may denote more than one value.

#### Examples

• Multivalued functions arose in considering complex functions. In common practice, the symbol $\sqrt{4}$ denoted $2$, although $-2$ is also a square root of $4$. But in complex function theory, the square root function takes on both the values $2$ and $-2$. This is discussed in detail in Wikipedia.
• The antiderivative is an example of a multivalued operator. For any constant $C$, $\frac{x^3}{3}+C$ is an antiderivative of $x^2$.

A multivalued function $f:S\to T$ can be modeled as a function with domain $S$ and codomain the set of all subsets of $T$. The two meanings are equivalent in a strong sense (naturally equivalent}). Even so, it seems to me that they represent two differ­ent ways of thinking about multivalued functions. ("The value may be any of these things…" as opposed to "The value is this whole set of things.")

The phrases "multivalued function" and "partial function" upset some picky types who say things like, "But a multi­valued func­tion is not a func­tion!". A step­mother is not a mother, either. See the Hand­book article on radial category.

### Partial function

A partial function $f:S\to T$ is just like a function except that its input may be defined on only a subset of $S$. For example, the function $f(x)=\frac{1}{x}$ is a partial function from the real numbers to the real numbers.

This models the behavior of computer programs (algorithms): if you consider a program with one input and one output as a function, it may not be defined on some inputs because for them it runs forever (or gives an error message).

In some texts in computing science and mathematical logic, a function is by convention a partial function, and this fact may not be mentioned explicitly, especially in research papers.

## New approaches to functions

All the definitions of function given here produce mathematical structures, using the traditional way to define mathematical objects in terms of sets. Such definitions have disadvantages.

Mathematicians have many ways to think about functions. That a function is a set of ordered pairs with a certain property (functional) and possibly some ancillary ideas (domain, codomain, and others) is not the way we usually think about them$\ldots$Except when we need to reduce the thing we are studying to its absolutely most abstract form to make sure our proofs are correct. That most abstract form is what I have called the rigorous view or the dry bones and it is when that reasoning is needed that the sets-with-structure approach has succeeded.

Our practice of abstraction has led us to new approaches to talking about functions. The most important one currently is category theory. Roughly, a category is a bunch of objects together with some arrows going between them that can be composed head to tail. Functions between sets are examples of this: the sets are the objects and the functions the arrows.

This abstracts the idea of function in a way that brings out common ideas in various branches of math. Research papers in many branches of mathematics now routinely use the language of category theory. Categories now appear in some undergraduate math courses, meaning that Someone needs to write a chapter on category theory for abstractmath.org.

Besides category theory, computing scientists have come up with other abstract ways of dealing with functions, for example type theory. It has not come as far along as category theory, but has shown recent signs of major progress.

Both category theory and type theory define math objects in terms of their effect on and relationship with other math objects. This makes it possible to do abstract math entirely without using sets-with-structure as a means of defining concepts.

Send to Kindle

# Representations of mathematical objects

### MathJax.Hub.Config({ jax: ["input/TeX","output/NativeMML"], extensions: ["tex2jax.js"], tex2jax: { inlineMath: [ ['$','$'] ], processEscapes: true } });

This is a long post. Notes on viewing.

## About this post

A mathematical object, or a type of math object, is represented in practice in a great variety of ways, including some that mathematicians rarely think of as "representations".

In this post you will find examples and comments about many different types of representations as well as references to the literature. I am not aware that anyone has considered all these different ideas of representation in one place before. Reading through this post should raise your consciousness about what is going on when you do math.

This is also an experiment in exposition.  The examples are discussed in a style similar to the way a Mathematica command is discussed in the Documentation Center, using mostly nonhierarchical bulleted lists. I find it easy to discover what I want to know when it is written in that way.  (What is hard is discovering the name of a command that will do what I want.)

## Types of representations

### Using language

• Language can be used to define a type of object.
• A definition is intended to be precise enough to determine all the properties that objects of that type all have.  (Pay attention to the two uses of the word "all" in that sentence; they are both significant, in very different ways.)
• Language can be used to describe an object, exhibiting properties without determining all properties.
• It can also provide metaphors, making use of one of the basic tools of our brain to understand the world.
• The language used is most commonly mathematical English, a special dialect of English.
• The symbolic language of mathematics (distinct from mathematical English) is used widely in calculations. Phrases from the symbolic language are often embedded in a statement in math English. The symbolic language includes among others algebraic notation and logical notation.
• The language may also be a formal language, a language that is mathematically defined and is thus itself a mathematical object. Logic texts generally present the first order predicate calculus as a formal language.
• Neither mathematical English nor the symbolic language is a formal language. Both allow irregularities and ambiguities.

### Mathematical objects

The representation itself may be a mathematical object, such as:

• A linear representation of a group. Not only are the groups mathematical objects, so is the representation.
• An embedding of a manifold into Euclidean space. A definition given in a formal language of the first order predicate calculus of the property of commutativity of binary operations. (Thus a property can be represented as a math object.)

### Visual representations

A math object can be represented visually using a physical object such as a picture, graph (in several senses), or diagram.

• The visual processing of our brain is our major source of knowledge of the world and takes about a fifth of the brain's processing power.  We can learn many things using our vision that would take much longer to learn using verbal descriptions.  (Proofs are a different matter.)
• When you look at a graph (for example) your brain creates a mental representation of the graph (see below).

### Mental representations

If you are a mathematician, a math object such as "$42$", "the real numbers" or "continuity" has a mental representation in your brain.

• In the math ed literature, such a representation is called "mental image", "concept image", "procept", or "schema".   (The word "image" in these names is not thought of as necessarily visual.)
• The procept or schema describe all the things that come to mind when you think about a particular math object: The definition, important theorems, visual images, important examples, and various metaphors that help you understand it.
• The visual images occuring in a mental schema for an object may themselves be mental representations of physical objects. The examples and theorems may be mental representations of ideas you learned from language or pictures, and so on.  The relationships between different kinds of representations get quite convoluted.

### Metaphors

Conceptual metaphors are a particular kind of mental representation of an object which involve mentally associating some aspects of the objects with some aspects of something else — a physical object, an image, an action or another abstract object.

• A conceptual metaphor may give you new insight into the object.
• It may also mislead you because you think of properties of the other object that the math object doesn't have.
• A graph of a function is a conceptual metaphor.
• When you say that a point on a graph "rises as it goes from left to right" your metaphor is an action.
• When you say that the cosets of a normal subgroup of a group "get along" with the group multiplication, your metaphor identifies a property they have with an aspect of human behavior.

## Properties of representations

A representation of a math object may or may not

• determine it completely
• exhibit some of its properties
• suggest easy proofs of some theorems
• provide a useful way of thinking about it
• mislead you about the object's properties
• mislead you about what is significant about the object

## Examples of representations

This list shows many of the possibilities of representation.  In each case I discuss the example in terms of the two bulleted lists above. Some of the examples are reused from my previous publications.

### Functions

Example (F1) "Let $f(x)$ be the function defined by $f(x)=x^3-x$."

• This is an expression in mathematical English that a fluent reader of mathematical English will recognize gives a definition of a specific function.
• (F1) is therefore a representation of that function.
• The word "representation" is not usually used in this way in math.  My intention is that it should be recognized as the same kind of object as many other representations.
• The expression contains the formula $x^3-x$.  This is an encapsulated computation in the symbolic language of math. It allows someone who knows basic algebra and calculus to perform calculations that find the roots, extrema and inflection points of the function $f$.
• The word "let" suggests to the fluent reader of mathematical English that (F1) is a definition which is probably going to hold for the next chunk of text, but probably not for the whole article or book.
• Statements in mathematical English are generally subject to conventions.  In a calculus text (F1) would automatically mean that the function had the real numbers as domain and codomain.
• The last two remarks show that a beginner has to learn to read mathematical English.
• Another convention is discussed in the following diatribe.

#### Diatribe

You would expect $f(x)$ by itself to mean the value of $f$ at $x$, but in (F1) the $x$ has the property of a bound variable.  In mathematical English, "let" binds variables. However, after the definition, in the text the "$x$" in the expression "$f(x)$" will be free, but the $f$ will be bound to the specific meaning.  It is reasonable to say that the term "$f(x)$" represents the expression "$x^3-x$" and that $f$ is the (temporary) name of the function. Nevertheless, it is very common to say "the function $f(x)$" to mean $f$.

A fluent reader of mathematical English knows all this, but probably no one has ever said it explicitly to them.  Mathematical English and the symbolic language should be taught explicitly, including its peculiarities such as "the function $f(x)$".  (You may want to deprecate this usage when you teach it, but students deserve to understand its meaning.)

### The positive integers

You have a mental representation of the positive integers $1,2,3,\ldots$.  In this discussion I will assume that "you" know a certain amount of math.  Non-mathematicians may have very different mental representations of the integers.

• You have a concept of "an integer" in some operational way as an abstract object.
• "Abstract object" needs a post of its own. Meanwhile see Mathematical Objects (abstractmath) and the Wikipedia articles on Mathematical objects and Abstract objects.
• You have a connection in your brain between the concept of integer and the concept of listing things in order, numbering them by $1,2,3,\ldots$.
• You have a connection in your brain between the concept of an integer and the concept of counting a finite number of objects.  But then you need zero!
• You understand how to represent an integer using the decimal representation, and perhaps representations to other bases as well.
• Your mental image has the integer "$42"$ connected to but not the same as the decimal representation "42". This is not true of many students.
• The decimal rep has a picture of the string "42" associated to it, and of course the picture of the string may come up when you think of the integer $42$ as well (it does for me — it is a an icon for the number $42$.)
• You have a concept of the set of integers.
• Students need to be told that by convention "the set of integers" means the set of all integers.  This particularly applies to students whose native language does not have articles, but American students have trouble with this, too.
• Your concept of  "the set of integers" may have the icon "$\mathbb{N}$" associated with it.  If you are a mathematician, the icon and the concept of the set of integers are associated with each other but not identified with each other.
• For me, at least, the concept "set of integers" is mentally connected to each integer by the "element of" relation. (See third bullet below.)
• You have a mental representation of the fact that the set of integers is infinite.
• This does not mean that your brain contains an infinite number of objects, but that you have a representation of infinity as a concept, it is brain-connected to the concept of the set of integers, and also perhaps to a proof of the fact that $\mathbb{N}$ is infinite.
• In particular, the idea that the set of integers is mentally connected to each integer does not mean that the whole infinite number of integers is attached in your brain to the concept of the set of integers.  Rather, the idea is a predicate in your brain.  When it is connected to "$42$", it says "yes".  To "$\pi$" it says "No".
• Philosophers worry about the concept of completed infinity.  It exists as a concept in your brain that interacts as a meme with concepts in other mathematicians' brains. In that way, and in that way only (as far as I am concerned) it is a physical object, in particular an object that exists in scattered physical form in a social network.

### Graph of a function

This is a graph of the function $y=x^3-x$:

• The graph is a physical object, either on a screen or on paper
• It is processed by your visual system, the most powerful sensory management system in your brain
• It also represents the graph in the mathematical sense (set of ordered pairs) of the function $y=x^3-x$
• Both the mathematical graph and the physical graph are represented by modules in your brain, which associates the two of them with each other by a conceptual metaphor
• The graph shows some properties of the function: inflection point, going off to infinity in a specific way, and so on.
• These properties are made apparent (if you are knowledgeable) by means of the powerful pattern recognition system in your brain. You see them much more quickly than you can discover them by calculation.
• These properties are not proved by the graph. Nevertheless, the graph communicates information: for example, it suggests that you can prove that there is an inflection point near $(0,0)$.
• The graph does not determine or define the function: It is inaccurate and it does not (cannot) show all of the graph.
• More subtle details about this graph are discussed in my post Representations 2.

### Continuity

Example (C1) The $\epsilon-\delta$ definition of the continuity of a function $f:\mathbb{R}\to\mathbb{R}$ may be given in the symbolic language of math:

A function $f$ is continuous at a number $c$ if $\forall\epsilon(\epsilon\gt0\implies(\forall x(\exists\delta(|x-c|\lt\delta\implies|f(x)-f(c)|\lt\epsilon)))$

• To understand (C1), you must be familiar with the notation of first order logic.  For most students, getting the notation right is quite a bit of work.
• You must also understand  the concepts, rules and semantics of first order logic.
• Even if you are familiar with all that, continuity is still a difficult concept to understand.
• This statement does show that the concept is logically complicated. I don't see how it gives any other intuition about the concept.

Example (C2) The definition of continuity can also be represented in mathematical English like this:

A function $f$ is continuous at a number $c$ if for any $\epsilon\gt0$ and for any $x$ there is a $\delta$ such that if $|x-c|\lt\delta$, then $|f(x)-f(c)|\lt\epsilon$.

• This definition doesn't give any more intuition that (C1) does.
• It is easier to read that (C1) for most math students, but it still requires intimate familiarity with the quirks of math English.
• The fact that "continuous" is in boldface signals that this is a definition.  This is a convention.
• The phrase "For any $\epsilon\gt0$" contains an unmarked parenthetic insertion that makes it grammatically incoherent.  It could be translated as: "For any $\epsilon$ that is greater than $0$".  Most math majors eventually understand such things subconsciously.  This usage is very common.
• Unless it is explicitly pointed out, most students won't notice that  if you change the phrase "for any $x$ there is a $\delta$"  to "there is a $\delta$ for any $x$" the result means something quite different.  Cauchy never caught onto this.
• In both (C1) and (C2), the "if" in the phrase "A function $f$ is continuous at a number $c$ if…" means "if and only if" because it is in a definition.  Students rarely see this pointed out explicitly.

Example (C3) The definition of continuity can be given in a formally defined first order logical theory

• The theory would have to contain function symbols and axioms expressing the algebra of real numbers as an ordered field.
• I don't know that such a definition has ever been given, but there are various semi-automated and automated theorem-proving systems (which I know little about) that might be able to state such a definition.  I would appreciate information about this.
• Such a definition would make the property of continuity a mathematical object.
• An automated theorem-proving system might be able to prove that $x^3-x$ is continuous, but I wonder if the resulting proof would aid your intuition much.

Example (C4) A function from one topological space to another is continuous if the inverse of every open set in the codomain is an open set in the domain.

• This definition is stated in mathematical English.
• All definitions start with primitive data.
• In definitions (C1) – (C3), the primitive data are real numbers and the statement uses properties of an ordered field.
• In (C4), the data are real numbers and the arithmetic operations of a topological field, along with the open sets of the field. The ordering is not mentioned.
• This shows that a definition need not mention some important aspects of the structure.
• One marvelous example of this is that  a partition of a set and an equivalence relation on a set are based on essentially disjoint sets of data, but they define exactly the same type of structure.

Example (C4) "The graph of a continuous function can be drawn without picking up the chalk".

• This is a metaphor that associates an action with the graph.
• It is incorrect: The graphs of some continuous functions cannot be drawn.  For example, the function $x\mapsto x^2\sin(1/x)$ is continuous on the interval $[-1,1]$ but cannot be drawn at $x=0$.
• Generally speaking, if the function can be drawn then it can be drawn without picking up the chalk, so the metaphor provides a useful insight, and it provides an entry into consciousness-raising examples like the one in the preceding bullet.

## References

1. 1.000… and .999… (post)
2. Conceptual blending (post)
3. Conceptual blending (Wikipedia)
4. Conceptual metaphors (Wikipedia)
5. Convention (abstractmath)
6. Definitions (abstractmath)
7. Embodied cognition (Wikipedia)
8. Handbook of mathematical discourse (see articles on conceptual blendmental representationrepresentationmetaphor, parenthetic assertion)
9. Images and Metaphors (abstractmath).
10. The interplay of text, symbols and graphics in math education, Lin Hammill
11. Math and the modules of the mind (post)
12. Mathematical discourse: Language, symbolism and visual images, K. L. O’Halloran.
13. Mathematical objects (abmath)
14. Mathematical objects (Wikipedia)
15. Mathematical objects are “out there?” (post)
16. Metaphors in computing science ​(post)
17. Procept (Wikipedia)
18. Representations 2 (post)
19. Representations and models (abstractmath)
20. Representations II: dry bones (post)
21. Representation theorems (Wikipedia) Concrete representations of abstractly defined objects.
22. Representation theory (Wikipedia) Linear representations of algebraic structures.
23. Semiotics, symbols and mathematical visualization, Norma Presmeg, 2006.
24. The transition to formal thinking in mathematics, David Tall, 2010
25. Theory in mathematical logic (Wikipedia)
26. What is the object of the encapsulation of a process? Tall et al., 2000.
27. Where mathematics comes from, by George Lakoff and Rafael Núñez, Basic Books, 2000.
28. Where mathematics comes from (Wikipedia) This is a review of the preceding book.  It is a permanent link to the version of 04:23, 25 October 2012.  The review is opinionated, partly wrong, not well written and does not fit the requirements of a Wikipedia entry.  I recommend it anyway; it is well worth reading.  It contains links to three other reviews.

### Notes on Viewing

This post uses MathJax. If you see mathematical expressions with dollar signs around them, or badly formatted formulas, try refreshing the screen. Sometimes you have to do it two or three times.

Send to Kindle

# Explaining “higher” math to beginners

#### MathJax.Hub.Config({ jax: ["input/TeX","output/NativeMML"], extensions: ["tex2jax.js"], tex2jax: { inlineMath: [ ['$','$'] ], processEscapes: true } });

The interactive example in this post require installing Wolfram CDF player, which is free and works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome. The source code is the Mathematica Notebook algebra2.nb, which is available for free use under a Creative Commons Attribution-ShareAlike 2.5 License. The notebook can be read by CDF Player if you cannot make the embedded versions in this post work.

## Explaining math

I am in the process of writing an explanation of monads for people with not much math background.  In that article, I began to explain my ideas about exposition for readers at that level and after I had written several paragraphs decided I needed a separate article about exposition.  This is that article. It is mostly about language.

## Who is it written for?

### Interested laypeople

There are many recent books explaining some aspect of math for people who are not happy with high school algebra; some of them are listed in the references.  They must be smart readers who know how to concentrate, but for whom algebra and logic and definition-theorem-proof do not communicate.  They could be called interested laypeople, but that is a lousy name and I would appreciate suggestions for a better name.

### Math newbies

My post on monads is aimed at people who have some math, and who are interested in "understanding" some aspect of "higher math"; not understanding in the sense of being able to prove things about monads, but merely how to think about them.   I will call them math newbies.  Of course, I am including math majors, but I want to make it available to other people who are willing to tackle mathematical explanations and who are interested in knowing more about advanced stuff.

These "other people" may include people (students and practitioners) in other science & technology areas as well as liberal-artsy people.  There are such people, I have met them.  I recall one theologian who asked me about what was the big deal about ruler-and-compass construction and who seemed to feel enlightened when I told him that those constructions preserve exactly the ideal nature of geometric objects.  (I later found out he was a famous theologian I had never heard of, just like Ngô Bảo Châu is a famous mathematician nonmathematicians have never heard of.)

## Algebra and other foreign languages

If you are aiming at interested laypeople you absolutely must avoid algebra.  It is a foreign language that simply does not communicate to most of the educated people in the world.  Learning a foreign language is difficult.

So how do you avoid algebra?  Well, you have to be clever and insightful.  The book by Matthew Watkins (below) has absolutely wonderful tricks for doing that, and I think anyone interested in math exposition ought to read it.  He uses metaphors, pictures and saying the same thing in different words. When you finish reading his book, you won't know how to prove statements related to the prime number theorem (unless you already knew how) but you have a good chance of understanding the statement of some theorem in that subject. See my review of the book for more details.

If your article is for math newbies, you don't have to avoid algebra completely.  But remember they are newbies and not as fluent as you are — they do things analogous to "Throw Mama from the train a kiss" and "I can haz cheeseburger?".  But if you are trying to give them some way of thinking about a concept, you need many other things (metaphors, illustrative applications, diagrams…)  You don't need the definition-theorem-proof style too common in "exposition".  (You do need that for math majors who want to become professional mathematicians.)

### Unfamiliar notation

In writing expositions for interested laypeople or math newbies, you should not introduce an unfamiliar notation system (which is like a minilanguage).  I expect to write the monad article without commutative diagrams.  Now, commutative diagrams are a wonderful invention, the best way of writing about categories, and they are widely used by other than category theorists.  But to explain monads to a newbie by introducing and then using commutative diagrams is like incorporating a short grammar of Spanish which you will then use in an explanation of Sancho Panza's relationship with Don Quixote.

The abstractmath article on and, or and not does not use any of the several symbolic notations for logic that are in use.  The explanations simply use "and", "or" and "not".  I did introduce the notation, but didn't use it in the explanations.  When I rewrite the article I expect to put the notation at the end of the article instead of in the middle.  I expect to rewrite the other articles on mathematical reasoning to follow that practice, too.

## Technical terminology

This is about the technical terminology used in math.  Technical terminology belongs to the math dialect (or register) of English, which is not a foreign language in the same sense as algebra.  One big problem is changing the meaning of ordinary English words to a technical meaning.  This requires a definition, and definitions are not something most people take seriously until they have been thoroughly brainwashed into using mathematical methodology.  Math majors have to be brainwashed in this way, but if you are writing for laypeople or newbies you cannot use the technology of formal definition.

### Groups, simple groups

"You say the Monster Group is SIMPLE???  You must be a GENIUS!"  So Mark Ronan in his book (below) referred to simple groups as atoms.  Marcus du Sautoy calls them building blocks.  The mathematical meaning of "simple group" is not a transparent consequence of the meanings of "simple" and "group". Du Sautoy usually writes "group of symmetries" instead of just "group", which gives you an image of what he is talking about without having to go into the abstract definition of group. So in that usage, "group" just means "collection", which is what some students continue to think well after you give the definition.

A better, but ugly, name for "group" might be "symmetroid". It sounds technical, but that might be an advantage, not a disadvantage. "Group" obviously means any collection, as I've known since childhood. "Symmetroid" I've never heard of so maybe I'd better find out what it means.

In beginning abstract math courses my students fervently (but subconsciously) believe that they can figure out what a word means by what it means already, never mind the "definition" which causes their eyes to glaze over. You have to be really persuasive to change their minds.

### Prime factorization

Matthew Watkins referred to the prime factorization of an integer as a cluster. I am not sure why Watkins doesn't like "prime factorization", which usually refers to an expression such as  $p^{n_1}_1p^{n_2}_2\ldots p^{n_k}_k$.  This (as he says) has a spurious ordering that makes you have to worry about what the uniqueness of factorization means. The prime factorization is really a multiset of primes, where the order does not matter.

Watkins illustrates a cluster of primes as a bunch of pingpong balls stuck together with glue, so the prime factorization of 90 would be four smushed together balls marked 2, 3, 3 and 5. Below is another way of illustrating the prime factorization of 90. Yes, the random movement programming could be improved, but Mathematica seduces you into infinite playing around and I want to finish this post. (Actually, I am beginning to think I like smushed pingpong balls better. Even better would be a smushed pingpong picture that I could click on and look at it from different angles.)

### Metaphors, pictures, graphs, animation

Any exposition of math should use metaphors, pictures and graphs, especially manipulable pictures (like the one above) and graphs.  This applies to expositions for math majors as well as laypeople and newbies.  Calculus and other texts nowadays have begun doing this, more with pictures than with metaphors.

I was turned on to these ideas as far back as 1967 (date not certain) when I found an early version of David Mumford's "Red Book", which I think evolved into the book The Red Book of Varieties and Schemes.  The early version was a revelation to me both about schemes and about exposition. I have lost the early book and only looked at the published version briefly when it appeared (1999).  I remember (not necessarily correctly) that he illustrated the spectrum as a graph whose coordinates were primes, and generic points were smudges.  Writing this post has motivated me to go to the University of Minnesota math library and look at the published version again.

## References

#### Relevant abmath articles

Send to Kindle