# Why is the set of Rational numbers countably infinite? [duplicate]

Why is the set of Rational numbers ,$\mathbb Q$, a countably finite set?

I think that - if we assign $n$ to a rational number, and $n+1$ to another rational number, Then I can surely find a rational number in between these two, which is not accounted for.

I using the definition - If a set is countably infinite, then each element of the set can be mapped to the set of natural numbers.

Another question - Is the cardinal product of countably infinite set of countably infinite sets uncountable or countable?

• You are assuming that you can't add the rational numbers between $r_n$ and $r_{n+1}$ later.... – Thomas Andrews Feb 22 '16 at 12:20
• @OveAhlman I am sorry, I didn't see that, but I have more questions than just that. I thought some one could clarify... – user313384 Feb 22 '16 at 12:23
• @ThomasAndrews Ya, I didn't realize that point. Thank you – user313384 Feb 22 '16 at 12:25
• Your argument shows that there is no order isomorphism between $\mathbb N$ and $\mathbb Q$, not that there exist no bijections. – s.harp Feb 22 '16 at 12:27
• For the second question: possible duplicate of Is the set of all functions from $\mathbb{N}$ to $\{0,1\}$ countable or uncountable?, not to mention this one. – user228113 Feb 22 '16 at 12:49

A rational number is of the form $\frac pq$ . Associate the set with natural numbers, in this order $(1,\frac 21,\frac 12,\frac 31,\frac 22,\frac 13,\frac 41,....)$ This set is a super set of the rational numbers. This set is clearly countable. So, the set of rational numbers is countable.

Yes, the cardinal product of countably infinite set of countably infinite sets is uncountable, where as the cardinal product of countably finite set of countably infinite sets is countable.

• It is an easy thing to solve but I think you missed out the negative rationals. :) – Deepak M S Oct 2 '19 at 11:41
• And zero of course – Deepak M S Oct 2 '19 at 11:47

You say

I think that - if we assign $n$ to a rational number, and $n+1$ to another rational number, Then I can surely find a rational number in between these two, which is not accounted for.

Well, it depends on how you assign $n$ to a rational number. There exists a way in which you can create a mapping $\mathbb N\to \mathbb Q$ such that you cannot find a rational number in between:

$$1\to \frac11\\ 2\to\frac21\\ 3\to\frac12\\ 4\to\frac31\\ 5\to\frac22\\ 6\to\frac13\\ 7\to\frac41\\ 8\to\frac32\\ 9\to\frac23\\ 10\to\frac14\\ \vdots$$

Just try to think a rational number i.e $$p/q$$ $$(p,q)=1$$ where p,q belong to integers As an ordered pair of integers. And try to define a map from $Q$ to $Z×Z$ as $$f (p/q)=(p,q)$$ where Z is the set of integers. You'll see that this is a one one onto map .Hence follows the conclusion..

• It isn't onto. You can never hit $(4,2)$ for example. – 5xum Feb 22 '16 at 12:31
• I said the g.c.d should be 1.. – Upstart Feb 22 '16 at 12:33
• I know. That's why I said the function is not onto, i.e. it is not surjective. There is no rational number $x$ for which $f(x)=(4,2)$. – 5xum Feb 22 '16 at 12:35