# A deep take on countability, cardinality and ordering

I’ve been teaching CMSC250, Discrete Mathematics, over the past year in CS UMD. Last semester, I typed a more philosophical than mathematical post on Countability, Cardinality and Ordering, which I’m repeating here for the community’s sake.

After our ordinality lecture last Tuesday, I had a student come to me and tell me that they were not sure how to think about ordinality: they were understanding the relationship between cardinality and size, since it is somewhat intuitive even for infinite sets (at least to them!), but ordinality still appeared esoteric. That’s 100% natural, and in this post I will I’ll try to stray away from math and try to explain how I think about countability, cardinality and ordinality intuitivelyThis post has exactly zero things to do with the final, so if you want to limit your interactions with this website to the exam-specific, you may stop reading now.

Before we begin, I would like to remind you of a definition that we had presented much earlier in the semester, I believe during an online quiz: A set S is dense if between any two elements of it, one can find another element. Note something interesting: only ordered sets can be qualified as dense or not! Technically, we had not presented the notion of an ordered set when we discussed dense sets, but it is intuitive enough that people can understand it.

Countability

We say that any enumerable set is countable. Enumerable, mathematically, means that we can find a bijection from the non-zero naturals to the set. Intuitively, it means “you start from somewhere, and by sequentially making one step, no matter how long it takes, you are guaranteed to reach every single element of the set in finite time”. Whether this finite time will happen in one’s lifetime, in one’s last name’s lifetime, or before the heat death of the universe, is inconsequential to both the math and the intuition. Clearly, this is trivial to do for either the non-zero naturals or the full set of naturals: you start from either 1 or 0, and then you make one step “forward”.

However, we also saw in class that this is possible to also generalize for the full set of integers: we start from 0 and then start hopping around and about zero, making bigger hops every time. Those hops are our steps “forward”.

Those results are probably quite intuitive to you by now, and I feel that the reason for this might that both  and  are non-dense sets.There are no naturals or integers between  and  ( or ).

Let’s stray away from  for now and fast-forward to . We have already shown the mathematical reason, Cantor’s diagonalization, for which the set of reals is uncountable. But what’s the intuition? Well, to each their own, but here’s how I used to think about it as a student: Suppose that I start from zero just to make things easier with respect to my intuitive understanding of the real number line (I could’ve just as well started with ).

Then, how do I decide to make my step forward? Which is my second number? Is it 0.1? Is it -0.05? But, no matter which I pick as my second number, am I not leaving infinitely many choices in between, rendering it necessary that I recursively look into this infinite interval? Note that I have not qualified “infinite” with “countably infinite” or “uncountably infinite” yet. This was my personal intuition as a Discrete Math student about 11 years ago about why  is uncountable: Even if you assume that you can start from 0, there is no valid ordering for you to reach the second element in the sequence of reals! Therefore, such a sequence cannot possibly exist!

But hold on a minute; is it not the case that this argument can be repeated for ? Sure it can, in the sense that between, say,  and , there are still infinitely many rationals. It is only after we formalize the math behind it all that we can say that this is a countable infinity and not an uncountable one, as is the case of the reals. But still, we have to convince ourselves: why in the world is it that the fact that every one of these infinite numbers can be expressed as a ratio of integers make that infinity smaller than that of the reals?

Here’s another intuitive reason why we will be able to scan every single one of these numbers in finite time: everybody open the slide where we prove to you that  is countable using the snaking pattern. Make the crucial observation that every one of the diagonals scans fractions where the sum of the denominator and the numerator is static! The first diagonal scans the single fraction () where the sum is 2. The second one scans the fractions whose denominator and numerator sum is 3 (). In effect, the  diagonal scans the following fractions:

For those of you that know what equivalence classes are, we can then define  as follows:

Let’s see this in action…

Note that essentially, with this definition, we have defined a bijection from  to . We know that  is countable, so we now know that  is also countable! 🙂

Let’s constrain ourselves now to the original challenge that we (I?) are faced with: we have selected 0 as our first element in the enumeration of both  and  (the latter is assumed to exist), and no matter which our second element is (say it’s ), we have infinitely many elements in both sets between 0 and But now we know that those infinites are different: in the case of . we know for a fact that we will reach all of those fractions whose decimal values are in . In the case of , there is no such enumeration: any enumeration we define will still leave an… uncountably infinite gap between any two elements in “sequence”.

Remember how in our lecture on Algebraic and Transcendental numbers, we gave only three examples of numbers in , yet the fact that  is uncountable when  is countable guarantees that there are “many more” Transcendental numbers than Algebraic? Same thing applies here with the rationals and irrationals: given any interval of real numbers , there are many more irrationals than rationals inside that interval... If you define a system of whole numbers (integers), there are many more quantities that you will not be able to express as a ratio of integers. That’s why back in the day (300 B.C) when Euclid proved that  is not expressible as such a ratio  (or, more accurately, that  cannot be expressed as the square ) his result was so unintuitive; those Hellenistic people did not have rulers. They did not have centimeters or other accepted forms of measurement. The only thing they had were shoestrings, or planks of wood which they put in line and “saw” that they were the same length, and then they measured everything else as the ratio of such “whole” lengths.

Cardinality

Recall something that we said when we were discussing the factorial function and its combinatorial interpretations when applied on positive integers. Bill’s explanation of why  was purely algebraic: If it were , then, given the recursive definition  for , every  would be rendering it a pretty useless operation. My explanation was combinatorial: we know that if we have a row of, say,  marbles, there are  different ways to permute them, or  different orderings of those marbles. When there are no marbles, so there is only one way to order them: do nothing, and go watch Netflix.

