Rational & Irrational Numbers
The definitions and closure results that make \(\mathbb{Q}\) a workable object in proofs, plus the classic irrationality argument.
Definitions
\[r \in \mathbb{Q} \iff \exists a, b \in \mathbb{Z} \text{ such that } r = \frac{a}{b} \text{ and } b \neq 0\]
\[r \in \overline{\mathbb{Q}} \iff r \notin \mathbb{Q}\]
\(\overline{\mathbb{Q}} = \mathbb{R} \setminus \mathbb{Q}\) is the set of irrational numbers. The barred symbol is what this course writes, not \(\mathbb{R} \setminus \mathbb{Q}\). Figure 1 shows how the four sets sit together.
Figure 1: The number systems as nested closed curves with each name written inside its own region, and the irrationals in their own panel because they are the part of the reals that is left over rather than a set that contains any of the others. The three examples are in blue. Two things to read off it — every integer is rational (it is n/1), and no number is in both panels, which is exactly what the definition of the bar says. The course leaves open whether N contains 0, so nothing here should be read as settling that.
Note the definition is existential: to show \(r\) is rational you must exhibit integers \(a\) and \(b\) with \(b \neq 0\). Nearly every proof below ends by checking three things — the numerator is an integer, the denominator is an integer, and the denominator is non-zero.
Fact: every rational number can be written as a fraction in lowest terms (numerator and denominator have no common factors).
Why irrationality statements want contradiction or contraposition
“\(r\) is irrational” is a negative statement — \(r \notin \mathbb{Q}\) — so a direct proof has nothing to unfold. Assuming the negation instead (\(r \in \mathbb{Q}\)) hands you \(r = \frac{a}{b}\) to work with. See proof-techniques for the general shape, and the collected verdicts in 2026-08-13-proof-by-contraposition for which method works on each statement.
Concretely, for the sum of any rational number and any irrational number is irrational:
- Symbolically: \(\forall r, s \in \mathbb{R}\), if \(r \in \mathbb{Q}\) and \(s \in \overline{\mathbb{Q}}\) then \(r + s \in \overline{\mathbb{Q}}\) — or equivalently \(\forall r \in \mathbb{Q}\) and \(\forall s \in \mathbb{R}\), if \(s \in \overline{\mathbb{Q}}\) then \(r + s \in \overline{\mathbb{Q}}\).
- Direct proof: suppose \(r \in \mathbb{Q}\) and \(s \in \overline{\mathbb{Q}}\) — and now you’re stuck, because \(s \in \overline{\mathbb{Q}}\) gives you nothing to substitute.
- Contradiction: suppose \(\exists r \in \mathbb{Q}, s \in \mathbb{R}\) with \(s \in \overline{\mathbb{Q}}\) and \(r + s \in \mathbb{Q}\).
- Contraposition: prove \(\forall r \in \mathbb{Q}\) and \(\forall s \in \mathbb{R}\), if \(r + s \in \mathbb{Q}\) then \(s \in \mathbb{Q}\).
Proof by contraposition. Suppose \(r \in \mathbb{Q}\), \(s \in \mathbb{R}\) and \(r + s \in \mathbb{Q}\). Since \(r \in \mathbb{Q}\), \(r = \frac{a}{b}\) for some \(a, b \in \mathbb{Z}\) with \(b \neq 0\). Since \(r + s \in \mathbb{Q}\), \(r + s = \frac{c}{d}\) for some \(c, d \in \mathbb{Z}\) with \(d \neq 0\). Now \[s = (r + s) - r = \frac{c}{d} - \frac{a}{b} = \frac{bc - ad}{bd}.\] Since \(a, b, c, d \in \mathbb{Z}\) we know \(bc - ad \in \mathbb{Z}\) and \(bd \in \mathbb{Z}\); and \(bd \neq 0\) since \(b \neq 0\) and \(d \neq 0\). Thus \(s \in \mathbb{Q}\). \(\square\)
The trick that makes it work is writing the thing you want in terms of the things you have: \(s = (r + s) - r\). The second fraction needs a fresh pair of variables \(c, d\) — nothing relates it to \(a, b\), and reusing them is one of the standard errors in proof-techniques.
Closure results
\(\forall r \in \mathbb{Q}, (2r^2 - 3r + 1) \in \mathbb{Q}\) — direct proof is best here; contraposition gets stuck.
Let \(r \in \mathbb{Q}\), so \(r = \frac{a}{b}\) for some \(a, b \in \mathbb{Z}\) with \(b \neq 0\). Then \[2r^2 - 3r + 1 = \frac{2a^2}{b^2} - \frac{3ab}{b^2} + \frac{b^2}{b^2} = \frac{2a^2 - 3ab + b^2}{b^2}.\] Since \(a, b \in \mathbb{Z}\) we have \(2a^2 - 3ab + b^2 \in \mathbb{Z}\) and \(b^2 \in \mathbb{Z}\), and \(b^2 \neq 0\) since \(b \neq 0\). So \(2r^2 - 3r + 1 \in \mathbb{Q}\). \(\square\)
\(\forall r \in \mathbb{R}\), if \(r^2\) is irrational then \(r\) is irrational. Proved by contraposition in proof-techniques — the contrapositive is “if \(r \in \mathbb{Q}\) then \(r^2 \in \mathbb{Q}\)”, i.e. \(r^2 = \frac{a^2}{b^2}\) with \(a^2, b^2 \in \mathbb{Z}\) and \(b^2 \neq 0\).
For real \(m, n\): if \(m\) is irrational and \(n\) is rational, then \(m - n\) is irrational.
Proof by contradiction. Suppose \(m\) is irrational, \(n\) is rational, but \(m - n\) is rational. Then \(n = \frac{a}{b}\) and \(m - n = \frac{c}{d}\) for integers \(a,b,c,d\) with \(b, d \neq 0\). Since \(m = (m - n) + n\), \[m = \frac{c}{d} + \frac{a}{b} = \frac{bc + ad}{bd},\] with \(bc + ad \in \mathbb{Z}\), \(bd \in \mathbb{Z}\) and \(bd \neq 0\). So \(m\) is rational, contradicting the assumption. \(\square\)
For a real number \(r\): if \(2r^2 - 3r\) is irrational, then \(r\) is irrational.
Proof by contraposition. The contrapositive is: if \(r \in \mathbb{Q}\) then \(2r^2 - 3r \in \mathbb{Q}\). Let \(r = \frac{a}{b}\) with \(a, b \in \mathbb{Z}\), \(b \neq 0\). Then \(2r^2 - 3r = \frac{2a^2 - 3ab}{b^2}\), with integer numerator and non-zero integer denominator. \(\square\)
For all real \(r, s\) and \(n\): if \(r\) is irrational, \(s\) is rational and \(n\) is a positive integer, then \(n(r - s)\) is irrational.
Proof by contradiction. Suppose otherwise: \(r \in \overline{\mathbb{Q}}\), \(s \in \mathbb{Q}\), \(n \in \mathbb{Z}^+\), but \(n(r-s) \in \mathbb{Q}\). Write \(s = \frac{a}{b}\) and \(n(r - s) = \frac{c}{d}\) with \(b, d \neq 0\). Since \(n \neq 0\), \[r = s + \frac{c}{d} \cdot \frac{1}{n} = \frac{a}{b} + \frac{c}{dn} = \frac{adn + bc}{bdn}.\] Here \(adn + bc \in \mathbb{Z}\), \(bdn \in \mathbb{Z}\), and \(bdn \neq 0\) since \(b, d, n\) are all non-zero. So \(r \in \mathbb{Q}\) — a contradiction. \(\square\)
For every rational \(r\), if \(r \neq 0\) then \(r\sqrt{2}\) is irrational. Negation: \(\exists r \in \mathbb{Q}\) such that \(r \neq 0\) and \(r\sqrt{2} \in \mathbb{Q}\).
Proof by contradiction. Suppose the negation holds. Since \(r \in \mathbb{Q}\), \(r = \frac{a}{b}\) for some \(a, b \in \mathbb{Z}\) with \(b \neq 0\), and \(a \neq 0\) because \(r \neq 0\). Since \(r\sqrt{2} \in \mathbb{Q}\), \(r\sqrt{2} = \frac{c}{d}\) for integers \(c, d\) with \(d \neq 0\). Then \[\sqrt{2} = \frac{r\sqrt{2}}{r} = \frac{c}{d} \cdot \frac{b}{a} = \frac{bc}{ad},\] where \(bc \in \mathbb{Z}\), \(ad \in \mathbb{Z}\) and \(ad \neq 0\) (since \(a \neq 0\) and \(d \neq 0\)). So \(\sqrt{2} \in \mathbb{Q}\) — contradicting the theorem below. \(\square\)
\(\sqrt{2}\) is irrational
The set-up needs two ingredients: the lowest-terms fact above, and the lemma for all integers \(n\), if \(n^2\) is even then \(n\) is even (proved by contraposition — see proof-techniques).
Proof by contradiction. Suppose \(\sqrt{2}\) is rational. Then \(\sqrt{2} = \frac{a}{b}\) for some \(a, b \in \mathbb{Z}\) with \(b \neq 0\), and we may assume \(\frac{a}{b}\) is in lowest terms.
Squaring, \(2 = \frac{a^2}{b^2}\), so \(a^2 = 2b^2\) and thus \(a^2\) is even. By the lemma, \(a\) is even, so \(a = 2\ell\) for some \(\ell \in \mathbb{Z}\).
Substituting: \(2b^2 = a^2 = (2\ell)^2 = 4\ell^2\), so \(b^2 = 2\ell^2\) and \(b^2\) is even. By the lemma again, \(b\) is even.
But now \(a\) and \(b\) are both even, so they share the common factor \(2\) — contradicting the assumption that \(\frac{a}{b}\) is in lowest terms. Therefore \(\sqrt{2} \in \overline{\mathbb{Q}}\). \(\square\)
The shape of the argument is easier to hold onto than its algebra (Figure 2).
Figure 2: The same proof as a structure. It runs in two halves that use the lemma once each (orange): the left half squeezes ‘a is even’ out of the assumption, and the substitution a = 2l feeds the right half, which gets ‘b is even’. Neither half is a contradiction on its own — the contradiction only appears when both land together and the fraction turns out not to have been in lowest terms after all. That is why the lowest-terms assumption has to be made in the very first line: it is the thing the two halves eventually collide with. The two boxes at the bottom state the Fact and the Lemma.
Neither a direct proof nor a contraposition proof gets off the ground here: the statement isn’t a conditional with a usable hypothesis, so contradiction is the only one of the three that has anywhere to start.
See also
- proof-techniques — direct / counterexample / contradiction / contraposition
- 2026-08-13-proof-by-contraposition — Lecture 9
- quantified-statements
- divisibility-and-factorisation
- practice-problems — §12 Rational Numbers, with full worked solutions