Rational & Irrational Numbers

definitions
discrete-math
proof
rational-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. Examples: \(\frac{3}{4} \in \mathbb{Q}\); \(\sqrt{2} \in \overline{\mathbb{Q}}\); \(\pi \in \overline{\mathbb{Q}}\).

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.

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\).

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}\)”.

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\)

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