27
$\begingroup$

The context of this question is an "introduction to proofs and mathematics" class for freshman/sophomore math majors. Most textbooks for such a class say something about functions between arbitrary sets, which are of course central to modern mathematics and which students usually aren't that familiar with (their previous exposure to functions has usually been limited to the partial $\mathbb{R}\to \mathbb{R}$ variety). The question is, how do you "define" functions?

Many textbooks take the route of formal set theory and define a function $f:A\to B$ to be a subset of $A\times B$ such that for all $a\in A$ there is a unique $b\in B$ such that $(a,b)\in f$. Some such books also include denigrating remarks about how functions used to be spoken about as "rules", but now we have a real definition. Other textbooks simply embrace the notion of "rule". Which is the better approach and why?

(I will provide my own current opinion as an answer below.)

$\endgroup$
11
  • 9
    $\begingroup$ Check out Dubinsky & Wilson's (2013) High school students' understanding of the function concept from The Journal of Mathematical Behavior. (Dubinsky & Wilson also mention Jones' (2006) Demystifying functions: The historical and pedagogical difficulties of the concept of the function as suggesting "the ordered pairs representation is too abstract for students in high school" (D&W, p. 7).) $\endgroup$ May 14, 2015 at 7:43
  • 2
    $\begingroup$ Do you think you should add a tag and/or words to the title to indicate you're thinking about university students? As @BenjaminDickman says, for school students I would say that sets of ordered pairs is not the best plan. $\endgroup$ May 14, 2015 at 7:45
  • $\begingroup$ Given the content of the question, I took the liberty of adding the undergrad-education tag. $\endgroup$ May 14, 2015 at 15:54
  • 16
    $\begingroup$ I think the answers below are very good, so I do not want to add one; but there is a point that I think needs to be stressed: using the notation $(a,b)\in f$ for what we usually denote by $f(a)=b$ seems a very bad idea. When we practice mathematics, we practice it in a typed way, and this is part of what we should teach students. In particular, until we really give them a look into foundations (much later than when we give them a first deep look into proofs!), they should consider functions and sets to be objects of different type. In fact, I do not like the untyped aspect of ZF. $\endgroup$ May 14, 2015 at 15:59
  • 1
    $\begingroup$ (Incidentally, this did come up as an example of a "misleading definition" in MO 7584...) $\endgroup$ May 18, 2015 at 2:49

12 Answers 12

23
$\begingroup$

I wanted to provide a different perspective on this. I just recently graduated with an undergraduate degree in mathematics, and I wanted to say a few things about what personally helped me in understanding functions, and why I think introducing them as sets of ordered pairs is important.

Before I took my first proofs class, I thought of functions the typical naїve way as some formula that you put a number in and get another number out of. I guess that was enough for me to muddle my way through Calculus, but I never would have thought up on my own things like the Dirichilet function because of that mindset.

Defining functions as a set of ordered pairs makes your imagination of functions more flexible, you have the freedom to define each point independently of every other point without needing to follow some rule or pattern. With that in mind, the following statements

  • Almost every subset of $\mathbb{N}$ is undecidable.
  • Almost every function mapping from $\mathbb{N}\to\mathbb{N}$ is uncomputable.
  • Almost every real number is uncomputable.
  • Almost all functions mapping from $\mathbb{R}\to\mathbb{R}$ are discontinuous everywhere.
  • Almost all continuous functions from $\mathbb{R}\to\mathbb{R}$ are non-differentiable everywhere.

and others of the same ilk become much less counter-intuitive. If you have preconceived ideas that functions have to be computable using some sort of formula, or be useful, and so forth, most of these results will be counter-intuitive. Many of my classmates found them hard to believe because it takes a good deal of effort to construct an example of a continuous function that is non-differentiable everywhere, or an example of an uncomputable real number, and there is the expectation that a set of things that are easy to construct examples of will be larger than a set of things that are difficult to construct examples of.

However, when functions are defined as ordered pairs mapping values arbitrarily, I feel like these results are exactly what you would expect.

$\endgroup$
9
  • 6
    $\begingroup$ Thank you for this perspective! This is the sort of thing I was interested to hear. I entirely agree that students have to move away from the idea of functions as defined by a formula, but it still seems to me that the notion of "rule" is, or can be, wide enough to include all the standard pathologies. The Dirichlet function, for instance, is defined by a very straightforward rule, just like any other by-cases function. Likewise, the halting problem is also defined by a straightforward rule, despite not being an algorithm. $\endgroup$ May 14, 2015 at 21:04
  • 2
    $\begingroup$ But perhaps what you are saying is that defining functions in a radically unfamiliar way is necessary to "shock" students out of their "functions as formulas" mindset? That if we say "rule" then students will think "formula" no matter how many other sorts of rules we look at? $\endgroup$ May 14, 2015 at 21:06
  • 2
    $\begingroup$ @MikeShulman I'll grant you that Dirichilet's function and an encoding of the halting problem are not to hard to describe as rules. That said, I feel like a student's intuitive idea about what a rule is is some subset of the notion "a description of what a function does that can written down using a finite number of symbols", which is a countable set of functions, whereas all the functions in, say, the natural numbers, is uncountable, which means that almost all functions cannot fit under this intuitive notion of "rule". This isn't to say that I'm categorically against teaching (cont) $\endgroup$ May 14, 2015 at 21:36
  • $\begingroup$ functions as rules or that these intuitive challenges are insurmountable, but, as you suggested, I think introducing functions as sets of ordered pairs is a useful mechanism to shock students into a mindset that makes these "pathologies" not seem so unusual. $\endgroup$ May 14, 2015 at 21:36
  • 12
    $\begingroup$ IMHO the real value that Peter Olson is ascribing to the ordered pair definition is that it disabuses the student of any notion that a function's value assignments need to be other than arbitrary. "Rule" sounds non-arbitrary so it doesn't completely speak to this point. But IMHO there are other options ("assignment"? "association"?) that sidestep the set-theoretic definition's pedagogical pitfalls without introducing extraneous non-arbitrariness. $\endgroup$ May 15, 2015 at 11:20
20
$\begingroup$

In my experience, the "set of ordered pairs" is a difficult and confusing definition. Moreover, I feel it's almost totally unnecessary because in practice in mathematics we do always treat functions as rules. No one ever defines a function as $f = \{ (x,y) \mid y = x^2 \}$; we always write $f(x)=x^2$. Of course, "rules" in this sense are much more general than "algebraic formulas", but we still think of them as rules.

The main benefits I see to the set-of-ordered-pairs definition are that (1) it reduces the notion of "function" to the supposedly-previously-understood notion of "set", and (2) it thereby supplies the correct criterion for equality of functions: $f=g$ means $\forall a\in A, f(a)=g(a)$. I don't see much virtue in (1) at an introductory level, where we are not concerned with foundational questions but with understanding and practical skills; saying "a function is a rule" should be just as acceptable as saying "a set is a collection of things". (I might also point out, for those who care, that there do exist foundations of mathematics alternative to ZFC in which "function" really is a primitive concept.) Similarly for (2), the criterion for equality of functions could be presented as parallel to, rather than derived from, the criterion for equality of sets.

By way of analogy, consider that it's not important for these students to know that an ordered pair $(a,b)$ can be defined as $\{\{a\},\{a,b\}\}$. That's a detail about their implementation inside ZFC set theory; the important point is that any two elements can be paired up and that they satisfy the correct criterion for equality: $(a,b) = (c,d)$ iff $a=c$ and $b=d$.

$\endgroup$
16
  • 10
    $\begingroup$ Your first sentence is perfect evidence of what I think the best answer is: We should teach functions more than one way. In my experience, reading the definition of a function as a certain kind of subset of the Cartesian cross-product of two sets was a watershed moment that I recall vividly. I didn't understand functions (which I'd be introduced to three years earlier) nearly as well before I came across the set theoretic definition. Every student is different, and I suggest we try to cater to as many as possible. $\endgroup$ May 14, 2015 at 19:20
  • 9
    $\begingroup$ Lots of people think of functions in terms of their graph. How many people would call $f(x) = x^2$ a parabola, for example? The graph of a function is almost literally a set of ordered pairs (often equipped with extra structure; e.g. that of being a locus in the Euclidean plane). $\endgroup$
    – user797
    May 14, 2015 at 21:53
  • 5
    $\begingroup$ @MikeShulman I knew what you meant, I just wanted to point out that every student's mind is different and trying to find one way to teach anything doesn't make a lot of sense. As to why I still find the set theoretic view of functions compelling, I'm not sure. I find the set theoretic view of everything compelling, so I guess it fits with how I see the world. Looking back, it might have been the first rigorous definition of a function I ever got. All the other ones had a lot of hand-waving and little charts of finite sets and arrows that still make me wince. $\endgroup$ May 14, 2015 at 22:41
  • 4
    $\begingroup$ @Hurkyl "Lots of people think of functions in terms of their graph." I agree, for me it's often bipartite (surely the edges are ordered pairs) ;-P $\endgroup$
    – dtldarek
    May 15, 2015 at 11:06
  • 2
    $\begingroup$ @MikeShulman, here is Feferman's theory of flexible types at tweet length: N is a type; if S and T are types, so are {S:phi}, SxT, and the partial functions from S to T; that gets all ordinary math. $\endgroup$
    – user173
    May 15, 2015 at 15:22
