Skip to content

Techniques of Proof: Why Induction and Contradiction Are Valid

Prerequisite:What Is a Number? From the Naturals to the Reals, and Why 1 = 0.999… Is True

Raw
  • What the inductive step proves is not ”P(n)P(n) is true” but the implication “if P(n)P(n) then P(n+1)P(n+1)”. Mistake this point and induction looks like circular reasoning.
  • The validity of induction follows from the well-ordering property of the natural numbers, and conversely well-ordering follows from induction. In the Peano system, induction is the fifth axiom — part of the very definition of the natural numbers. Whether it is a theorem to be proved or an axiom to be posited depends on where one starts.
  • Drop the base step and the conclusion may be false for every nn, however flawless the inductive step. In the false proof that all horses are the same colour, by contrast, the base step is correct and the inductive step fails at n=1n = 1 alone.
  • Proof by contradiction assumes ¬P\lnot P and derives some contradiction; proof by contraposition assumes ¬Q\lnot Q and derives ¬P\lnot P. The latter is a special case of the former, and whenever an argument can be rewritten in contrapositive form it becomes easier to read.
  • That no rational number satisfies x2=2x^2 = 2 can be shown in two ways: with fractions in lowest terms, and by infinite descent. The second uses well-ordering — induction turned upside down — directly.

1. Motivation: writing infinitely many statements on finitely much paper

Section titled “1. Motivation: writing infinitely many statements on finitely much paper”

Most mathematical assertions have the shape “for every natural number nn, …”. For instance,

1+2++n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2}

states infinitely many things at once: the claim for n=1n = 1, the claim for n=2n = 2, the claim for n=3n = 3, and so on. Checking them one by one from n=1n = 1 disposes of everything up to n=100n = 100 in finite time. But whoever stops there has no answer when asked about n=101n = 101. A policy of piling up verifications never terminates.

To write a proof of infinitely many statements on finitely much paper, we need a device of a qualitatively different kind. Mathematical induction is the chief example. The idea is simple: show only two things — that the first domino falls, and that whichever domino falls knocks over the next — and the whole infinite row goes down. Infinitely many verifications have been compressed into finitely many proofs (two, in this case).

Sometimes, on the other hand, the content of the proposition cannot be assembled directly. The claim that 2\sqrt2 cannot be written as a fraction asserts an impossibility, so building something and displaying it is no help. In such a case we ask what would happen if it could be written, and hunt for the breakdown. That is proof by contradiction.

Both techniques are ancient. The discovery of incommensurable magnitudes — two quantities with no common measure — goes back to the Pythagoreans of the fifth century BC, and the incommensurability of the diagonal and the side of a square was shown by contradiction. Explicit use of mathematical induction appears in Maurolico in the sixteenth century and in Pascal’s Traité du triangle arithmétique in the seventeenth, and at the end of the nineteenth Peano formulated it as part of an axiom system for the natural numbers.

Learning merely how to use these tools would take a single page. This article spends its space on why they are valid because, without knowing the grounds, one cannot detect a faulty induction. Faulty inductions do occur, and they look almost exactly like sound ones.

2. Preliminaries: implication and its converse, inverse and contrapositive

Section titled “2. Preliminaries: implication and its converse, inverse and contrapositive”

We write N={1,2,3,}\mathbb{N} = \{1, 2, 3, \ldots\} for the natural numbers; in this article 00 is not a natural number. The integers are Z\mathbb{Z}, the rationals Q\mathbb{Q} and the reals R\mathbb{R}. For the number systems themselves (that Q\mathbb{Q} and R\mathbb{R} are ordered fields(Definition 2.1)[What Is a Number? From the Naturals to the Reals, and Why 1 = 0.999… Is True]) see What is a number?; for the handling of logical notation (logical connectives(Definition 2.3)[The Grammar of Mathematics] and quantifiers) see The grammar of mathematics: sets and logic.

For propositions PP and QQ, the truth value of PQP \Rightarrow Q (“if PP then QQ”) is fixed by the table below. In particular, if PP is false then PQP \Rightarrow Q is true whatever the truth value of QQ. This convention will pay off repeatedly.

Definition 2.1Converse, inverse, contrapositive

Given a proposition PQP \Rightarrow Q, we call

  • QPQ \Rightarrow P its converse,
  • ¬P¬Q\lnot P \Rightarrow \lnot Q its inverse,
  • ¬Q¬P\lnot Q \Rightarrow \lnot P its contrapositive.

The truth values match up as follows.

PPQQPQP \Rightarrow QContrapositive ¬Q¬P\lnot Q \Rightarrow \lnot PConverse QPQ \Rightarrow P
TTTTT
TFFFT
FTTTF
FFTTT

The third and fourth columns agree everywhere; the fifth does not. Read the table this way: a proposition and its contrapositive say the same thing, while the converse says something else.

3. Mathematical induction and why it is valid

Section titled “3. Mathematical induction and why it is valid”

The set of natural numbers has the following property, which the reals and the rationals lack.

Axiom 3.1Well-ordering property

Every non-empty subset of N\mathbb{N} has a least element. That is, if SNS \subseteq \mathbb{N} and SS \ne \emptyset, then there exists mSm \in S such that mnm \le n for every nSn \in S.

That this is not a triviality becomes clear on comparison with the rationals. The set {xQ:x>0}\{x \in \mathbb{Q} : x > 0\} is a non-empty subset of Q\mathbb{Q} with no least element: given a positive rational xx, the number x/2x/2 is a smaller positive rational. The guarantee that one “cannot go any lower” is a consequence of the natural numbers being spread out discretely.

Theorem 3.2Principle of mathematical induction

Suppose that a proposition P(n)P(n) is given for each nNn \in \mathbb{N}, and assume the following two conditions.

  1. (Base step) P(1)P(1) is true.
  2. (Inductive step) For every nNn \in \mathbb{N}, “if P(n)P(n) is true then P(n+1)P(n+1) is true”.

Then P(n)P(n) is true for every nNn \in \mathbb{N}.

Proof(Theorem 3.2)

