1

I am trying to prove that $\mathbb{Q}^2 = \{(x,y) \in \mathbb{R}^2 : x,y \in \mathbb{Q}\}$ is countable, where countable means that the set is either finite or has the same cardinality as $\mathbb{N}$. Here is a sketch of my attempt.

We can first prove that $\mathbb{Q}$ is countable. (I know how to do this using a diagonal argument.) So there exists a bijection $f: \mathbb{N} \to \mathbb{Q}$. I can then prove that $\mathbb{N} \times \mathbb{N}$ is countable using a diagonal argument. Therefore, there exists a bijection $g: \mathbb{N} \to \mathbb{N} \times \mathbb{N}$. Bijective implies invertible, so there must also exist an inverse $h: \mathbb{N} \times \mathbb{N} \to \mathbb{N}$. I can now compose bijections to get $f \circ h: \mathbb{N} \times \mathbb{N} \times \mathbb{N}$, but the composition of bijections is a bijection. Since bijection implies invertible, there exists an inverse $a: \mathbb{N} \to \mathbb{N} \times \mathbb{N}$, so $\mathbb{N} \times \mathbb{N}$ is countable.

I should be able to then form a bijection between $\mathbb{N} \times \mathbb{N}$ and $\mathbb{Q} \times \mathbb{Q}$ by composing bijections. I cannot figure out exactly how to do this, but the argument is surely similar to the above. By composing bijections again, I get a bijection between $\mathbb{N}$ and $\mathbb{Q} \times \mathbb{Q}$.

Is this correct? Is there an easier way to do it? I would like to avoid using a diagonal argument and instead write an explicit mathematical formula.

John P.
  • 2,184
  • 1
    Yes, you can just compose your bijections. You have a bijection $f\colon \mathbb{N}\to\mathbb{Q}$. Use that one to construct a bijection $f\times f\colon\mathbb{N}\times\mathbb{N}\to\mathbb{Q}\times\mathbb{Q}$ coordinatewise. Then use $g\colon\mathbb{N}\to\mathbb{N}\times\mathbb{N}$, and use $(f\times f)\circ g$. – Arturo Magidin Sep 08 '20 at 01:11
  • Cant you use a diagonalization argument like was done with the integers? – CogitoErgoCogitoSum Sep 08 '20 at 01:38

2 Answers2

2

Show that $(f,f):\mathbb{N}\times\mathbb{N}\to \mathbb{Q}\times\mathbb{Q},\: (a,b)\mapsto (f(a),f(b))$ is a bijection. Then the composition $(f,f)\circ g: \mathbb{N}\to\mathbb{Q}\times\mathbb{Q}$ is a bijection too.

Here is an example of an explicit bijection between $\mathbb{N}$ and $\mathbb{N}\times\mathbb{N}$.

Erik D
  • 1,059
0

Hint: It's a countable union of countable sets.

For an explicit function see Cantor's pairing function.