Functions as Sets
by mrichard, Oct 30, 2018, 10:53 PM
In this little post, we'll expand on what we've learned about sets and functions. Specifically, we'll double-down on the claim that sets are vital to everything we do in mathematics. Functions are not just a way to desribe interactions between sets: functions are sets!
Many people will be familiar with the idea of an ordered pair. This is often how we describe "points" created by a function. When we write the ordered pair
in the context of an existing function
, we typically mean
In this way, a function can be completely diescribed by its set of ordered pairs: 
This "set-builder" notation is new. Let's describe it briefly.
Now, we have a way to describe a function as a set. Namely, a function is just a set where every element is an ordered pair; each ordered pair describes a rule of the form
This is a great first step! We are back to sets being the backbone of everything. Yet, there is something missing. All we've talked about are sets, and all of a sudden we introduce this "ordered pair." What are the rules about an ordered pair? What is it? As far as we can tell, it's some arbitrary object we created, unrelated to sets. As you may recall, a set is unordered. In set notation we write
So, how do ordered pairs relate to sets? Do they?
This will be our first dive into greater abstraction, analyzing an object we are intuitively familiar with in the context of another object we know as a foundation. In particular, we want to move from intuition to definition. To start, what is the defining aspect of an ordered pair?
As the name suggests, it is a pair of objects that happens to be in a certain order. Specifically, if we have two ordered pairs
and
, what does it mean to have
Intuitively, we would say "each of the parts of the pair are equal to the part in the othe pair." As a definition though, we would say
means
and 
This is our defining rule for an ordered pair. Next, we need to figure out how to best describe this relationship using sets.
Here is the accepted mathematical definition.
This strikes most people as quite strange at first. But as we consider the implications of this definition, it eventually gives us an idea of "order" we want from an ordered pair. The first element is
, the one that exists in both sets. The second element is the element that remains.
The payoff is we now have a full set-based definition of a function. We saw how a function is a set of ordered pairs, and we now see that an ordered pair is just a set as well. This set just happens to contain two more sets!
Here is our fully set-based definition of a function.
When doing mathematics, most people do not concern themselves with this definition in their daily work. It is good to see, to understand the foundation of what we do, but we come up with alternate notation like
to make things a bit easier to communicate.
We can go even deeper, writing everything in terms of various logical statements. All of math can theoretically be written down using a symbol soup. But that is ultimately unhelpful for communication, and having a clearly communicated idea is one of the beauties of well-formulated mathematics.
Many people will be familiar with the idea of an ordered pair. This is often how we describe "points" created by a function. When we write the ordered pair




This "set-builder" notation is new. Let's describe it briefly.
We wrote down the set
The first term
is the type, or form, of each element in the set. So, each element in
will be an ordered pair. The vertical line can be read as "such that", and whatever follows are the conditions on the elements in the set. Therefore, the set notation for
can be read as
is the set of all ordered pairs
such that
As another quick example, we could have a set
This would be the set of all
such that
is between
and
.




Set notation wrote:



As another quick example, we could have a set





Now, we have a way to describe a function as a set. Namely, a function is just a set where every element is an ordered pair; each ordered pair describes a rule of the form

This is a great first step! We are back to sets being the backbone of everything. Yet, there is something missing. All we've talked about are sets, and all of a sudden we introduce this "ordered pair." What are the rules about an ordered pair? What is it? As far as we can tell, it's some arbitrary object we created, unrelated to sets. As you may recall, a set is unordered. In set notation we write

This will be our first dive into greater abstraction, analyzing an object we are intuitively familiar with in the context of another object we know as a foundation. In particular, we want to move from intuition to definition. To start, what is the defining aspect of an ordered pair?
As the name suggests, it is a pair of objects that happens to be in a certain order. Specifically, if we have two ordered pairs






This is our defining rule for an ordered pair. Next, we need to figure out how to best describe this relationship using sets.
Here is the accepted mathematical definition.
Definition
Ordered pair: We define an ordered pair
as the set 
Ordered pair: We define an ordered pair


This strikes most people as quite strange at first. But as we consider the implications of this definition, it eventually gives us an idea of "order" we want from an ordered pair. The first element is

The payoff is we now have a full set-based definition of a function. We saw how a function is a set of ordered pairs, and we now see that an ordered pair is just a set as well. This set just happens to contain two more sets!
Here is our fully set-based definition of a function.
Definition
Function: A function
with a collection of rules, or assignments, of the form
with
and
, is the set

Function: A function





When doing mathematics, most people do not concern themselves with this definition in their daily work. It is good to see, to understand the foundation of what we do, but we come up with alternate notation like

We can go even deeper, writing everything in terms of various logical statements. All of math can theoretically be written down using a symbol soup. But that is ultimately unhelpful for communication, and having a clearly communicated idea is one of the beauties of well-formulated mathematics.