Consider the set of counterexamples

S={nN:P(n) is false}.S = \{\, n \in \mathbb{N} : P(n) \text{ is false} \,\} .

The conclusion we want is precisely S=S = \emptyset.

Suppose then that SS \ne \emptyset (here we argue by contradiction; the justification of that mode of argument is given in Proposition 6.2, but for the moment we use it as known logic). Since SS is a non-empty subset of N\mathbb{N}, the well-ordering property(Axiom 3.1) supplies a least element mSm \in S.

First, m1m \ne 1. Indeed, hypothesis 1 says P(1)P(1) is true, so 1S1 \notin S, whereas mSm \in S. As mNm \in \mathbb{N} and m1m \ne 1, we have m2m \ge 2, so m1m - 1 is again a natural number.

Next, m1Sm - 1 \notin S, because m1<mm - 1 < m and mm is the least element of SS. And m1Sm - 1 \notin S means that P(m1)P(m-1) is true.

Now apply hypothesis 2 with n=m1n = m - 1. Since P(m1)P(m-1) is true, so is P((m1)+1)=P(m)P((m-1)+1) = P(m). But mSm \in S meant that P(m)P(m) is false. Thus P(m)P(m) is both true and false, a contradiction.

Hence the assumption SS \ne \emptyset is untenable: S=S = \emptyset, that is, P(n)P(n) is true for every nn.

flowchart LR
Z["Base step: prove P(1)"] --> A["P(1)"]
A -->|"inductive step (n=1)"| B["P(2)"]
B -->|"inductive step (n=2)"| C["P(3)"]
C -->|"inductive step (n=3)"| D["P(4)"]
D -->|"and so on"| E["…"]
The base step topples the first domino; the inductive step passes the fall along

Remark 3.3Why this is not circular reasoning

Almost everyone meeting induction for the first time asks: if we assume P(n)P(n) in order to prove P(n+1)P(n+1), are we not assuming what we set out to prove?

We are not. What the inductive step proves is not P(n)P(n) but the implication P(n)P(n+1)P(n) \Rightarrow P(n+1). By the truth table of §2, that implication is automatically true whenever P(n)P(n) is false. So proving the inductive step alone gives no guarantee that PP holds for even a single nn. Indeed, Example 5.1 exhibits a perfectly correct inductive step for a PP that is false for every nn.

The phrase “assume P(n)P(n)” signals a conditional argument — “if we are in a world where P(n)P(n) is true” — and does not grant P(n)P(n).

Example 3.4The sum of the first n integers

For every nNn \in \mathbb{N} we have k=1nk=n(n+1)2\displaystyle\sum_{k=1}^{n} k = \frac{n(n+1)}{2}.

Let P(n)P(n) be this identity.

Base step. For n=1n = 1 the left-hand side is 11 and the right-hand side is 122=1\dfrac{1 \cdot 2}{2} = 1. They agree, so P(1)P(1) is true.

Inductive step. Take an arbitrary nNn \in \mathbb{N} and assume P(n)P(n), that is, k=1nk=n(n+1)2\sum_{k=1}^{n} k = \frac{n(n+1)}{2}. Then

k=1n+1k=(k=1nk)+(n+1)=n(n+1)2+(n+1)(by the induction hypothesis)=(n+1)(n2+1)=(n+1)(n+2)2.\begin{aligned} \sum_{k=1}^{n+1} k &= \left(\sum_{k=1}^{n} k\right) + (n+1) \\ &= \frac{n(n+1)}{2} + (n+1) && \text{(by the induction hypothesis)} \\ &= (n+1)\left(\frac{n}{2} + 1\right) \\ &= \frac{(n+1)(n+2)}{2}. \end{aligned}

The last expression is exactly (n+1)((n+1)+1)2\dfrac{(n+1)\bigl((n+1)+1\bigr)}{2}, so P(n+1)P(n+1) holds.

By Theorem 3.2, P(n)P(n) holds for every nn.

Example 3.5Bernoulli's inequality, and what happens when the hypothesis is dropped

Let xx be a real number with x1x \ge -1 and let nNn \in \mathbb{N}. Then (1+x)n1+nx(1+x)^n \ge 1 + nx.

Base step. For n=1n = 1 both sides equal 1+x1 + x, so equality holds.

Inductive step. Assume (1+x)n1+nx(1+x)^n \ge 1 + nx. The hypothesis x1x \ge -1 gives 1+x01 + x \ge 0, so multiplying both sides of the inequality by 1+x1+x does not reverse it. Hence

(1+x)n+1=(1+x)n(1+x)(1+nx)(1+x)=1+(n+1)x+nx21+(n+1)x.(1+x)^{n+1} = (1+x)^n (1+x) \ge (1+nx)(1+x) = 1 + (n+1)x + n x^2 \ge 1 + (n+1)x .

The last inequality holds because nx20n x^2 \ge 0.

What if the hypothesis x1x \ge -1 is dropped? We used 1+x01+x \ge 0 in the inductive step, so that is where the argument breaks. Concretely, take x=4x = -4 and n=3n = 3: the left-hand side is (14)3=27(1-4)^3 = -27 and the right-hand side is 1+3(4)=111 + 3 \cdot (-4) = -11, and 2711-27 \ge -11 is false. Hypotheses are not decoration; they are used somewhere in every proof.

4. The Peano axioms: is induction a theorem or an axiom?

Section titled “4. The Peano axioms: is induction a theorem or an axiom?”

We proved Theorem 3.2 from well-ordering. But where does well-ordering come from? In fact well-ordering can itself be proved from induction. The two are equivalent properties: grant either one of them for the natural numbers and the other follows.

That forces us back to the question of what the natural numbers are. The answer Peano gave at the end of the nineteenth century is the following axiom system. Here s(n)s(n) denotes the successor of nn.

Axiom 4.1The Peano axioms

