Maths WorkshopMaths problems with full solutions
Exercise 1187Topology › Topology of ℝL1Added 3 Nov 2026

Dense sets

#dense#rationals#irrationals

Statement

Show that Q\mathbb{Q} and R∖Q\mathbb{R}\setminus\mathbb{Q} are both dense in R\mathbb{R}.

Hint

Between any two reals there is a rational, and between any two reals there is an irrational.

Show solutionHide solution

Solution

Q\mathbb{Q} dense. For a<ba<b reals, pick nn with 1/n<b−a1/n<b-a; some k/n∈]a,b[k/n\in]a,b[.

R∖Q\mathbb{R}\setminus\mathbb{Q} dense. Given a<ba<b, take a rational q∈]a,b[q\in]a,b[; then q+2n∈]a,b[q+\frac{\sqrt2}{n}\in]a,b[ for large nn is irrational.

Conclusion. Both Q\mathbb{Q} and R∖Q\mathbb{R}\setminus\mathbb{Q} are dense in R\mathbb{R}.