17
$\begingroup$

Let me give you yet another point of view which is a bit closer to discrete mathematics, that is, from introduction to functional programming. As this course is very function-heavy, it was worth to spend the very first class solely on the basics of functions. Please note that what I describe below builds quite different intuition than that of continuous functions (I don't know, perhaps it hampers progress during calculus and analysis courses).

Shortly, I completely detest the function-as-a-formula approach. It is a source of many misunderstandings, poor intuition and generally all the evil of the world ;-)

The ordered-pairs is only slightly better, the untyped aspect of set theory wrecks havoc on gullible minds of the innocent students. As @Benoît Kloeckner already pointed out, at best, this should be deferred until some foundations of mathematics have been laid out. This is not always possible, so if somebody presses for definition, I do give that one, as it is the one later introduced during other courses. However, it is crucial to stress that, until later, functions should be though of as different objects than just sets.

My preferred way of introducing functions is via mappings/correspondences (not necessarily one-to-one). Start with some simple examples like 4 objects assigned to some other objects. Then practice evaluation, and then more examples and more evaluation.

Only when students are comfortable mapping sets like $\{1, \spadesuit, \text{elephant}, \ddot\alpha\}$ to other similar silly sets, then introduce function that maps $0 \to 1$, $1 \to 2$, $2 \to 3$ and so on. Name it (whatever letter or other symbol is free), and practice evaluation. Introduce $0 \to 0$, $1 \to 2$, $2 \to 4$, and so on, assign it to another letter, and practice evaluation (usually the response is immediate).