Let a set N\mathbb{N}, an element 11 of it, and a map s:NNs : \mathbb{N} \to \mathbb{N} satisfy the following.

  1. 1N1 \in \mathbb{N}.
  2. s(n)Ns(n) \in \mathbb{N} for every nNn \in \mathbb{N}.
  3. s(n)1s(n) \ne 1 for every nNn \in \mathbb{N} (11 is the successor of no number).
  4. For all m,nNm, n \in \mathbb{N}, if s(m)=s(n)s(m) = s(n) then m=nm = n (ss is injective).
  5. (Axiom of induction) If SNS \subseteq \mathbb{N} satisfies "1S1 \in S" and ”nSn \in S implies s(n)Ss(n) \in S”, then S=NS = \mathbb{N}.

We then call (N,1,s)(\mathbb{N}, 1, s) a system of natural numbers.

The fifth axiom is Theorem 3.2 itself. Taking SS to be the set of those nn for which P(n)P(n) is true, the hypotheses translate into the base step and the inductive step, and the conclusion into ”P(n)P(n) for every nn”. So from Peano’s standpoint induction is not a theorem to be proved but part of the stipulation of what a natural number is.

Peano’s own paper of 1889 started from 11. Most textbooks today start from 00, and the theory develops in the same way either way.

Remark 4.2Which axiom carries which load

Looking at what breaks when an axiom is removed shows what each axiom does.

Drop axiom 3. Let N={1,2,3}\mathbb{N}' = \{1, 2, 3\} with s(1)=2s(1) = 2, s(2)=3s(2) = 3, s(3)=1s(3) = 1. Since ss is a bijection of N\mathbb{N}', axiom 4 holds. Axiom 5 holds as well: any SS containing 11 and closed under ss contains 1,2,31, 2, 3, so S=NS = \mathbb{N}'. But s(3)=1s(3) = 1, so axiom 3 fails. Thus without axiom 3 a “pseudo-natural-number system” with only finitely many elements is permitted: induction alone does not deliver infinitude.

Drop axiom 5. Adjoin to N\mathbb{N} a family of elements ,a1,a0,a1,\ldots, a_{-1}, a_0, a_1, \ldots arranged like the integers, obtaining a set N\mathbb{N}^{*}, and set s(ak)=ak+1s(a_k) = a_{k+1}. Since no aka_k equals 11 or s(n)s(n) for an ordinary natural number nn, axioms 1 through 4 all hold. Yet S=NS = \mathbb{N} contains 11, is closed under ss, and is not all of N\mathbb{N}^{*}. Axiom 5 is exactly the demand that there be no superfluous elements beyond the reach of iterating ss from 11.

These “natural numbers with extra elements attached” are called non-standard models, and they lead to the question whether a formal system can pin down its intended object uniquely. On this theme see An invitation to mathematical logic: the incompleteness theorems, and in particular Example 5.4[ゲーデルの不完全性定理].

Theorem 4.3Strong induction

Suppose that a proposition P(n)P(n) is given for each nNn \in \mathbb{N}, and assume:

  • for every nNn \in \mathbb{N}, if P(k)P(k) is true for every kNk \in \mathbb{N} with k<nk < n, then P(n)P(n) is true.

Then P(n)P(n) is true for every nNn \in \mathbb{N}.

Proof(Theorem 4.3)

Let Q(n)Q(n) be the proposition ”P(k)P(k) is true for every kNk \in \mathbb{N} with knk \le n”, and apply Theorem 3.2 to QQ.

Base step. Apply the hypothesis with n=1n = 1. There is no natural number smaller than 11, so ”P(k)P(k) for every k<1k < 1” is vacuously true (there is nothing at all to be said about any such kk). Hence the hypothesis yields that P(1)P(1) is true. Since 11 is the only natural number 1\le 1, this gives Q(1)Q(1).

Inductive step. Assume Q(n)Q(n): that is, P(k)P(k) is true for every knk \le n. For natural numbers, k<n+1k < n+1 and knk \le n are equivalent, so this says ”P(k)P(k) for every k<n+1k < n+1”. Applying the hypothesis with n+1n+1 therefore makes P(n+1)P(n+1) true. Together, P(k)P(k) holds for every kn+1k \le n+1, which is Q(n+1)Q(n+1).

By Theorem 3.2, Q(n)Q(n) is true for every nn; in particular P(n)P(n) is true.

Example 4.4Existence of prime factorizations

Every natural number 2\ge 2 can be written as a product of primes (a product of a single prime is allowed).

Let P(n)P(n) be the statement “if n2n \ge 2 then nn is a product of primes”. For n=1n = 1 the antecedent is false, so P(1)P(1) is true (by the truth table of §2).

Let n2n \ge 2 and assume P(k)P(k) for every natural number k<nk < n.

  • If nn is prime, then nn itself is a product of one prime, so P(n)P(n) holds.
  • If nn is not prime, then, being 2\ge 2 and composite, there are natural numbers a,ba, b with n=abn = ab and 1<a<n1 < a < n, 1<b<n1 < b < n (this is the definition of a composite number). From 1<a1 < a and aa a natural number we get a2a \ge 2, and likewise b2b \ge 2. Also a<na < n and b<nb < n, so the induction hypothesis applies to both aa and bb, and each is a product of primes. Juxtaposing the two factorizations exhibits n=abn = ab as a product of primes.

In either case P(n)P(n) holds, so by Theorem 4.3 P(n)P(n) is true for every nn.

Note that ordinary induction is unavailable here. The factors a,ba, b in a decomposition n=abn = ab need not be n1n-1; they may sit anywhere between 22 and n1n-1, unpredictably. Being able to assume the statement for all smaller numbers, rather than for the immediate predecessor, is what makes strong induction worth having.

Example 5.1A false proposition whose inductive step is correct

Let P(n)P(n) be the identity

k=1nk=n(n+1)2+7.\sum_{k=1}^{n} k = \frac{n(n+1)}{2} + 7 .

Let us check the inductive step. Assuming P(n)P(n),

k=1n+1k=(k=1nk)+(n+1)=n(n+1)2+7+(n+1)=(n+1)(n+2)2+7\sum_{k=1}^{n+1} k = \left(\sum_{k=1}^{n} k\right) + (n+1) = \frac{n(n+1)}{2} + 7 + (n+1) = \frac{(n+1)(n+2)}{2} + 7

