A relation is a set, and a function is a specific kind of relation. Therefore a function is a set also.

However, at the levels of math I've studied (undergraduate only), I get the feeling people don't talk about functions as sets in the purest sense.

With the aim of better understanding whether there's some sort of informal line between functions and sets, here's one question I have:

Let $f(x)=\sqrt{x}$. (With domain all real numbers greater than or equal to 0)

Let $g(x)=\sqrt{|x|}$. (With domain all real numbers)

Is it correct to say $f \subseteq g$ ? How about $f(x) \subseteq g(x)$?

More broadly, am I right to notice a line between functions and sets? Can we always use the language of set theory to talk about functions?

  • 3
    $\begingroup$ One way to think about a function $$f: A \mapsto B$$ is to think about it as an element of the set of functions that map from the set A to the set B $\endgroup$ – Bolutife Ogunsola Jan 19 '17 at 0:22
  • 4
    $\begingroup$ @BolutifeOgunsola: The notation is $f:A\rightarrow B$. Your symbol links the function argument with its value, e.g. $x\mapsto \sqrt x$. $\endgroup$ – TonyK Jan 19 '17 at 0:31
  • 1
    $\begingroup$ Related: mathoverflow.net/questions/90820/… $\endgroup$ – Nick Alger Jan 19 '17 at 2:56
  • 3
    $\begingroup$ You can, but that doesn't mean you should. For example, it's also true in standard set theory that $2 \subset 3$, but this is more of a coincidence (or implementation detail, to make an analogy with programming) than a mathematical truth. $\endgroup$ – gardenhead Jan 19 '17 at 5:20
  • 1
    $\begingroup$ Consider the map $f:\mathbb{R}\to\mathbb{R}$ given by $f(x)=e^x$, and consider the map $g:\mathbb{R}\to\mathbb{R}^+$ given by $g(x)=e^x$. Then $g$ is a bijection, while $f$ is not. If we formalize a function as the set of ordered pairs, we have the problem that $f$ and $g$ become the same set! You cannot reconstruct the codomain from the graph set, yet in our daily lives we consider the codomain a property of a function. This suggests we should formalize a function $f:A\to B$ as a triple $(A,B,\Gamma )$ where $\Gamma$ is the graph (set of ordered pairs). $\endgroup$ – Jeppe Stig Nielsen Jan 19 '17 at 13:11

When you think about a function as a set, it is a set of ordered pairs. The first element of the pair belongs to the domain, the second to the range. When you refer to the function as a whole, it should be $f$ or $g$, not $f(x)$ which should be the value of the function at $x$. Seen as a set of ordered pairs, every pair that belongs to $f$ also belongs to $g$, so you can say $f \subset g$

| cite | improve this answer | |
  • $\begingroup$ Thanks for your answer, especially for the difference between f and f(x). One question: You say "Seen as a set of ordered pairs..." That makes it sound like functions can't always be thought of that way. Is there ever a situation where it's off-limits to think of a function as a set of ordered pairs? $\endgroup$ – Archr Jan 19 '17 at 0:33
  • 3
    $\begingroup$ @user404789: It's never off limits, and always valid. But there are situations where it's not useful. For instance, if you are planning a car journey, you don't need to consider how many revolutions the wheels will make. $\endgroup$ – TonyK Jan 19 '17 at 0:36
  • 2
    $\begingroup$ Some people define a function to include information about the domain and range. Your $f$ would be a function from the non-negative reals to the reals (or to the non-negative reals) while $g$ is from all the reals to the same place. It then becomes problematic to say $f \subset g$ because the function becomes a bunch of ordered pairs plus a wrapper and we don't know what to make of the subset language as it applies to the wrapper. $\endgroup$ – Ross Millikan Jan 19 '17 at 0:37
  • $\begingroup$ But the only purpose my wrapper serves is to specify which ordered pairs the function includes. If the function is just a set at its heart, then the wrapper simply helps to pick the pairs in the set, after which we can forget about it. What we're left with is a set with no extra baggage. Right? $\endgroup$ – Archr Jan 19 '17 at 0:46
  • $\begingroup$ That would be right. And if you get rid of the baggage your subset thing works fine. I have seen people get very picky about the wrappers, though. I think the mainstream view would support yours. $\endgroup$ – Ross Millikan Jan 19 '17 at 0:54

There are two separate things:

1) How we think about mathematical objects; and

2) How we formalize mathematical objects within set theory.

People such as Archimedes, Eudoxus, Newton, Euler, and Gauss did brilliant math long before the development of set theory. Clearly set-theoretic formalization is not a prerequisite of doing math.

The formalization of mathematical objects in the context of set theory is a relatively recent historical development, having taken place between say the late nineteenth century and much of the twentieth. During that period of time mathematicians found a need for more rigorous foundations, and set theory turned out to be highly useful for this purpose. It's not necessarily the last word on foundations; nor do we spend much time caring about the formalization most of the time.

For example if we are in calculus class and we encounter the function defined by $f(x) = x^2$, we typically think of it as a machine or black box that inputs a real number and outputs the square of the input. Nobody thinks of it as a set of ordered pairs.

On the other hand if we're learning analytic geometry for the first time, given $f(x) = x^2$ we make a table containing a few sample pairs $(x, x^2)$, then we plot those points in the $x$-$y$ plane, and we see that the dots seem to form a parabola. When we graph a function we are implicitly using the idea of a function as a set of ordered pairs!

The best way to think about this is that we have two points of view, the intuition and the formalism. We go back and forth between them as needed. Sometimes a function is a machine or a mapping or a correspondence, and sometimes it's a set of ordered pairs. Whichever point of view helps us at any given moment.

One can ask about the nature of the relationship between the intuitive idea of a function (or any other mathematical object) and the set-theoretic symbology that represents or models that object. This is a question of philosophy.

Perhaps functions and numbers and sets exist in some abstract Platonic realm, and our symbols are accurate representations of them. Or perhaps our symbols are helpful but inaccurate representations. Or perhaps there are no functions or numbers or sets at all, just strings of symbols manipulated in accordance with formal rules. In that latter point of view, math is just a game like chess. Nobody thinks the laws of the universe are written in chess, but many people think the laws of the universe are written in math. Why are the rules of math so different than the rules of chess?

Many smart people have thought deeply about these issues. But when they think about these things they are doing philosophy, not math.

The takeaway is that when we do math, we use both intuition and formalism, whichever is most helpful at any given moment. And we don't think about the philosophy, unless we are doing philosophy.

| cite | improve this answer | |
  • $\begingroup$ I don't know enough about set theory to vote on this answer, but this was an incredibly enjoyable and fascinating read! $\endgroup$ – DeathByTensors Jan 19 '17 at 14:56
  • $\begingroup$ @DrewBuckley Thanks much. $\endgroup$ – user4894 Jan 19 '17 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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