Proof and Reasoning

Direct Proof With Worked Examples

Learn the direct proof method, its basic template and six worked examples on parity, divisibility, inequalities, functions and sets.

Key takeaways

  • A direct proof starts from the hypothesis and ends at the conclusion, with every step justified.
  • Unpacking definitions usually gives you the first line and tells you what the last line must look like.
  • You may discover an argument by working backward, but you should present it forward.
  • Different objects need different letters, or you will prove only a special case.
  • If the hypothesis gives you little to manipulate, try the contrapositive or contradiction instead.

A direct proof of "if P, then Q" assumes P is true and moves step by step, using definitions and known results, until Q follows. It is the most straightforward method and the best one to try first.

The idea is simple, and the skill lies in choosing the steps. Six worked examples below show the common moves: unpacking a definition, building the required form, working backward on scratch paper and chaining two properties together.

The template

Claim:  If P, then Q.

1. Assume P.
2. Restate P using definitions.
3. Deduce new facts, one justified step at a time.
4. Arrive at the definition (or form) of Q.
5. State that Q holds.

Behind this lies a basic rule of logic. If each step has the form "this true thing implies that thing", the truth is carried along the chain from P to Q.

You do not need to consider what happens when P is false. The claim "if P, then Q" promises nothing in that case, so assuming P costs you no generality.

The shape of a direct proof
1 Assume P Take the hypothesis as given 2 Unpack Replace terms with their definitions 3 Manipulate Use algebra and known theorems 4 Repack Shape the result to fit the definition of Q 5 Conclude State Q in words Assume P Take the hypothesis as given 1 Unpack Replace terms with their definitions 2 Manipulate Use algebra and known theorems 3 Repack Shape the result to fit the definition of Q 4 Conclude State Q in words 5

Example 1: odd squares

Claim: if n is an odd integer, then n² leaves remainder 1 when divided by 8.

First test it: 9 = 8 + 1, 25 = 24 + 1, 49 = 48 + 1.

Proof. Let n be odd, so n = 2k + 1 for some integer k. Then n² = 4k² + 4k + 1 = 4k(k + 1) + 1. The integers k and k + 1 are consecutive, so one of them is even, and therefore k(k + 1) = 2m for some integer m. Hence n² = 8m + 1. ∎

The first step was mechanical. The idea was noticing that 4k² + 4k factors into something that hides an extra factor of 2. Examples told you to expect a multiple of 8, which told you what to look for.

Example 2: divisibility

We say an integer a divides b, written a | b, when b = ak for some integer k.

Claim: if a | b and a | c, then a | (bx + cy) for all integers x and y.

Proof. Suppose a | b and a | c. Then b = ak and c = aj for some integers k and j. For any integers x and y, bx + cy = akx + ajy = a(kx + jy). Since kx + jy is an integer, a divides bx + cy. ∎

This short result is used constantly. It is the engine behind the Euclidean algorithm, and it explains many divisibility rules.

Note the letters k and j. Using k twice would force b = c.

The pattern of this proof recurs everywhere. The hypotheses are existence statements, since "a divides b" says that some integer k exists. You give those integers names. The conclusion is also an existence statement, so your job is to build the integer it asks for, here kx + jy.

A quick numerical check: 7 divides 21 and 35. With x = 2 and y = −1, you get 2 × 21 − 35 = 7, which 7 divides as promised.

Example 3: rational numbers

A real number is rational if it equals p/q for integers p and q with q ≠ 0.

Claim: the sum of two rational numbers is rational.

Proof. Let r and s be rational. Then r = a/b and s = c/d for integers a, b, c, d with b ≠ 0 and d ≠ 0. Adding, r + s = (ad + bc)/(bd). The numbers ad + bc and bd are integers, and bd ≠ 0 because neither b nor d is zero. So r + s is rational. ∎

The last sentence but one checks every requirement of the definition, including the nonzero denominator. Skipping that check is the typical gap.

The analogous claim for irrational numbers is false: √2 and −√2 are irrational and add to 0. A direct proof cannot be transferred by analogy alone.

Example 4: working backward

Claim: if a and b are nonnegative real numbers, then (a + b)/2 ≥ √(ab).

This is the inequality between the arithmetic and geometric means. The hypothesis offers little to push forward, so start at the goal on scratch paper.