which is precisely P(n+1)P(n+1). The inductive step is entirely correct; there is no error anywhere in it.

But P(1)P(1) reads "1=1+71 = 1 + 7", which is false. By Example 3.4 the correct sum is n(n+1)/2n(n+1)/2, so P(n)P(n) is false for every nn.

A row of dominoes whose toppling mechanism is in perfect order but with nobody to knock over the first one — that is induction without a base step. As noted in Remark 3.3, the inductive step asserts only an implication and by itself produces nothing.

Example 5.2All horses are the same colour (a false proof)

Let P(n)P(n) be the statement “any collection of nn horses consists of horses that are all the same colour”.

Base step. P(1)P(1) is true: a collection consisting of a single horse has that horse’s own colour throughout.

The alleged inductive step. Assume P(n)P(n) and take n+1n+1 horses h1,h2,,hn+1h_1, h_2, \ldots, h_{n+1}. The sets

A={h1,,hn},B={h2,,hn+1}A = \{h_1, \ldots, h_n\}, \qquad B = \{h_2, \ldots, h_{n+1}\}

each consist of nn horses, so by the induction hypothesis all horses in AA have one colour and all horses in BB have one colour. Picking a horse belonging to AB={h2,,hn}A \cap B = \{h_2, \ldots, h_n\}, its colour is both the colour of all of AA and the colour of all of BB, so the two colours coincide. Since ABA \cup B is the whole collection of n+1n+1 horses, P(n+1)P(n+1) holds.

Where is the gap? The last argument presupposes ABA \cap B \ne \emptyset. But AB={h2,,hn}A \cap B = \{h_2, \ldots, h_n\} is non-empty only when n2n \ge 2. For n=1n = 1 we have A={h1}A = \{h_1\} and B={h2}B = \{h_2\} with no horse in common, and nothing links the colour of AA to that of BB.

So P(1)P(2)P(1) \Rightarrow P(2) has not been established — and P(2)P(2) is false (horses of different colours exist). The row of dominoes is severed between the first and the second, and nothing beyond falls.

The moral is that the inductive step must be proved for every nn. Always inspect an argument written “for general nn” to see whether it silently uses an extra hypothesis for small nn. Be especially wary when the argument takes the intersection of two subsets, considers n1n-1, or splits something into two parts.

Remark 5.3Finitely many checks are not enough

“I checked n=1n = 1 through n=5n = 5, so it holds in general” is not a proof. Examples where the first counterexample lies far away are plentiful.

  • The polynomial f(n)=n2+n+41f(n) = n^2 + n + 41, which Euler noticed around 1772, takes prime values at all 4040 integers n=0,1,,39n = 0, 1, \ldots, 39. But f(40)=1600+40+41=1681=412f(40) = 1600 + 40 + 41 = 1681 = 41^2 is not prime.
  • The Fermat numbers Fn=22n+1F_n = 2^{2^n} + 1 are 3,5,17,257,655373, 5, 17, 257, 65537 for n=0,1,2,3,4n = 0, 1, 2, 3, 4, all prime. Fermat conjectured that they are prime for every nn, but in 1732 Euler exhibited the factorization F5=4294967297=641×6700417F_5 = 4294967297 = 641 \times 6700417.

The following code confirms both.

def is_prime(m):
if m < 2:
return False
d = 2
while d * d <= m:
if m % d == 0:
return False
d += 1
return True
# the smallest n >= 0 for which n^2 + n + 41 is not prime
print([n for n in range(41) if not is_prime(n * n + n + 41)]) # -> [40]
# the factorization of the Fermat number F_5
print(2**32 + 1 == 641 * 6700417) # -> True

Numerical experiment is useful for discovering what ought to be proved. It is not itself a proof. Only when the logic carrying nn to n+1n+1 has been written down are infinitely many statements secured.

6. Proof by contradiction and proof by contraposition

Section titled “6. Proof by contradiction and proof by contraposition”

Proposition 6.1Equivalence with the contrapositive

For any propositions P,QP, Q, the truth of PQP \Rightarrow Q is equivalent to the truth of its contrapositive ¬Q¬P\lnot Q \Rightarrow \lnot P.

Proof(Proposition 6.1)

This can be read off from the agreement of the third and fourth columns of the truth table in §2, but let us also argue by following the meanings.

(\Rightarrow) Suppose PQP \Rightarrow Q is true, and assume ¬Q\lnot Q. If PP were true, then PQP \Rightarrow Q would make QQ true, contradicting the assumption ¬Q\lnot Q. Hence PP is false, that is, ¬P\lnot P is true. From ¬Q\lnot Q we have derived ¬P\lnot P, so ¬Q¬P\lnot Q \Rightarrow \lnot P is true.

(\Leftarrow) Suppose ¬Q¬P\lnot Q \Rightarrow \lnot P is true, and assume PP. If QQ were false, that is, ¬Q\lnot Q true, then the hypothesis would make ¬P\lnot P true, incompatible with PP. Hence ¬Q\lnot Q is false, that is, ¬¬Q\lnot \lnot Q is true. Using elimination of double negation, ¬¬QQ\lnot\lnot Q \Rightarrow Q, we get QQ. From PP we have derived QQ, so PQP \Rightarrow Q is true.

Note that the direction (\Leftarrow) used elimination of double negation. It is precisely the direction we actually use — “proving the contrapositive proves the original statement” — that depends on a rule specific to classical logic.

Proposition 6.2Validity of proof by contradiction

Let PP be a proposition. If assuming ¬P\lnot P yields both RR and ¬R\lnot R for some proposition RR, then PP is true.

Proof(Proposition 6.2)

The hypothesis says that ¬P(R¬R)\lnot P \Rightarrow (R \wedge \lnot R) is true. Now R¬RR \wedge \lnot R is false whatever the truth value of RR (if RR is true then ¬R\lnot R is false; if RR is false then RR is false; either way the conjunction is false).

