Two symbols used in the study of integers are notorious for their confusing similarity.
Notice that $m/n$ is an integer if and only if $n|m$. Not only is $m/n$ a number and $n|m$ a statement, but the statement “the first one is an integer if and only if the second one is true” is correct only after the $m$ and $n$ are switched!
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.
A function $f$ is a mathematical object which determines and is completely determined by the following data:
I give two examples here. The examples of functions chapter contains many other examples.
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.
Let $G$ be the real-valued function defined by the formula $G(x)={{x}^{2}}+2x+5$.
Many mathematical definitions |
The discussion below is an oversimplification of the history of mathematics, 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.
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$.
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.
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.
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.
A function $f$ is a
mathematical structure consisting of the following objects:
Using arrow notation, this implies that $f:\text{dom}f\to\text{cod} f$.
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.
Suppose we have two sets A and B with $A\subseteq 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.
Some confusion can result because of the presence of these two different definitions.
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.
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 different 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 complex function theory do not tell you that their functions are multivalued. There was a time when complex function theory was such a Big Deal in research mathematics that the phrase “function theory” meant complex function theory and every mathematician with a Ph. D. knew that complex functions were multivalued.
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 multivalued function is not a function!”. 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 Handbook (click on
radial category).
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.
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
In many mathematical texts, the variable $x$ may denote a real number, although which real number may not be specified. This is an example of a variable mathematical object. This point of view and terminology is not widespread, but I think it is worth understanding because it provides a deeper understanding of some aspects about how math is done.
It is useful to distinguish between specific math objects and variable math objects.
Math books are full of references to math objects, typically named by a letter or a name, that are not completely specified. Some mathematicians call these variable objects (not standard terminology). The idea of a variable mathematical object is not often taught as such in undergraduate classes but it is worth pondering. It has certainly clarified my thinking about expressions with variables.
A logician would refer to the symbol $f$, thought of as denoting a function, as a variable, and likewise the symbol $G$, thought of as denoting a group. But mathematicians in general would not use the word “variable” in those situations.
The idea that $x$ is a variable object means thinking of $x$ as a genuine mathematical object, but with limitations about what you can say or think about it. Specifically,
Some assertions about a variable math object
may be neither true nor false.
The statement, “Let $x$ be a real number” means that $x$ is to be regarded as a variable real number (usually called a “real variable”). Then you know the following facts:
Suppose you are told that $x$ is a real number and that ${{x}^{2}}-5x=-6$.
This example may not be easy to understand. It is intended to raise your consciousness.
A prime pair is an ordered pair of integers $(n,n+2)$ with the property that both $n$ and $n+2$ are prime numbers.
Definition: $S$ is a PP set if $S$ is a set of pairs of integers with the property that every pair is a prime pair.
Now suppose $SS$ is a variable PP set.
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Here are three variant phrases that say that $125=5^3$:
Some students are confused by such statements, and conclude that $3$ is the “power”. This usage appears in print in Wikipedia in its entry on Exponentiation (as it was on 22 November 2016):
—
“…$b^n$ is the product of multiplying $n$ bases:
\[b^n = \underbrace{b \times \cdots \times b}_n\]
In that case, $b^n$ is called the $n$-th power of $b$, or $b$ raised to the power $n$.”
—
As a result, students (and many mathematicians) refer to $n$ as the “power” in any expression of the form “$a^n$”. The number $n$ should be called the “exponent”. The word “power” should refer only to the result $a^n$. I know mathematical terminology is pretty chaotic, but it is silly to refer both to $n$ and to $a^n$ as the “power”.
Almost as silly as using $(a,b)$ to refer to an open interval, an ordered pair and the GCD. (See The notation $(a,b)$.)
Suggestion for lexicographical research: How widespread does referring to $n$ as the “power” come up in math textbooks or papers? (See usage.)
Thanks to Tomaz Cedilnik for comments on the first version of this entry.
This is a draft of the first part of an article on category theory that will be posted on abstractmath.org. It replaces an earlier version that was posted in June, 2016.
During the last year or so, I have been monitoring the category theory questions on Math Stack Exchange. Some of the queries are clearly from people who do not have enough of a mathematical background to understand basic abstract reasoning, for example the importance of definitions and the difficulties described in the abmath artice on Dysfunctional attitudes and behaviors. Category theory has become important in several fields outside mathematics, for example computer science and database theory.
This article is intended to get people started in category theory by giving a very detailed definition of “category” and some examples described in detail with an emphasis on how the example fits the definition of category. That’s all the present version does, but I intend to add some examples of constructions and properties such as the dual category, product, and other concepts that some of the inquirers on Math Stack Exchange had great difficulty with.
There is no way in which this article is a proper introduction to category theory. It is intended only to give beginners some help over the initial steps of understanding the subject, particularly the aspects of understanding that cause many hopeful math majors to fall off the Abstraction Cliff.
To be written.
A category is a type of Mathematical structure consisting of two types of data, whose relationships are entirely determined by some axioms. After the definition is complete, I introduce several example categories with a detailed discussion of each one, explaining how they fit the definition of category.
A category consists of two types of data: objects and arrows.
Each arrow of a category has a domain and a codomain, each of which is an object of the category.
If $f$ and $g$ are arrows in a category for which $\text{cod}(f)=\text{dom}(g)$, as in this diagram:
then there is a unique arrow with domain $A$ and codomain $C$ called the composite of $f$ and $g$.
is said to commute if $h=g\circ f$.
Note: WordpPress does not recognize the html command
commutes.
commutes.
or as
then there is a unique arrow $k$ with domain $A$ and codomain $D$ called the composite of $f$, $g$ and $h$.
For these examples, I give a detailed explanation about how they fit the definition of category.
This first example is a small, finite category which I have named $\mathsf{MyFin}$ (“my finite category”). It is not at all an important category, but it has advantages as a first example.
A correct proof will be based on axioms and theorems.
The proof can be suggested by your intuitions,
but intuitions are not enough.
When working with $\mathsf{MyFin}$ you won’t have any intuitions!
This diagram gives a partial description of $\mathsf{MyFin}$.
Now let’s see how to make the diagram above into a category.
Showing the $\mathsf{MyFin}$ diagram does not completely define $\mathsf{MyFin}$. We must say what the composites of all the paths of length 2 are.
There is only one arrow going from $A$ to $B$, namely$f$, so $f$ has to be the composite $f\circ u$.
Definition: $s\circ f=h\circ r=j$.
If we had defined $s\circ f=h\circ r=k$ we would have a different category, although one that is “isomorphic” to $\mathsf{MyFin}$ (you have to define “isomorphic” or look it up.)
The arrow denoted by $\textsf{mdn}$ has domain $m$ and codomain $n$.
which may also be shown as
The composite of
must be $\textsf{rdt}$, since that is the only arrow with domain $r$ and codomain $t$.
This fact can also be written this way: \[\mathsf{sdt}\circ\textsf{rds}=\textsf{rdt}\]
The composites
and
must commute since the arrows shown are the only possible arrows with the domains and codomains shown. In other words, $\textsf{id}_\textsf{r}=\textsf{rdr}$ and $\textsf{id}_\textsf{s}=\textsf{sds}$.
In the diagram below,
there is only one arrow from one integer to another, so $\textsf{k}$ must be both \[\textsf{tdu}\circ(\textsf{sdt}\circ\textsf{rds})\] and \[(\textsf{tdu}\circ\textsf{sdt})\circ\textsf{rds}\] as required.
In this section, I define the category $\mathsf{Set}$ (that is standard terminology in category theory.) This example will be very different from $\mathsf{MyFin}$, because it involves known mathematical objects — sets and functions.
For a given function $f$, $\text{dom}(f)$ is the domain of the function $f$ in the usual sense, and $\text{cod}(f)$ is the codomain of $f$ in the usual sense. (See Functions: specification and definition for more about domain and codomain.)
The composite of $f:A\to B$ and $g:B\to C$ is the function $g\circ f:A\to C$ defined by \[\text{(DC)}\,\,\,\,\,\,\,\,\,\,(g\circ f)(a):=g(f(a))\]
Many other categories have a similar definition of composition, including categories whose objects are math structures with underlying sets and whose arrows are structure-preserving functions between the underlying sets. But be warned: There are many useful categories whose arrows do not evaluate at an element of an object because the objects don’t have elements. In that case, (DC) is meaningless. This is true of $\mathsf{MyFin}$ and $\mathsf{IntegerDiv}$.
For a set $A$, the identity arrow $\textsf{id}_A:A\to A$ is, as you might expect, the identity function defined by $\textsf{id}_A(a)=a$ for every $a\in A$. We must prove that these diagrams commute:
The calculations below show that they commute. They use the definition of composite given by (DC).
Note: In $\mathsf{Set}$, there are generally many arrows from a particular set $S$ to itself (for example there are $4$ from $\{1,2\}$ to itself), but only one is the identity arrow.
Composition of arrows in $\mathsf{Set}$ is associative because function composition is associative. Suppose we have functions as in this diagram:
We must show that the two triangles containing $k$ in this diagram commute:
In algebraic notation, this requires showing that for every element $a\in A$,\[(h\circ(g\circ f))(a))=((h\circ g)\circ f)(a)\]
The calculation below does that. It makes repeated use of Definition (DC) of composition. For any $a\in A$,\[\begin{equation}
\begin{split}
\big(h\circ (g\circ f)\big)(a)
& = h\big((g\circ f)(a)\big) \\
& = h\big(g(f(a))\big) \\
& = (h\circ g)(f(a)) \\
& = \big((h\circ g)\circ f\big)(a)
\end{split}
\end{equation}\]
If $(S,\Delta)$ and $(T,\nabla)$ are monoids and $f:(S,\Delta)\to(T,\nabla)$ is a homomorphism of monoids, then the domain of $f$ is $(S,\Delta)$ and the codomain of $f$ is $(T,\nabla)$.
The composite of
is the composite $g\circ f$ as set functions:
It is necessary to check that $g\circ f$ is a monoid homomorphism. The following calculation shows that it preserves the monoid operation; it makes repeated use of equations (DC) and (MM).
The calculation: For elements $r$ and $r’$ of $R$,\[\begin{align*}
(g\circ f)(r\,{\scriptstyle \square}\, r’)
&=g\left(f(r\, {\scriptstyle \square}\, r’)\right)\,\,\,\,\,\text{(DC)}\\ &=g\left(f(r) {\scriptstyle\, \Delta}\, f(r’)\right)\,\,\,\,\,\text{(MM)}\\
&=g(f(r)){\scriptstyle \,\nabla}\, g(f(r’))\,\,\,\,\text{(MM)}\\
&=(g\circ f)(r){\scriptstyle \,\nabla}\,(g\circ f)(r’)\,\,\,\,\,\text{(DC)}
\end{align*}\]
The fact that $g\circ f$ preserves the identity of the monoid is shown in the next section.
For a monoid $(S,\Delta)$, the identity function $\text{id}_S:S\to S$ preserves the monoid operation $\Delta$, because $\text{id}_S(s\Delta s’)=s\Delta s’$ by definition of the identity function, and that is $\text{id}_S(s)\Delta \text{id}_S(s’)$ for the same reason.
The required diagrams below must commute because the set functions commute and, by Axiom 3, the set composition of a monoid homomorphism is a monoid homomorphism.
We also need to show that $g\circ f$ as in
preserves identities. This calculation proves that it does; it uses (DC) and (ME)
\[\begin{align*}
(g\circ f)(\text{id}_R)
&=g(f((\text{id}_R))\\
&=g(\text{id}_S)\\
&=\text{id}_T
\end{align*}\]
The diagram
in the category $\mathsf{Set}$ commutes, so the diagram
must also commute.
All these references are available on line.
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
For some time I have been considering writing introductions to topics in abstract math, some typically studied by undergraduates and some taken by scientists and engineers. The topics I have in mind to do first include group theory and category theory.
The point of these introductions is to get the student started at the very beginning of the topic, when some students give up in total confusion. They meet and fall off of what I have called the abstraction cliff, which is discussed here and also in my blog posts Very early difficulties and Very early difficulties II.
I may have stolen the phrase “abstraction cliff” from someone else.
Group theory sets several traps for beginning students.
Category theory causes similar troubles. Beginning college math majors don’t usually meet it early. But category theory has begun to be used in other fields, so plenty of computer science students, people dealing with databases, and so on are suddenly trying to understand categories and failing to do so at the very start.
The G&G post A new kind of introduction to category theory constitutes an alpha draft of the first part of an article introducing category theory following the ideas of this post.
The following list shows some of the tactics I am thinking of using in the math topic introductions. It is quite likely that I will conclude that some tactics won’t work, and I am sure that tactics I haven’t mentioned here will be used.
There is a real split between students who want the definitions first
(most of whom don’t have the abstraction problems I am trying to overcome)
and those who really really think they need examples first (the majority)
because they don’t understand abstraction.
Thanks to Kevin Clift for corrections.
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
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.
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:
All these techniques can also be used to show finite portions of infinite discrete functions, but that possibility will not be discussed here.
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$.
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.
$\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:
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 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.
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.
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.
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.
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}\]
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.
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.
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
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.
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:
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:
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
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.
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.
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.
Suppose $F:\mathbb{R}\to\mathbb{R}\times\mathbb{R}$. That means you put in one number and get out a pair of numbers.
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)\]
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.
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.
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
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.
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}$.
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.
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.
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.
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.
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.
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.
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.
A discontinuous function which is continuous except for a small finite number of breaks can also be represented with a graph.
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.\]
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.
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.
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.
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.
The section on Zooming and Chunking gives other details.
Sue VanHattum.
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.