Now one can comment that if we were to describe $\mathbb{R} \to \mathbb{R}$ function, then that would be a lot of writing. Even if it was possible, it would be extremely tedious, so normally we use shortcuts like $x \mapsto x+1$ or write $f(x) = x+1$. Similarly $\alpha \mapsto 2\cdot \alpha$ or $g(\bigstar) = 2\cdot\bigstar$. Nevertheless, such rules are not functions themselves, they only indicate which function we are talking about. In particular $x \mapsto 2x+2$ and $y \mapsto 2(y+1)$ describe the same mapping, the same function despite the fact "the rule" looks different.

And then, because the course is functional programming, we go on to high-order functions, that is, functions taking functions as an argument or returning functions as a result. We take a step back to the mapping approach and practice things like $$\Big\{0 \to \bigstar, \spadesuit \to \{\square \to 1, 2 \to \mathtt{x}\}\Big\}$$ (the actual notation is quite different, e.g. a big oval rather than braces) and their evaluation and after enough practice we go again into "rules", but then again some examples need writing down explicit mapping, so students go back and forth a number of times.

Then talk about whether function can point to itself or take itself as an argument, and then about standard conventions, notations, usual letters, and similar things.

It takes a whole class, but it seems worth it, the students were later much more comfortable with the functional aspect of the rest of the course (although the evidence is anecdotal, I had some comparison with the groups of other TAs). Finally, please recall this was a functional programming class, it probably wouldn't work for analysis course.

I hope this helps $\ddot\smile$