Suppose ¬P\lnot P were true. Then the antecedent of a true implication would be true, so the consequent R¬RR \wedge \lnot R would be true as well — contrary to the falsity of R¬RR \wedge \lnot R. Hence ¬P\lnot P is false, that is, ¬¬P\lnot\lnot P is true. By elimination of double negation (equivalently, by the law of excluded middle P¬PP \vee \lnot P), PP is true.

6.3. How the two differ, and where they overlap

Section titled “6.3. How the two differ, and where they overlap”
Directto prove P ⇒ QContrapositionto prove P ⇒ QContradictionto prove Passume Passume ¬Qassume ¬Preach Qreach ¬Preach some contradictionThe first two have a fixed goal; only contradiction lets any contradiction count.
Starting points and destinations of the three methods of proof

In tabular form:

Direct proofContrapositionContradiction
Shape of the claimPQP \Rightarrow QPQP \Rightarrow QPP (need not be an implication)
What is assumedPP¬Q\lnot Q¬P\lnot P
Goal aimed atQQ¬P\lnot Pany contradiction
Is the goal fixed?yesyesno
Logical rule relied onnonedouble negation eliminationexcluded middle (double negation elimination)

The two are not unrelated. To prove PQP \Rightarrow Q by contradiction is to assume PP and ¬Q\lnot Q and derive a contradiction. If we choose that contradiction to be ”¬P\lnot P against PP”, then we have derived ¬P\lnot P from ¬Q\lnot Q — which is exactly a proof by contraposition. Proof by contraposition is a special case of proof by contradiction.

Conversely, most proofs written by contradiction can be rewritten as proofs by contraposition, and where this is possible the result reads better. A proof that ends with “contradiction” makes it hard for the reader to trace which hypothesis did the work and where. A contrapositive proof, whose goal is ¬P\lnot P from the outset, makes the destination of the argument plain.

Remark 6.3What exactly is specific to classical logic

Assuming PP, deriving a contradiction and concluding ¬P\lnot P is the very meaning of the negation symbol, and is accepted in intuitionistic logic as well. What is specific to classical logic is the reverse: assuming ¬P\lnot P, deriving a contradiction and concluding PP. The rule ¬¬PP\lnot\lnot P \Rightarrow P used there is not provable intuitionistically.

The difference surfaces when existence is asserted. A proof that goes from “it is contradictory that xx should fail to exist” to ”xx exists” does not produce a single such xx. A proof that also supplies a concrete construction is called constructive, and the distinction is worth keeping. Cantor’s diagonal argument for comparing the sizes of infinite sets is formally a proof by contradiction, yet it is in fact constructive, since it provides a procedure for building an element missing from a given list. For details see Cardinality and infinity: infinities come in different sizes, and in particular Theorem 6.3[濃度と無限].

Remark 6.4Do not use contradiction where contradiction is not needed

“There are infinitely many primes” is a statement often presented as an example of proof by contradiction. The version by contradiction runs as follows. Suppose there were only finitely many primes p1,,prp_1, \ldots, p_r, and consider N=p1p2pr+1N = p_1 p_2 \cdots p_r + 1. Since N2N \ge 2, by Example 4.4 it has a prime factor qq. By assumption this qq must equal some pip_i. But pip_i divides the product p1prp_1 \cdots p_r, so NN leaves remainder 11 on division by pip_i, and pip_i does not divide NN. Contradiction.

Yet the argument can be written down directly, without contradiction. Given any finite collection of primes p1,,prp_1, \ldots, p_r, a prime factor qq of N=p1pr+1N = p_1 \cdots p_r + 1 differs from every pip_i (for the same reason: no pip_i divides NN). In other words, for any finite list we can actually produce a prime not on it. Hence there are infinitely many primes.

This second version supplies a procedure that manufactures an (r+1)(r+1)-st prime from rr given primes, and is that much more informative. The argument in Euclid’s Elements, Book IX, Proposition 20, is close to this direct form. Assuming something and extracting a contradiction is powerful, but using it where it is not needed throws information away.

Definition 7.1Rational and irrational numbers

A real number xx is rational if it can be written as x=p/qx = p/q with pp an integer and qq a non-zero integer. The set of rational numbers is denoted Q\mathbb{Q}. A real number that is not rational is called irrational.

Definition 7.2Even and odd

An integer nn is even if n=2mn = 2m for some integer mm, and odd if n=2m+1n = 2m+1 for some integer mm.

Every integer is either even or odd, and never both. The first half follows from the division theorem for 22 (the remainder is 00 or 11); the second from the fact that 2m=2m+12m = 2m'+1 gives 2(mm)=12(m-m') = 1, whose left-hand side is even while the right-hand side is not divisible by 22.

Lemma 7.3Existence of a representation in lowest terms

For every rational number xx there exist an integer pp and a natural number qq with x=p/qx = p/q and gcd(p,q)=1\gcd(p, q) = 1.

Proof(Lemma 7.3)

By Definition 7.1 we can write x=a/bx = a/b with aa an integer and bb a non-zero integer. If b<0b < 0, change the signs of numerator and denominator simultaneously to get x=(a)/(b)x = (-a)/(-b); so we may assume from the start that b1b \ge 1, that is, bNb \in \mathbb{N}.

Consider the set

T={bN:there is an integer a with x=a/b}.T = \{\, b' \in \mathbb{N} : \text{there is an integer } a' \text{ with } x = a'/b' \,\} .

Since bTb \in T, we have TT \ne \emptyset, so by the well-ordering property(Axiom 3.1) the set TT has a least element qq. As qTq \in T, there is an integer pp with x=p/qx = p/q.

We show that this pair p,qp, q satisfies gcd(p,q)=1\gcd(p,q) = 1. Put d=gcd(p,q)d = \gcd(p, q) and suppose d>1d > 1. Choose integers p,qp', q' with p=dpp = d p' and q=dqq = d q'; then q=q/dq' = q/d is a natural number with 1q<q1 \le q' < q (since d>1d > 1 and q1q \ge 1). Moreover

pq=dpdq=pq=x\frac{p'}{q'} = \frac{dp'}{dq'} = \frac{p}{q} = x

