Everything is a Set: Constructing the Reals
What does it mean when we say $\sqrt{2}$? Well, you may say, it’s when we have a number $x$ such that $x^2 = 2$. That may satisfy you, but it shouldn’t. The notion of this abstract $\sqrt{2}$ is weird in that we define it as the “opposite” of squaring two. What does $\sqrt{2}$ look like?
Let’s take a step back. What do we mean when we say $2$? I can already hear the arguments, “Vinay, it’s two. Come on. I have two eyes. I have two ears. It’s easy.” To this end, we have a more concrete idea of what $2$ looks like, but we still don’t know what it is. This may seem acceptable to you, but considering that math is built on numbers, it’s worthwhile to examine what we mean by numbers. Here, I will give a walkthrough on constructing the real numbers, $\mathbb{R}$, which comprises of numbers like: $0, 42, 7, \frac{9}{17},$ and $\sqrt{38.9}$ to list a few.
By the end of this series on constructing the real numbers, you’ll learn how to represent a real number using foundational mathematical objects.
What is a set?
Note, feel free to skip this section if you know what sets are.
Since we’re taking on the task of constructing the real numbers, we need some tool. In this case, we’ll be looking at set theory as the basis for understanding objects.
We will use sets. There’s only one thing that a set tells us: whether an object is in the set or not. That’s it.
What are the implications of this definition? Objects in sets are unique. Second, there is no order to a set. We only know whether an object is in a set or not, meaning it has no position.
Let’s look at an interactive example. Move the items on the right in and out of the circle to see how the set looks like.
$$A = \{\}$$
Let’s do a quick review before we move on.

Is $\{marshmallow, red, 📘\}$ a set?

If I have $\{x, orange, laptop\}$, and I added the element “x” to it, what does the set look like?

Are $\{falcon, blue\}$ and $\{blue, falcon\}$ different?
We now have the basics of sets down! Now to get to the interesting stuff.
ZFC
Now that we know what a set is, we need to have some basic truths we can agree on. These are known as axioms. I can’t prove these to you, but think of them as definitions. This is the foundation for everything we will do.
The way we’ll do this is through Zermelo–Fraenkel set theory. There is so much to look at here, but we’ll stick to the most relevant aspects of the theory.

There exists a set. I think we can agree on this one. This just says that it is possible to construct a set that obeys the rules like above.

There exists an empty set. An empty set is one which has no elements. This should feel like a reasonable assumption. Note, this set is unique. There’s only one way to exclude every object, and that’s by not having any object in it. We denote this set as $\emptyset$, which is just some mathematical notation; nothing to fear.

We can create a set that contains all the elements of two sets. This is the union operation. It’s best to show this by example: $A=\{hi, blue\}$ and $B=\{green\}$. Then $A \cup B = \{hi, blue, green\}$.
There are other axioms in ZFC, but these are the bare necessity for what we need to do.
Ordered Pairs Using Sets
This will be helpful later, but let’s try to understand how we’d represent an ordered pair using sets. Why do we care about this? Well, it seems reasonable we’d want to represent an object $(a, b)$ to be different than $(b, a)$. Essentially, we want to construct an ordered pair using an unordered set.
How does this make sense?! How do we create order from no order? We can’t just throw them in a set because $\{a, b\}$ is the same as $\{b, a\}$.
The solution is to encode each item as a set itself that contains previous elements. Let’s look at an example to understand this.
We want to represent $(a,b)$ as a set. According to what I said above, we would write this as a set like $\{ \{a\}, \{a,b\} \}$. How does this fix our problem? Let’s try to represent $(b,a)$: we get $\{ \{b\}, \{b,a\} \}$. Both sets have the item $\{a,b\}$ in it, but the difference is the set with either only $a$ or only $b$.
Now something important to see here is that inside each set, we can indeed have another set, because it’s just another element.
This way of constructing ordered pairs is meant to provide you with a reason to believe that we can do so. If this concept feels weird, don’t stress. The main takeaway is that ordered pairs can exist from sets. This allows us to construct something called a sequence, a collection of objects where the objects are ordered. A sequence is an “extended” ordered pair: it can contain as many elements as we’d like and maintain an order.
Wrapping Up
This post should’ve given you a brief background on set theory, the goal of which is to construct mathematical objects from this one basic concept: a set. We talked about some of the basic ZFC axioms and introduced how we can construct an ordered collection from this unordered collection.
Now what? We have the foundation for constructing the reals. The next post will do a deepdive in constructing the real numbers, starting with your basic counting numbers like $0,1,2,$ and so forth. We’re going to construct these complicated objects solely from the information above. As a plus, it’ll use cool interactive graphs to explain the concepts!
If this interests you (which it should!), consider subscribing to get updates on when the next post drops. Until then, I encourage you to think about how you’d go about constructing numbers using only the information we’ve covered!
Update: Check out the follow up post here!