$\endgroup$
5
  • 2
    $\begingroup$ You did all this in only one class? (-: $\endgroup$ May 14, 2015 at 23:07
  • $\begingroup$ @MikeShulman Yep, 90 minutes. It helped that every time I had a really bright group. $\endgroup$
    – dtldarek
    May 14, 2015 at 23:14
  • 1
    $\begingroup$ @dtldarek Totally agree with your perspective--functions should be taught as discrete. We don't expect high school students to understand real analysis, yet that is exactly what is taught...it's unfortunate. I would almost prefer that functions not be taught at all at the high school level--scratch that, I actually don't think functions should be taught at that level. $\endgroup$
    – Jared
    May 15, 2015 at 6:25
  • 1
    $\begingroup$ +1 for mapping then formula, to make non-finite mappings well-defined. $\endgroup$ May 15, 2015 at 15:28
  • 2
    $\begingroup$ @ToddWilcox There's one more advantage to this approach that is the theme of Jared's post – when introducing things in that order every time I got a question about how do we know for which inputs we should generate the pairs, with the obvious reply about domain. And then one can tease the students with question like this: let $f$ and $g$ be two functions represented in a programming language as int f(int x) { return x; } and int g(int x) { while (true) { /* do nothing */ } /* we never get here */ return x; }, are these equal? $\endgroup$
    – dtldarek
    May 15, 2015 at 15:41
12
$\begingroup$

While I commented otherwise, let me still give an answer which complements others, relates to a more general question, and answers some starting discussion in comments.

We often consider, as mathematician, that defining everything very precisely is important, and it truly is. But what is often done, and in my opinion is often a mistake, is to consider that we should define objects in the context of set theory, much Bourbaki style; this is exactly what defining functions by their graph is.

But in fact, such definitions are really the encoding in a particular foundational theory of objects that exist in our mind relatively independently of that theory. As has been stressed already by another user, we should not forget that mathematics can also be founded on other axiomatic systems than ZF, some of which take functions as basic objects instead of sets. In such a theory, sets are defined as certain type of functions (identity function, guess). I do not think that function are sets, but that we can encode function in set theory, so that set theory can be used to describe and work with functions.

So, what else could be done? The most important thing is to determine what is relevant in the lecture to be given: pave the way to analysis? have student meet relatively abstract proofs? introduce set theory? introduce mathematical constructions, identifications, quotients and the like? Once this is determine, one should define functions in a degree of formalism and precision that fits this goal.

The definition by the graph inside set theory is relevant in some cases. In other cases, it could be more relevant to define functions through a set of axioms (regarding e.g. composition, etc.)

In most undergraduate lecture, the goal will be to face relatively general functions and to be able to prove statements like "the composition of one-to-one functions is one-to-one". For this, defining a function as the data of two sets, domain and range, and of an affectation of an element of the range to every element of the domain seems the best approach: close to intuition but general and precise enough that we can do proofs. Here the word "affectation" is not precisely defined, but let's face it: to student, "set" is not defined either. In fact, even in ZF, it turns out that we only define them by the $\in$ relation and axioms of how sets "work" together.

This reasoning applies to other objects. For example, I completely stopped defining the Riemann integral to freshmen, in favor of an axiomatic introduction of integral of continuous function (by the fundamental theorem of analysis) together with an idea of why it makes sense (edit: I first wrote "definition" instead of "introduction", but I really do is that I claim without proof that there is a construction that from a continuous function defined on a segment gives a number called the integral of the function on the segment, such that the integral satisfies the fundamental theorem; I also explain the idea of the construction and the meaning of the number in term of area, and how this relates to the fundamental theorem). There are cases where on the contrary, the classical approach seems fine to me; e.g. defining simple quotients like $\mathbb{Z}/p\mathbb{Z}$ confronts student to hugely important ideas. They should probably see this kind of construction before the abstract nonsense of functions as graph and the like.

$\endgroup$
3
  • 1
    $\begingroup$ I strongly agree with much of this, perhaps quibbling at the end, about "defining" integrals by the fundamental theorem rather than via Riemann sums: I think "definition" most often refers to cryptic, logically-correct but not explanatory set-ups, while "characterization" (or some action-oriented word) suggests something different, as with relation to the fundamental theorem of calculus. To my perception, characterization is more important than construction (to prove existence of a thing with the desired properties), especially when there is a categorical argument for uniqueness! $\endgroup$ May 17, 2015 at 20:32
  • 1
    $\begingroup$ I don't teach freshmen the formal definition of a Riemann integral, but I do try to get across to them that the fundamental theorem of calculus is not the definition. I feel it's important that the fundamental meaning of an integral is "adding up lots of little bits" and that the fact we can sometimes calculate it by antidifferentiating is something we have to prove. In particular, that idea becomes even more important in multivariable calculus, where we need to talk about integrals even of forms that are not exact. $\endgroup$ May 18, 2015 at 6:34
  • $\begingroup$ You are both right, I'll edit to reflect more accurately what I meant, which is closer to you point of view than it currently appears to be. $\endgroup$ May 18, 2015 at 7:44
8
$\begingroup$

I think as long as students know that:

  1. A function $f:A \to B$ assigns one and only one element of the codomain $B$ to each element of the domain. We write $f(a) = b$ if $a \in A$ is assigned to $b \in B$ by $f$.

  2. Two functions $f,g$ are the same if they have the same domain, codomain, and $f(a)=g(a)$ for all $a$ in their common domain.

Then there is no need to further formalize this in terms of sets of ordered pairs. I do think that this is the level where students should be starting to meet such formalizations, so it makes sense to develop the ordered pairs definition, and make sure it correctly reproduces the properties we want functions to have.

It may also be worth noting alternative definitions of a function, to indicate that the particular formalization is not as important as reproducing the qualities we want functions to have.

For instance, instead of defining a function as its graph, you could define it as its cograph.

$\endgroup$
15
  • $\begingroup$ I am curious, where should I read about cographs? $\endgroup$ May 14, 2015 at 21:03
  • $\begingroup$ @JamesS.Cook: ncatlab.org/nlab/show/graph+of+a+function#cograph $\endgroup$ May 14, 2015 at 21:06
  • $\begingroup$ However, I can't think of any way to define cographs without already having a notion of "function" in hand. The reason we can define functions as graphs is that we implicitly have the two projection functions $A\times B\to A$ and $A\times B\to B$ before we decide to call them "functions"; how do you do that with cographs? $\endgroup$ May 14, 2015 at 21:08
  • 1
    $\begingroup$ @MikeShulman The definition would be something like: a function is partition of $A \sqcup B$ into subsets $S_i$, subject to the following requirements: 1. At most one element of $B$ is in any given $S_i$ 2. If $S_i$ contains any element of $A$ it must contain an element of $B$. Then $f(a) = b$ means $a, b \in S_i$ for some $S_i \in f$. Essentially, an element of $f$ is a set containing an element of the codomain together with its preimage under $f$. $\endgroup$ May 14, 2015 at 22:10
  • 1
    $\begingroup$ ... which gives exactly the usual "dots and arrows" picture of a function that we draw. (-: $\endgroup$ May 15, 2015 at 3:06
5
$\begingroup$

It does take some work to understand a function as a set of ordered pairs. However, this course is for math majors. They'd better get comparatively simple stuff like this out of the way quickly if they're really going to major in mathematics.

So I definitely wouldn't drop the set-theory definition.

But I have noticed texts doing a rather atrocious job of motivating the definition, when it's instead a great opportunity to teach not just what a function "is" (i.e. how it is typically defined), but also the kind of generalization of concepts that you see over and over and over in mathematics.

If you start with a notion of a function as a mapping from $\mathbb{R}$ or some interval therein to a polynomal of that value, and then consider splitting up the input into various parts, you can pretty quickly motivate that the most general possible way to do this is to allow an arbitrary $y$ for each $x$ (let's call it $y(x)$). And then you quickly realize that you could leave out any arbitrary subset of the $x$s, so you have a function as a domain $X \subset \mathbb{R}$, and a labeled set ${y(x)}$ for each $x \in X$. A couple more steps and you're at the classic definition of a function--and you've also had a preview of how incredibly weird most of these functions probably are.

It neither serves the students well to just dump the definition on them or to shield them from it. They should learn the thought process behind generalizing something familiar like $f(x) = x^2$ to something less familiar like a map from $\mathbb{Q}$ to least positive numerators (and then, upon realizing that this mess is perfectly okay given the definition, they'll be motivated to think about how to add back constraints to pick out the "nice" functions, for some definition of nice).

$\endgroup$
2
  • 1
    $\begingroup$ You can show general functions to students without using the construction of functions inside ZF, so your last paragraph is in my opinion orthogonal to the question. $\endgroup$ May 15, 2015 at 7:06
  • $\begingroup$ @BenoîtKloeckner - You can show them, but you get there more naturally this way, I think; it feels more like the students are discovering it for themselves. (Well--possibly; it depends what the alternative is.) $\endgroup$
    – Rex Kerr
    May 15, 2015 at 7:17
2
$\begingroup$

I suppose my view is somewhat a middle ground.

  1. I don't see harm in defining a function by a rule...
  2. IF the rule is given an explicit domain and codomain.

The same rule $f(x)=x^2$ could easily be understood to apply to integers, rational numbers, a finite field, quaternions, complex numbers, a square matrix etc. The problem I see is not the rule, it is the assumption that $x$ is automatically a real number. In context, fine, $x$ is a real-variable. The larger conceptual hurdle to get past:

  • The formula $f(x)$ must define the domain of $f$

I get more bewilderment than I'm expecting when I introduce concepts of restriction and extension in junior level math courses. This should not be the case as the students have already had the proofs course. I think a big part of this is their reluctance to think of a function as a more than a formula. But, here is where I differ with some answers:

  • The formula $f(x)$ does not need to be replaced with a cartesian product-defined function. Rather, the domain and codomain simply need to be made explicit.

So, to clarify the concept of a function, I'd rather see more questions/discussion which draws attention the necessity of giving the domain and codomain. For example, $f(x)=x^2$ is injective for which intervals $I \subseteq \mathbb{R}$? Or, $f(x)=e^x$ with $dom(f)=\mathbb{R}$ is surjective for what choice of codomain? Problems with ill-defined formulas on quotient spaces are a second order topic, I try to start with the basic issue of domain, codomain, restriction and extension.

All of this said, I can't take away from the fact that the function as subset viewpoint is illuminating to some. In the same way, the idea that $(a,b) = \{a,\{a,b\}\}$ was illuminating for me. Or, $\sum_{i=1}^n a_i = a_n + \sum_{i=1}^{n-1} a_i$. Other folks are content to live life just trusting finite sums work as claimed. On occasion, I find it comforting to prove they work as advertised.

$\endgroup$
6
  • 2
    $\begingroup$ The need for an explicit domain and codomain is an excellent point. One often finesses this by stating the definition as "A function from A to B is...", but with the set-of-ordered-pairs definition it might happen that some function from A to B is equal (as a set) to some function from A to C, and we don't want to regard them as "the same thing". $\endgroup$ May 14, 2015 at 21:30
  • 3
    $\begingroup$ The problem with "rule" is that the word isn't defined, and then all of the examples they see are arithmetic formulas. Thus, they learn that "rule" is a synonym for arithmetic formula, and have difficulty moving past that misconception. $\endgroup$
    – user797
    May 15, 2015 at 7:55
  • $\begingroup$ @Hurkyl certainly not all the examples they would see in my class are arithmetic formulas. There's no way to define a function $\{\clubsuit,\diamondsuit,\spadesuit\} \to \{\ast,\star,\Box\}$ by an arithmetic formula. $\endgroup$ May 15, 2015 at 13:12
  • 3
    $\begingroup$ I wouldn't know what such a definition meant. My terrier's position in the house is a function of time, but is there a "rule" that determines this function? I have no idea unless you tell me what kind of rule you have in mind. Are your rules meant to be definable using a finite number of symbols taken from a finite alphabet? If so, then there are uncountably many functions that can never be defined by any rule. Suppose that I want to prove the existence of a certain function without explicitly constructing it. Do I have to prove that a rule exists? That seems very hard. $\endgroup$
    – user507
    May 16, 2015 at 15:41
  • $\begingroup$ A rule is a single-valued assignment of the element $f(x)$ for each $x$ in the domain. I don't have to describe every possible way of making such an assignment. In the same way, when we define a new object like a group there is no expectation that we enumerate all the possible groups. $\endgroup$ May 18, 2015 at 1:05
2
$\begingroup$

Here is a comment from a colleague: defining functions as sets of ordered pairs may not be so important on its own, but it's a convenient way to learn that functions are a special kind of binary relation, and thereby to emphasize that a function involves a relationship between elements of the domain and elements of the codomain. Often students get hung up on thinking of a function solely as its output values ("what you get") rather than as a relationship between the input and the output.

Edit: now I see that this may be part of what Jared was trying to say.

$\endgroup$
2
$\begingroup$

Maybe... you're asking the wrong question? Don't think of this as trying to define the notion of function, but instead as a valuable exercise in how to use set theoretic reasoning to study something.

We have some idea of "function" we want to make precise. The important things are:

  • Functions can be evaluated
  • A function is completely determined by its evaluations

Now, the standard set-theoretic technique here is to express an object as the set of behaviors that object exhibits. Well, that's usually too big and complex; we pick out some sufficient set of behaviors that is easy to work with and is sufficient to distinguish objects.

And here, there is an obvious candidate for the set of behaviors: we represent a function $f : A \to B$ in terms of its evaluations: as the set $G_f$ of all $(a,b)$ where $a$ is in the domain and $b$ is the value of the function at $a$. ($G$ for graph)

Or maybe we believe the domain and codomain are important too, so we represent $f$ as the triple $(A, G_f, B)$. Or maybe just as the pair $(B, G_f)$, since $A$ can be recovered from $G_f$.

Once we've chosen a representation scheme, we then ask the question of which things actually represent functions. It's easy to see the vertical line test is necessary. And then there are two paths we might take:

  • Given a graph $G$ satisfying the vertical line test, it's 'obvious' there is a function whose graph is $G$.
  • The issue of which things are actually functions is very complicated, so we'll sidestep the whole issue and first worry about what can be studied easily, and later worry about the complexity

Either way, we arrive at the conclusion that "set-theoretic functions" is a notion we should be studying. And if we believe the two bullet points at the top of my post, then we should believe studying set-theoretic functions should tell us something about functions.

$\endgroup$
3
  • $\begingroup$ Can you give another example of what you mean by "set theoretic reasoning"? I don't quite understand what you mean to denote by it as a general phrase. $\endgroup$ May 19, 2015 at 4:59
  • $\begingroup$ A geometric shape? It's the set of points lying on it. Unary relation? It's the class of all things satisfying the relation. What is the quotient of a set by an equivalence relation? Well, I can specify an element of the quotient by selecting an element of the original set... therefore I'll make the elements of the quotient simply be the set of its preimages. I refer to picking out a set of properties that completely (and uniquely) describes objects of some type, and then identifying instances of the original notion with the corresponding set of descriptions. $\endgroup$
    – user797
    May 19, 2015 at 5:23
  • $\begingroup$ Okay, I see. That's an interesting suggestion; I will need to give it some more thought. $\endgroup$ May 19, 2015 at 20:29
1
$\begingroup$

I still believe that the definition of function using the set of ordered pairs is a nice way to go about it. You have to let the students know the condition imposed on the set of ordered pairs before you call it a function otherwise they may think all relations are functions. Once you let them realize that these ordered pairs must have distinct first elements, I think it drives the point home. You can easily tell when a relation defines a function. All functions are relation but the converse is not true.

Warning: We are not talking about function of several variables here.

$\endgroup$
2
  • 1
    $\begingroup$ Technically, a function of several variables is still a set of ordered pairs -- it's just that the first element of the pair is itself an ordered list. For example, the function with formula $f(x,y) = x+y$ is a subset of $\mathbb{R}^2 \times \mathbb{R}$, some of whose elements are $( (0,0), 0)$, $( (0,1), 1)$, $((1,1),2)$. $\endgroup$ May 16, 2015 at 0:02
  • 2
    $\begingroup$ Can you say anything to explain your position? What do you think the benefit is of defining functions in this way? $\endgroup$ May 16, 2015 at 2:21
1
$\begingroup$

It is my impression that the primary function (no pun intended) of thinking of functions as subsets of ordered pairs is not so much to reduce functions to sets in particular, but to reduce functions to objects about which it is psychologically easier to reason about. The primary function of thinking of functions as rules, on the other hand, is to give us a way to construct functions we care about in the first place.

I would argue that at the heart of the matter is the logical distinction between open and closed terms, i.e. between terms involving variables and terms that do not. For example, $(2+3\times(7+11))\div 7$ can be thought of as a "rule" giving a (natural) number, but $x+3$ is not any particular natural number; rather it is a hypothetical (natural) number, and statements regarding it, and which we may try proving, are then hypothetical assertions.

Arguing about, or quantifying over, hypothetical natural numbers is not a terribly abstract thing to do since we do know that every natural number has a canonical form (it is one of $0$, $1$, $2$, etc.). What this means is that it is psychologically easy to imagine the possibilities whenever we argue about hypothetical natural numbers. E.g. "prove that the product of three consecutive natural numbers is divisible by $6$": the full range of possibilities that this statement may apply to is (psychologically) easy to picture.

When it comes to arguing about, or quantifying over functions, if one uses the conception of functions as being given by rules, then functions do not have canonical forms, and this makes picturing the totality of the domain of all functions psychologically difficult ("what are all possible rules?" is too open-ended a question). The conception of functions as subsets of ordered pairs alleviates this psychological difficulty (to a certain extent) since it is actually the conception of canonical forms for the functions: any function is reduced to being a certain kind of subset of ordered pairs.

In particular, it is the access to these canonical forms, the ability to manipulate them, and construct them, that can give student the intuition for how functions behave, because these forms, unlike the rules, are psychologically concrete, much the same way that factoring and playing around with actual natural numbers can give intuition about how the natural numbers behave.

$\endgroup$
2
  • $\begingroup$ This is an interesting argument. But I don't understand what is any more canonical or "actual" about $\{(x, x+3) \mid x\in \mathbb{R}\}$ than $\lambda x:\mathbb{R}. x+3$. Indeed, in type theory, the "canonical" elements of function types (in the precise sense of normal forms) are exactly the $\lambda$-abstractions. $\endgroup$ May 16, 2015 at 21:34
  • $\begingroup$ The function type by definition internalizes "rules" as its terms, but the "rules" exist (meta-theoretically) prior to the introduction of the function type: the "rules" are simply the hypothetical typing judgments. Type theoretically, my claims would be that the Graph type is used instead of the function type to internalize the "rules" so that we may make statements about them, and that the Graph type represents something conceptually and psychologically easier for a beginner to deal with (all "static" graphs) than the function type does (all "dynamic" hypothetical typing judgments). $\endgroup$ May 17, 2015 at 18:43
1
$\begingroup$

I'll play devil's advocate for a bit.

The real trick is that, for the most part, nobody cares about functions, except sometimes when working with finite things. Instead, they're interested in polynomials or rational functions or semialgebraic functions or analytic functions or linear transformations or Schwartz distributions or functions modulo negligible functions or measures or correspondences or computable functions or somesuch.

The problem is that

  • These things can be hard to describe and work with synthetically
  • These share a lot of common features you would like to be able to study all at once

The point of the notion of (set-theoretic) function, on the other hand, is

  • It's easy to define clearly and precisely, and to prove the basic facts about them
  • All of the above ideas can either be expressed and understood as a special kind of function, in terms of functions, or by the way they generalize the notion of function

As I understand the intent, trying to talk about a function as a rule robs it of its primary role in mathematics, and is sort of circular anyways; the only way I know to get the needed generality this way is to define rule to mean function.

$\endgroup$
3
  • $\begingroup$ As a category theorist, I care very much about functions: they are the morphisms in the category of sets. As such, I entirely agree that functions are important; the question is whether "function" should be defined -- for students -- as a set of ordered pairs. Any other definition of function would also share the advantages you list (although part of my question is because my experience so far is that it is not easy for students to prove the basic facts about functions-as-sets). Functions as rules are perfectly effective and no more circular than defining a set as a "collection". $\endgroup$ May 18, 2015 at 6:26
  • $\begingroup$ The DA's point is that if you're going to "define" function in a vague way, then there's not much point in bringing up the idea at all; better to just stick with an intuitive version of whatever notion is more directly appropriate to what one is studying. $\endgroup$
    – user797
    May 18, 2015 at 6:55
  • $\begingroup$ We don't define sets, but there's a point to bringing them up. $\endgroup$ May 19, 2015 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.