so qTq' \in T, contradicting the minimality of qq in TT. Hence d=1d = 1.

The representation p/qp/q is of course not unique (1/2=2/4=3/6=1/2 = 2/4 = 3/6 = \cdots). For the standpoint that defines the rationals as pairs of integers modulo a suitable equivalence relation, see Relations and equivalence relations: what does “the same” mean?, in particular Proposition 6.1[関係と同値関係]. The lemma above says that each such equivalence class contains a representative with least denominator.

Lemma 7.4If the square is even, so is the number

For an integer nn, if n2n^2 is even then nn is even.

Proof(Lemma 7.4)

We prove the contrapositive: “if nn is odd then n2n^2 is odd”. By Proposition 6.1 this yields the original claim.

Let nn be odd. By Definition 7.2 there is an integer mm with n=2m+1n = 2m+1, and then

n2=(2m+1)2=4m2+4m+1=2(2m2+2m)+1.n^2 = (2m+1)^2 = 4m^2 + 4m + 1 = 2(2m^2 + 2m) + 1 .

Since 2m2+2m2m^2 + 2m is an integer, n2n^2 is odd in the sense of Definition 7.2.

A direct attempt at this lemma is painful: extracting the shape of nn from an equation n2=2kn^2 = 2k needs heavy machinery such as prime factorization. Taking the contrapositive changes what is assumed into information about shape, n=2m+1n = 2m+1, after which one only has to expand. Look at which of the hypothesis and the conclusion carries the information about shape, and move that one to the assumption side: this is the criterion for reaching for a contrapositive proof.

Theorem 7.5Irrationality of the square root of 2

There is no rational number xx with x2=2x^2 = 2. Consequently, if a real number 2\sqrt2 exists (a real number with 2>0\sqrt2 > 0 and (2)2=2(\sqrt2)^2 = 2), then it is irrational.

Proof(Theorem 7.5)

Suppose, for contradiction, that there is a rational xx with x2=2x^2 = 2.

By Lemma 7.3 we may choose an integer pp and a natural number qq with

x=pq,gcd(p,q)=1.x = \frac{p}{q}, \qquad \gcd(p, q) = 1 .

Squaring gives p2/q2=2p^2/q^2 = 2, and since q20q^2 \ne 0 we may multiply by q2q^2 to obtain

p2=2q2.p^2 = 2 q^2 .

Call this equation (A). Its right-hand side has the form 2×(an integer)2 \times (\text{an integer}), so by Definition 7.2 the number p2p^2 is even. By Lemma 7.4, pp is even, say p=2rp = 2r with rr an integer.

Substituting into (A) gives 4r2=2q24r^2 = 2q^2, and dividing by 22,

q2=2r2.q^2 = 2 r^2 .

Again the right-hand side has the form 2×(an integer)2 \times (\text{an integer}), so q2q^2 is even, and by Lemma 7.4 once more, qq is even.

Thus both pp and qq are divisible by 22, so gcd(p,q)2\gcd(p, q) \ge 2, contradicting gcd(p,q)=1\gcd(p,q) = 1.

Hence no rational number satisfies x2=2x^2 = 2.

Let us record what was used where.

There is a reason for stating the theorem as “no rational satisfies x2=2x^2 = 2” rather than ”2\sqrt2 is irrational”. To assert the latter one must first know that the real number 2\sqrt2 exists (Theorem 5.6[What Is a Number? From the Naturals to the Reals, and Why 1 = 0.999… Is True]), and that existence depends on the continuity of the reals (completeness, the least upper bound property(Axiom 5.1)[What Is a Number? From the Naturals to the Reals, and Why 1 = 0.999… Is True]), a fact unavailable in a world of rationals alone. What we proved here is a statement internal to the rationals, using no property of the reals whatsoever.

7.3. An alternative proof by infinite descent

Section titled “7.3. An alternative proof by infinite descent”

Example 7.6A proof that does not use lowest terms

Suppose there is a pair of natural numbers (p,q)(p, q) with p2=2q2p^2 = 2q^2. Put

U={pN:there is qN with p2=2q2}U = \{\, p \in \mathbb{N} : \text{there is } q \in \mathbb{N} \text{ with } p^2 = 2q^2 \,\}

so that UU \ne \emptyset. By the well-ordering property(Axiom 3.1), UU has a least element p0p_0. Choose a corresponding q0Nq_0 \in \mathbb{N}, so that p02=2q02p_0^2 = 2q_0^2.

By the same computation as in the proof of Theorem 7.5, p0p_0 is even, say p0=2rp_0 = 2r with rr an integer, and substituting gives q02=2r2q_0^2 = 2r^2. From p01p_0 \ge 1 and p0=2rp_0 = 2r we get r1r \ge 1, that is, rNr \in \mathbb{N}. Hence q0Uq_0 \in U.

On the other hand q01q_0 \ge 1 gives p02=2q02>q02p_0^2 = 2q_0^2 > q_0^2, and since p0,q0p_0, q_0 are both positive, p0>q0p_0 > q_0. So q0Uq_0 \in U with q0<p0q_0 < p_0, contradicting the minimality of p0p_0 in UU.

Therefore no pair of natural numbers satisfies p2=2q2p^2 = 2q^2, and in particular no rational satisfies x2=2x^2 = 2 (writing x=p/qx = p/q and adjusting signs produces a pair of natural numbers).

An argument of this shape is called infinite descent: if a solution exists, a smaller one can be built from it, but positive integers cannot keep getting smaller forever. Fermat was fond of the method.

Notice that the only tool used here is the well-ordering property(Axiom 3.1), the same tool used in the proof of Theorem 3.2. Mathematical induction and infinite descent are two faces of the single fact that the natural numbers do not continue downwards without end. Induction builds up from below, descent comes down from above and collides with the absence of a floor; only the direction differs, and the root is one.

Corollary 7.7Square roots of non-square natural numbers

If a natural number nn is not a perfect square (that is, there is no natural number mm with n=m2n = m^2), then there is no rational number xx with x2=nx^2 = n.