Let’s stick with Bill’s interpretation for a moment: the fact that some things need to be defined in order to make an observation about the real world work. In this case, the real world is defined as “algebra that makes some goddamn sense”. My explanation is more esoteric. You could say: “What do you mean there’s only one way to arrange zero things? I don’t understand, if there are zero things and there’s nothing to do, shouldn’t there be, like, 0 ways to arrange them?”. So, let’s stick with Bill’s interpretation to explain something that I attempted to explain to a group of students after our first lecture this semester: Why do negative numbers even exist?

Here’s one such utilitarian explanation: Because without negative numbers, Newtonian Physics, with their tremendous application in the real world, would not work. That is, the model of Newtonian Kinematics with its three basic laws, which has been empirically proven to describe very well things that we observe in the real world, needs the framework of negative numbers in order to, well, work. So, if you’re not ok with the existence of negative numbers, you had better also be able to describe to me a framework that explains a bunch of observations on the real world in some way that doesn’t use them. For example, you probably all remember the third law of Newtonian motion: For every action , there exists an equal and opposite reaction :

Recall that force is a vectoral quantity since it is the case that , and acceleration  is clearly vectoral, as the second derivative of transposition

The only way for Newton’s third law of motion can work is if . This is only achievable if the two vectors have the same magnitude but exactly opposite directions. No other way. Hence the need to define the magnitudes as follows:

and the necessity for negative numbers becomes clear. Do you guys think the ancient Greeks or Egyptians cared much for negative numbers? They were building their theories in terms of things they could touch, and things that you can touch have positive mass, length, height…

Mathematics is not science. It is an agglomeration of models that try to axiomatize things that occur in the real world. For another example, ZFC Theory was developed in place of Cantorian Set Theory because Cantorian Set Theory can lead to crazy things such as Russel’s Paradox. Therefore, ZFC had to add more things to Set Theory to make sure that people can’t do crazy stuff like this. If we discover contradictions with the real world given our mathematical model, we have to refine our model by adding more constraints to it. Less constraints, more generality, potential for more contradictions. More constraints, less generality, less contradictions, but also more complexity.

So when discussing the cardinality of  and  and finding it equal to , we are faced with a problem with our model: the fact that  (I have used the notation of proper subset here deliberately). Now, I just had a look at our cardinality slides, and it is with joy that I noticed that we don’t use the subset / superset notation anywhere. That’s gonna prove a point for us.

So, back to the original problem: intuitively understanding why the hell   and  have the same cardinality when, if I think of them on the real number line, I clearly have :

The trouble here is that we have all been conditioned from childhood to think about the negative integers as “minus the corresponding natural”. This conditioning is not something bad: it makes a ton of sense when modeling the real world, but when comparing cardinalities between infinite sets, that is, sets that will never be counted entirely in finite time, we distance ourselves from the real world a bit, so we need a different mathematical model. To that end, let’s build a new model for the naturals. Here are the naturals under our original model:

This digits that we have all agreed to be using have not been around forever. The ancient Greeks used lowercase versions of their alphabet:  to name a total of 25 “digits”, while the Romans used a subset of their alphabet “stacked” in a certain way: . These “stacked” symbols cannot be really called digits the way that we understand them, especially since new symbols appear long down the line () etc. These symbols we actually owe to the Arabic Renaissance of the early Middle Ages.

The point is that I can rename every single one these numbers in a unique way and still end up with a set that has the exact same properties (e.g closure of operations, cardinality, ordinality) as . This is formally defined as the Axiom of Replacement. So, let’s go ahead and describe  by assigning a random string for every single number, assuming that no string is inserted twice:

Which corresponds to our earlier

Cool! Now the axiom of replacement clearly applies to  as well, so I will rewrite

into:

Call these “transformed” sets  and  respectively. Under this encoding, guys, I believe it’s a lot more obvious that  in the general case.  under these random encodings is so not-gonna-happenish that its probability is not even axiomatically defined. Therefore, now we can view  and  as infinite lines floating around space, lines that we have to somehow put next to each other and see whether we can line them up exactly. If you tell me that even under this visualization, the line that represents  is infinite in both directions, whereas that of  has a starting point (0), then I would tell you that I can effectively “break” the line that represents  in the middle (0) and then mix the two lines together according to the mapping that corresponds to:

Now we no longer have the pesky notation of the minus sign, which pulls us to scream “But the naturals are a subset of the integers! Look! If we just take a copy of the naturals and put a minus in front of them, we have the integers!”. We only have two infinite lines, that start from somewhere, extend infinitely, and it is up to us to find a 1-1 and onto mapping between them. That is, it is up to us find a 1-1 mapping between:

and

(Note that I re-ordered the previous encoding  according to the “hopping” map into   .)

Under this “visual”, you guys, it makes a lot of sense to try to estimate if the two sets have the same cardinality and, guess what, they do 🙂

Not much else to say on this topic everyone. We can have a bunch of applications of the axiom of replacement to prove, for example, that the cardinality of the integers, , is also the cardinality of , etc. It is only when we start considering sets such as  and  that this idea that we can be holding two infinite lines in space fails.

Ordinality

There’s not much to say here except that the easiest way to understand how an order differs from a set is to consider an ordering exactly as such: an order of elements! Think in terms of “first element less than second less than third less than …. “. The simplest way possible. It is then that we can prove rather easily that .

Things only become a bit more complicated when considering the ordering :

Please note that this ordering is clearly not the same as , the ordering of . Between the first and the second element, for instance, there are countably many infinite rationals:  which are not included in the ordering.

Finally, realize the meaning of “incomparable” orderings: a pair of orderings  will be called incomparable if, and only if:

.

So please realize that this is not the same as saying, for instance, .

I think this is all, I am bothered when I can’t explain something well to a student so I thought I’d share my views on countability in case the subject becomes easier to grasp.