(a + b)/2 ≥ √(ab)
a + b ≥ 2√(ab)
a − 2√(ab) + b ≥ 0
(√a − √b)² ≥ 0            true for all real numbers

The final line is obviously true. Now reverse the order, checking that each step is valid in the new direction.

Proof. Let a, b ≥ 0, so √a and √b are real. A square is never negative, so (√a − √b)² ≥ 0. Expanding, a − 2√(ab) + b ≥ 0. Adding 2√(ab) to both sides gives a + b ≥ 2√(ab), and dividing by 2 gives (a + b)/2 ≥ √(ab). ∎

Equality holds exactly when √a = √b, that is, when a = b. For a = 9 and b = 1 the means are 5 and 3.

Handing in the scratch work as the proof would assume the conclusion in its first line. Steps such as squaring can fail to reverse, so the reversal is a real check.

Example 5: composing functions

A function f is injective, or one to one, if f(x) = f(y) always implies x = y.

Claim: if f from A to B and g from B to C are both injective, then the composite g∘f, defined by (g∘f)(x) = g(f(x)), is injective.

Proof. Suppose x and y are in A and g(f(x)) = g(f(y)). Since g is injective, f(x) = f(y). Since f is injective, x = y. Therefore g∘f is injective. ∎

There is no arithmetic here at all. The proof is pure definition handling: the goal itself is an implication, so you assume its premise and peel off one function at a time, outermost first. More on this vocabulary is in injective, surjective and bijective functions.

Example 6: sets

Claim: if A is a subset of B and B is a subset of C, then A is a subset of C.

The definition says that A is a subset of B when every element of A is also an element of B. To prove that something holds for every element, take an arbitrary one.

Proof. Suppose A is a subset of B and B is a subset of C. Let x be any element of A. Because A is a subset of B, x is in B. Because B is a subset of C, x is in C. Since x was an arbitrary element of A, every element of A is in C. ∎

If A happens to be empty, there is no x to take, and the claim holds automatically. You do not need a separate case, since the argument speaks about whatever elements A has.

This "let x be any element" opening is the standard first line for statements about all members of a collection. The rest of the proof is forbidden from assuming anything about x beyond its membership.

How to find the middle steps

When you cannot see the route, work from both ends.

  • Write the hypothesis in as many equivalent forms as you can.
  • Write what the conclusion would look like, and what would be enough to reach it.
  • Compare the two lists and look for a bridge: a factorization, a substitution or a known theorem.
  • Test small examples to learn which form of the answer actually appears.
  • Ask whether you have used every hypothesis. An unused one often points to the missing step.
Hypothesis or goal A natural first move
n is even Write n = 2k
a divides b Write b = ak
x is rational Write x = p/q with q ≠ 0
A is a subset of B Take an arbitrary element of A and show it lies in B
Two sets are equal Show each is a subset of the other
An inequality Move everything to one side and look for a square

When direct proof is the wrong tool

Try to prove directly that if n² is even, then n is even. You get n² = 2k, then n = ±√(2k), which says nothing about whether n is divisible by 2. Reversing the viewpoint helps: the contrapositive starts from "n is odd" and finishes in one line.

Claims that something does not exist, such as "no fraction squares to 2", also resist a direct approach, because there is no object to start manipulating. Those are the home ground of proof by contradiction. Claims about every positive integer in which each case builds on the previous one suit induction.

Writing it up well

A good direct proof reads as a short paragraph. State the assumption in the first sentence. Introduce every new letter as you use it, saying what kind of object it is. Join equations with words that show the logic, such as "so", "since" and "therefore".

Finish by naming what you have shown. A reader should not have to compare your last equation with the claim to work out whether you are done.

It is also worth stating what you did not prove. Example 1 shows that odd squares leave remainder 1 on division by 8. It does not show that every number with remainder 1 is a square: 17 = 16 + 1 is not one.

Practice claims

Try these with the template. Prove that the product of two rational numbers is rational. Prove that if a | b and b | c, then a | c. Prove that the sum of three consecutive integers is divisible by 3. For the last, call the integers n, n + 1 and n + 2, add them and factor the result. Then ask whether the sum of four consecutive integers is divisible by 4, and test it before you try to prove anything: 1 + 2 + 3 + 4 = 10.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 41 articles in Proof and Reasoning →

Latest news on this topic