# 1.7: Proof by Contradiction

- Page ID
- 7464

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Suppose that we start with some set of assumptions and apply rules of logic to derive a sequence of statements that can be proved from those assumptions, and suppose that we derive a statement that we know to be false. When the laws of logic are applied to true statements, the statements that are derived will also be true. If we derive a false statement by applying rules of logic to a set of assumptions, then at least one of the assumptions must be false. This observation leads to a powerful proof technique, which is known as **proof by contradiction**.

Suppose that you want to prove some proposition, \(p\). To apply proof by contradiction, assume that \(¬p\) is true, and apply the rules of logic to derive conclusions based on this assumption. If it is possible to derive a statement that is known to be false, it follows that the assumption, \(¬p\), must be false. (Of course, if the derivation is based on several assumptions, then you only know that at least one of the assumptions must be false.) The fact that \(¬p\) is false proves that \(p\) is true. Essentially, you are arguing that \(p\) must be true, because if it weren’t, then some statement that is known to be false could be proved to be true. Generally, the false statement that is derived in a proof by contradiction is of the form \(q ∧ ¬q\). This statement is a contradiction in the sense that it is false no matter what the value of \(q\). Note that deriving the contradiction \(q ∧ ¬q\) is the same as showing that the two statements, \(q\) and \(¬q\), both follow from the assumption that \(¬p\).

As a first example of proof by contradiction, consider the following theorem:

Theorem 1.4 The number \(\sqrt{3}\) is irrational.

Proof. Assume for the sake of contradiction that \(sqrt{3}\) is rational. Then \(sqrt{3}\) can be written as the ratio of two integer, \(\sqrt{3} = \frac{m'}{n'}\) for some integers m' and n'. Furthermore, the fraction \(\frac{m'}{n'}\) can be reduced to lowest terms by canceling all common factors of \(m′\) and \(n′\). So \(\sqrt{3} = \frac{m}{n}\) for some integers {m} and {n} which have no common factors. Squaring both sides of this equation gives \(3 = \frac{m^2}{n^2}\) and re-arranging gives \(3n^2 = m^2\). From this equation we see that \(m^2\) is divisible by 3; you proved in the previous section (Exercise 6) that \(m^2\) is divisible by 3 iff m is divisible by 3. Therefore m is divisible by 3 and we can write \(m = 3k\) for some integer \(k\). Substituting \(m = 3k\) into the last equation above gives \(3n^2 = (3k)^2\) or \(3n^2 = 9k^2\), which in turn becomes \(n^2 = 3k^2\). From this we see that \(n^2\) is divisible by 3, and again we know that this implies that \(n\) is divisible by 3. But now we have (i) \(m\) and \(n\) have no common factors, and (ii) \(m\) and \(n\) have a common factor, namely 3. It is impossible for both these things to be true, yet our argument has been logically correct. Therefore our original assumption, namely that \(\sqrt{3}\) is rational, must be incorrect. Therefore \(\sqrt{3}\) must be irrational.

One of the oldest mathematical proofs, which goes all the way back to Euclid, is a proof by contradiction. Recall that a prime number is an integern, greater than 1, such that the only positive integers that evenly divide \(n\) are 1 and n. We will show that there are infinitely many primes. Before we get to the theorem, we need a lemma. (A **lemma** is a theorem that is introduced only because it is needed in the proof of another theorem. Lemmas help to organize the proof of a major theorem into manageable chunks.)

Lemma 1.5 If N is an integer and N > 1, then there is a prime number which evenly divides N.

*Proof*. Let \(D\) be the smallest integer which is greater than 1 and which evenly divides \(N\). (\(D\) exists since there is at least one number, namely \(N\) itself, which is greater than 1 and which evenly divides \(N\). We use the fact that any non-empty subset of \(N\) has a smallest member.) I claim that \(D\) is prime, so that \(D\) is a prime number that evenly divides \(N\). Suppose that \(D\) is not prime. We show that this assumption leads to a contradiction. Since \(D\) is not prime, then, by definition, there is a number \(k\) between 2 and \(D − 1\), inclusive, such that \(k\) evenly divides \(D\). But since \(D\) evenly divides \(N\), we also have that \(k\) evenly divides \(N\) (by exercise 5 in the previous section). That is, \(k\) is an integer greater than one which evenly divides \(N\). But since \(k\) is less than \(D\), this contradicts the fact that \(D\) is the smallest such number. This contradiction proves that \(D\) is a prime number.

Theorem 1.6 There are infinitely many prime numbers.

*Proof*. Suppose that there are only finitely many prime numbers. We will show that this assumption leads to a contradiction.

Let \(p_{1}, p_{2}, . . . , p_{n}\) be a complete list of all prime numbers (which exists under the assumption that there are only finitely many prime numbers). Consider the number N obtained by multiplying all the prime numbers together and adding one. That is,

\[N = (p_{1} · p_{2} · p_{3} · · · p_{n}) + 1.\]

Now, since \(N\) is larger than any of the prime numbers \(p_{i}\), and since \(p_{1},p_{2}, ..., p_{n}\) is a *complete* list of prime numbers, we know that N cannot be prime. By the lemma, there is a prime number \(p\) which evenly divides \(N\). Now, \(p\) must be one of the numbers \(p_{1}, p_{2}, ..., p_{n}\). But in fact, none of these numbers evenly divides \(N\), since dividing \(N\) by any \(p_{i}\) leaves a remainder of 1. This contradiction proves that the assumption that there are only finitely many primes is false.

This proof demonstrates the power of proof by contradiction. The fact that is proved here is not at all obvious, and yet it can be proved in just a few paragraphs.

## Exercises

1. Suppose that \(a_{1}, a_{2}, . . . , a_{10}\) are real numbers, and suppose that \(a_{1} + a_{2} +· · · + a_{10} > 100\). Use a proof by contradiction to conclude that at least one of the numbers \(a_{i}\) must be greater than 10.

2.Prove that each of the following statements is true. In each case, use a proof by contradiction. Remember that the negation of \(p → q\) is \(p ∧ ¬q\).

**a) **Let \(n\) be an integer. If \(n^2\) is an even integer, then \(n\) is an even integer.

**b) **\(sqrt{2}\) is irrational.

**c)** If \(r\) is a rational number and \(x\) is an irrational number, then \(r + x\) is an irrational number. (That is, the sum of a rational number and an irrational number is irrational.)

**d)** If \(r\) is a non-zero rational number and \(x\) is an irrational number, then \(rx\) is an irrational number.

**e)** If \(r\) and \(r + x\) are both rational, then \(x\) is rational.

3. The **pigeonhole principle **is the following obvious observation: If you haven pigeons in \(k\) pigeonholes and if \(n > k\), then there is at least one pigeonhole that contains more than one pigeon. Even though this observation seems obvious, it’s a good idea to prove it. Prove the pigeonhole principle using a proof by contradiction.