If there are as many rational numbers as there are irrational numbers then the set of all irrational numbers is infinite

It is true that both sets are infinite. However, it is also true that the set of irrational numbers is so much larger than the set of rational numbers, that if you throw a dart at the number line, the probability of hitting a rational number is zero!

Do a web search on transfinite cardinals to see that the number of rational numbers (and also the number of integers, which is the same!) is the "smallest" infinity, in a sense.

The number of real numbers (or irrationals, which is the same!) is the "next larger" infinity.

To understand why the set of all irrational numbers is infinite, we can examine the concept of countable infinity.

First, let's define what a rational number is. A rational number is any number that can be expressed as a ratio of two integers, where the denominator is not zero. For instance, 1/2, -3/4, and 7/1 are all rational numbers.

On the other hand, an irrational number is a number that cannot be expressed as a ratio of two integers. Examples of irrational numbers include π (pi), √2 (square root of 2), and e (Euler's number).

Now, let's consider the concept of countable infinity. A set is said to be countably infinite if its elements can be placed in a one-to-one correspondence with the natural numbers (1, 2, 3, 4, ...). In other words, if you can count the elements in a set in a systematic way, without skipping any, then it is countably infinite.

The set of rational numbers is countably infinite. We can create a systematic way to list all rational numbers using a zigzag pattern across the number line. For example, we can start with 0/1, then go diagonally up to 1/1, then diagonally down to 1/2, diagonally up to 2/1, and so on. By continuing this pattern, we can list all rational numbers.

Now, let's consider the set of irrational numbers. If we assume that there are as many rational numbers as there are irrational numbers, then by the definition of countable infinity, the set of irrational numbers must also be countably infinite.

However, this assumption is incorrect. In fact, the set of irrational numbers is uncountably infinite. This means that the elements of the set cannot be placed in a one-to-one correspondence with the natural numbers. There is no systematic way to list all irrational numbers because they are not defined by ratios of integers.

One way to understand the infinitude of irrational numbers is through proof by contradiction. We can assume that the set of irrational numbers is countably infinite, and try to create a systematic list of all irrational numbers. By doing so, we will eventually encounter a contradiction, proving that the set of irrational numbers is actually uncountably infinite.

Therefore, the set of all irrational numbers is indeed infinite, but it is an infinite of a different nature compared to the countable infinity of rational numbers.