-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Here is a copy of a long message I sent my students (Spring 2025):
First, let's review the definition of function that one often encounters in high school/early college courses.
A function f from a set X to a set Y is a rule that assigns to every element of X a unique element in Y.
This seems like a perfectly good definition, but the issue is that if you poke it a little, you'll come to realize that "rule" is nearly a synonym for function.
This is parallel to how we say that a set is a collection of objects. Again, the issue is that set and collection appear to be synonyms with each depending on the other. Fixing this issue and defining set precisely is tricky business and it is culturally agreed upon (by most) that it isn't worth the effort for most people that work with sets.
The good news is that we can be a lot more precise about what a function is. (But the bad news is that the careful definition relies on understanding what a set actually is, which I just pointed out is a bit problematic; but I digress.)
History side note: The loosey-goosey defintion above for function is more or less what Leibniz, Newton, and Euler (founders of calculus) used. The formal set-theoretic definition of function was introduced at the end of the 19th century.
Here is the definition of function from our (my) book (with some minor tweaks for the current purposes):
Let X and Y be two nonempty sets. A function f from X to Y is a relation from X to Y such that for every x in X , there exists a unique y in Y such that (x,y) is in f (often written as f(x)=y). The set X is called the domain of f while the set Y is called the codomain of f.
This formal definition is the same as what you would encounter in most (not all) formal settings. But it isn't without it's issues, which I will elaborate on.
In order to get at the heart of the issue, we need to return to the definition of relation. According to the book:
Let A and B be sets. A relation R from A to B is a subset of AxB.
Here is the crux of the issue. Are A and B part of the ingredients of a relation R? That is, is "from A to B" part of the definition?
I (and probably most mathematicians) sweep this little issue under the rug. For many people, it might be swept under the rug because they aren't even aware of the issue, but for others (like me) it is a matter of convenience! Sometimes I'd like the A and B to matter and sometimes I don't!!
Let's explore an example. Let R={(a,x), (b,x), (c,y)}. Is R a relation? Well the definition said "from A to B", but what are A and B? One possibility, is:
A = {a,b,c}, B = {x,y}
But I suppose another is:
A = {a,b,c,d,horse}, B = {x,y,z,unicorn}
In both cases, the underlying set of arrows R is the same, but the "ambient spaces" we are drawing arrows on are different!
And now, we have to cope with what it means to say two relations are equal. Do I want to say, two relations R and S are equal if they are equal as sets (i.e., same set of ordered pairs)? This seems reasonable. Or, do I want to say relations R and S are equal if the underlying "first" sets are equal (as sets), the underlying "second" sets are equal (as sets), AND R and S are equal as sets? This also seems very reasonable! I bet there would not be consensus among all of you.
Let me formalize the second option above.
One reasonable viewpoint is that technically my definition of relation R from set A to set B is a triple (A,B,R), where A and B are sets and R is a subset of AxB. My second option for equality of relations given above can be formalized as follows. Relations (A,B,R) and (C,D,S) are equal (as relations!) if A=C, B=D, and R=S (as sets!).
Implicitly, this is what I have in mind throughout the book. This is not obvious! And I'm sure if we look carefully, we can find inconsistencies throughout the book (and definitely in other books besides mine).
If you agree that a relation is really a triple of objects (A, B, R), then since a function is a special type of relation, then a function is also a triple of objects (X, Y, f). And if this is agreeable to you, then we say that two functions are equal if they have the same domain, same codomain, and same "set of arrows". Implicitly, this is the approach I'm taking in the book.
There are other reasonable approaches. The second most common is to invoke the first choice I gave above for when two relations are equal. That is, two functions are equal if they have the same "set of arrows". Based on the definition of function this immediately implies that the two functions have the same domain.
So, it all really boils down to whether we want to include the codomain as an ingredient of a function. It's a matter of taste.
While pondering this today, I stumbled on the following quote that I think is relavent:
You can put down all sorts of formalisms, none of which seem to be satisfactory in all contexts.
The quote above is from this discussion:
https://math.stackexchange.com/questions/2054563/some-confusion-about-what-a-function-really-is
OK, I promise I'm almost done!
Let's assume we are going with the following definition of when two functions are equal: two functions are equal if they have the same domain, same codomain, and same "set of arrows" (i.e., ordered pairs with the property that each first entry is from domain, each second entry is from codomain, and every domain element is paired with a unique codomain element).
Because the other competing potential notion of equality of function is reasonable (and in fact useful), mathematicians have defined the "graph" of a function as follows.
The graph of a function f is the set {(x,y) : f(x)=y}. This would allow us to incorporate the approach November was pressing for.
Here is an example. Let f:R to R (ugh, where this R is the real numbers, not a relation R) defined via f(x) = x^2, and let g:R to [0,infinity) be defined via g(x) = x^2. Then using my definition of equality of functions, f and g are NOT equal (as functions), but they do have equal graphs.
Last item (I think)! If you were a lawyer, you could bust me (and most mathematicians) with my use of "is" in the definition. I'll elaborate:
I said: A relation R from A to B IS a subset of AxB.
Then later I tried to convince you that a relation IS a triple (A,B,R).
This is a common abuse, but I agree it is problematic. Is the data type of a relation a "set of ordered pairs" or is it "a triple of sets where the last in the triple is a set of ordered pairs". It can't be both officially.
The abuse is this. We are implicitly identifying R and (A,B,R): R = (A,B,R) (where God only know what that equals sign means...).