Proof(Corollary 7.7)

We use uniqueness of prime factorization (the fundamental theorem of arithmetic). Existence of the factorization was shown by strong induction in Example 4.4; the proof of uniqueness is not treated here, but can be found in Takagi’s Shotō Seisūron Kōgi, Chapter 1, listed in the references.

For a prime \ell and a non-zero integer aa, write v(a)v_\ell(a) for the largest e0e \ge 0 such that e\ell^{e} divides aa. Uniqueness of prime factorization gives, for non-zero integers a,ba, b,

v(ab)=v(a)+v(b)v_\ell(ab) = v_\ell(a) + v_\ell(b)

and in particular v(a2)=2v(a)v_\ell(a^2) = 2 v_\ell(a) is even.

Now suppose there is a rational xx with x2=nx^2 = n. Writing x=p/qx = p/q with pp an integer and qq a non-zero integer, we get p2=nq2p^2 = n q^2. Since n1n \ge 1 and q0q \ne 0, we have p0p \ne 0. Taking vv_\ell of both sides for an arbitrary prime \ell,

2v(p)=v(n)+2v(q),that is,v(n)=2(v(p)v(q)).2 v_\ell(p) = v_\ell(n) + 2 v_\ell(q), \qquad \text{that is,} \qquad v_\ell(n) = 2\bigl(v_\ell(p) - v_\ell(q)\bigr) .

Hence v(n)v_\ell(n) is even for every prime \ell. Setting m=v(n)/2m = \prod_{\ell} \ell^{\,v_\ell(n)/2} (the product running over the finitely many primes with v(n)>0v_\ell(n) > 0), all exponents are integers, so mm is a natural number, and

m2=v(n)=nm^2 = \prod_{\ell} \ell^{\,v_\ell(n)} = n

shows that nn is a perfect square. Taking the contrapositive gives the claim.

None of n=2,3,5,6,7,8,10,n = 2, 3, 5, 6, 7, 8, 10, \ldots is a perfect square, so all of their square roots are irrational. By contrast, for n=4n = 4 there is the rational solution x=2x = 2. If one tries to imitate the proof of §7.2 for n=4n = 4, the statement corresponding to Lemma 7.4 becomes false and the argument stops (see part (3) of Exercise 8.3).

Exercise 8.1Easy

Let a,ba, b be real numbers. Show that if a+b2a + b \ge 2 then a1a \ge 1 or b1b \ge 1.

Solution

We prove the contrapositive. The negation of ”a1a \ge 1 or b1b \ge 1” is, by De Morgan's laws(Lemma 4.3)[The Grammar of Mathematics], ”a<1a < 1 and b<1b < 1”. So the contrapositive to be proved is

“if a<1a < 1 and b<1b < 1 then a+b<2a + b < 2”.

Adding bb to both sides of a<1a < 1 gives a+b<1+ba + b < 1 + b, and adding 11 to both sides of b<1b < 1 gives 1+b<21 + b < 2. By transitivity of the order, a+b<2a + b < 2.

By Proposition 6.1, the original claim holds.

A direct attempt would require choosing, from a+b2a + b \ge 2, which of aa and bb is at least 11, forcing a case distinction. Taking negations turns the “or” in the conclusion into an “and” in the hypothesis, so that information about both aa and bb becomes available at once. Whenever the conclusion has the form of an “or”, suspect that a contrapositive is wanted.

Exercise 8.2Standard

Prove by mathematical induction that

k=1n1k221n\sum_{k=1}^{n} \frac{1}{k^2} \le 2 - \frac{1}{n}

for every nNn \in \mathbb{N}. Explain also why the same method fails if one tries to prove k=1n1/k22\sum_{k=1}^{n} 1/k^2 \le 2 directly.

Solution

Base step. For n=1n = 1 the left-hand side is 11 and the right-hand side is 21=12 - 1 = 1. Equality holds, so the claim is true.

Inductive step. Assume k=1n1/k221/n\sum_{k=1}^{n} 1/k^2 \le 2 - 1/n. Adding 1/(n+1)21/(n+1)^2 to both sides,

k=1n+11k221n+1(n+1)2.\sum_{k=1}^{n+1} \frac{1}{k^2} \le 2 - \frac{1}{n} + \frac{1}{(n+1)^2} .

Now (n+1)2=(n+1)(n+1)(n+1)n(n+1)^2 = (n+1)(n+1) \ge (n+1) n (since n+1nn + 1 \ge n and n+1>0n+1 > 0), so

1(n+1)21n(n+1)=1n1n+1\frac{1}{(n+1)^2} \le \frac{1}{n(n+1)} = \frac{1}{n} - \frac{1}{n+1}

(the last equality is checked by putting the fractions over a common denominator: (n+1)nn(n+1)=1n(n+1)\frac{(n+1) - n}{n(n+1)} = \frac{1}{n(n+1)}). Substituting,

k=1n+11k221n+1n1n+1=21n+1\sum_{k=1}^{n+1} \frac{1}{k^2} \le 2 - \frac{1}{n} + \frac{1}{n} - \frac{1}{n+1} = 2 - \frac{1}{n+1}

which is the claim for n+1n+1. By Theorem 3.2 it holds for every nn.

Why 2\le 2 does not go through. Let P(n)P'(n) be "k=1n1/k22\sum_{k=1}^n 1/k^2 \le 2". Assuming P(n)P'(n) yields only

k=1n+11k22+1(n+1)2\sum_{k=1}^{n+1} \frac{1}{k^2} \le 2 + \frac{1}{(n+1)^2}

whose right-hand side exceeds 22. We cannot conclude P(n+1)P'(n+1). The hypothesis is too weak: there is no room to absorb what has been added.

The form 21/n2 - 1/n is a stronger claim than 2\le 2, but for that very reason the induction hypothesis is stronger too, and it carries a margin 1/n1/(n+1)1/n - 1/(n+1) that absorbs 1/(n+1)21/(n+1)^2. A stronger statement can be easier to prove by induction — this is called strengthening the induction hypothesis, and it is a basic technique in using induction.

Exercise 8.3Standard

(1) For an integer nn, prove by contraposition that if n2n^2 is a multiple of 33 then so is nn. (2) Using (1), show that there is no rational number xx with x2=3x^2 = 3. (3) State where the same argument breaks down if applied to x2=4x^2 = 4.

Solution

(1) We prove the contrapositive: “if nn is not a multiple of 33 then neither is n2n^2”. By the division theorem for 33, an integer nn can be written, for some integer mm, in exactly one of the forms n=3mn = 3m, n=3m+1n = 3m+1, n=3m+2n = 3m+2. The last two are the cases where nn is not a multiple of 33.

If n=3m+1n = 3m+1 then

n2=9m2+6m+1=3(3m2+2m)+1n^2 = 9m^2 + 6m + 1 = 3(3m^2 + 2m) + 1

so the remainder on division by 33 is 11.

If n=3m+2n = 3m+2 then

n2=9m2+12m+4=3(3m2+4m+1)+1n^2 = 9m^2 + 12m + 4 = 3(3m^2 + 4m + 1) + 1

so again the remainder is 11.

In both cases n2n^2 is not a multiple of 33. By Proposition 6.1 the original claim follows.

(2) Suppose there is a rational xx with x2=3x^2 = 3. By Lemma 7.3 we may take an integer pp and a natural number qq with x=p/qx = p/q and gcd(p,q)=1\gcd(p,q) = 1. Squaring and multiplying by q2q^2 gives p2=3q2p^2 = 3q^2.

The right-hand side is a multiple of 33, so p2p^2 is a multiple of 33, and by (1) so is pp, say p=3rp = 3r with rr an integer. Substituting gives 9r2=3q29r^2 = 3q^2, and dividing by 33, q2=3r2q^2 = 3r^2. The right-hand side is a multiple of 33, so q2q^2 is too, and by (1) again so is qq.

Then gcd(p,q)3\gcd(p,q) \ge 3, contradicting gcd(p,q)=1\gcd(p,q) = 1. Hence no such rational exists.

(3) The statement corresponding to (1) would be “if n2n^2 is a multiple of 44 then so is nn”, and this is false. A counterexample is n=2n = 2: here n2=4n^2 = 4 is a multiple of 44 while n=2n = 2 is not. So the argument stops at the step where one would deduce from p2=4q2p^2 = 4q^2 that pp is a multiple of 44.

It is only right that it should stop. Since x=2x = 2 is a rational with x2=4x^2 = 4, the conclusion one is trying to prove is itself false. In the language of Corollary 7.7, 4=224 = 2^2 is a perfect square. When a proof will not go through, the first thing to doubt is whether the conclusion is true at all.

Exercise 8.4Hard

Show that log23\log_2 3 is irrational. Here log23\log_2 3 denotes the real number xx with 2x=32^x = 3.

Solution

Put x=log23x = \log_2 3. Since 20=1<32^0 = 1 < 3 and t2tt \mapsto 2^t is strictly increasing, x>0x > 0.

Suppose, for contradiction, that xx is rational. As x>0x > 0, matching the signs of numerator and denominator in the representation of Definition 7.1 lets us write x=p/qx = p/q with natural numbers p,qp, q. Then 2p/q=32^{p/q} = 3, and raising both sides to the qq-th power,

2p=3q.2^p = 3^q .

The left-hand side. Since p1p \ge 1, we have 2p=22p12^p = 2 \cdot 2^{p-1}, and 2p12^{p-1} is an integer, so 2p2^p is even.

The right-hand side. We show by induction on qq that 3q3^q is odd. For q=1q = 1, 31=3=21+13^1 = 3 = 2\cdot 1 + 1 is odd. Assuming 3q3^q odd, say 3q=2m+13^q = 2m+1 with mm an integer,

3q+1=3(2m+1)=6m+3=2(3m+1)+13^{q+1} = 3(2m+1) = 6m + 3 = 2(3m+1) + 1

which is odd. By Theorem 3.2, 3q3^q is odd for every qNq \in \mathbb{N}.

Thus one and the same integer 2p=3q2^p = 3^q is both even and odd, and as we saw in §7.1 no such integer exists. Contradiction.

Therefore log23\log_2 3 is irrational.

A feature of this proof is that it does not use uniqueness of prime factorization. Parity alone sufficed to tell the two sides of 2p=3q2^p = 3^q apart, so no heavier tool was needed. The fewer the tools, the better; estimating how light a tool will do is itself part of the craft of proof.

  • Matsuzaka Kazuo, Shūgō, Isō Nyūmon (Introduction to Sets and Topology), Iwanami Shoten, 1968 (in Japanese) — the construction of the natural numbers, the Peano axioms and the treatment of mathematical induction.
  • Takagi Teiji, Shotō Seisūron Kōgi (Lectures on Elementary Number Theory), 2nd ed., Kyoritsu Shuppan, 1971 (in Japanese) — Chapter 1 (division of integers, primes, uniqueness of prime factorization).
  • G. Pólya, How to Solve It, translated into Japanese by Kakiuchi Kenshin, Maruzen, 1954 (in Japanese) — the section on induction and mathematical induction, on how to form a conjecture before applying induction.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press — Chapter IV, “Irrational Numbers”; various proofs of the irrationality of square roots.
  • Euclid, Yūkuriddo Genron (Euclid’s Elements), translated and annotated by Nakamura Kōshirō, Terasaka Hidetaka, Itō Shuntarō and Ikeda Yoshie, Kyoritsu Shuppan (in Japanese) — Book IX, Proposition 20 (the infinitude of primes).
  • Maehara Shōji, Sūgaku Kisoron Nyūmon (Introduction to Mathematical Logic), Asakura Shoten, 1977 (in Japanese) — the difference between classical and intuitionistic logic, and the place of double negation elimination and excluded middle.

Report an error in this article ・Operated by: Mugen Giken LLCPricingTermsLegal notice

© 2026 夢現技研合同会社 ・Feeding the text to an LLM is welcome. Code samples are MIT licensed.