Proof and Reasoning

Proof by Cases and How to Be Sure None Are Missing

Learn to split a proof into cases that cover every possibility, with reliable ways to partition, check coverage and avoid hidden gaps.

Key takeaways

  • A proof by cases needs two things: a list that covers all possibilities and a valid argument for each item.
  • Cases may overlap without harm, but a gap destroys the proof.
  • Dependable splits include parity, remainders, sign and the ordering of two quantities.
  • "Without loss of generality" is justified only when the omitted case follows by a real symmetry.
  • If the number of cases grows large, look for a better split or a different idea.

In a proof by cases you split the possibilities into groups, prove the claim separately in each group, and conclude that it holds always. The argument is valid only if the groups cover every possibility, so showing that nothing is missing is part of the proof.

Cases are the right tool when no single argument handles everything, but each type of object has a convenient description of its own, such as "even" or "negative".

The logic

Suppose you know that at least one of A, B or C must hold. If A implies S, B implies S and C implies S, then S is true.

Coverage:   A or B or C is always true
Case 1:     if A, then S
Case 2:     if B, then S
Case 3:     if C, then S
Therefore:  S

The first line is the one people skip. Often it is obvious, as with "every integer is even or odd". When it is not obvious, it needs its own argument.

Building a proof by cases
1 Choose a split Pick a property that simplifies each part 2 Prove coverage Show that every object falls in some case 3 Settle each case Use the extra fact that defines it 4 Check the edges Zero, equality and smallest values 5 Combine State the conclusion once for all Choose a split Pick a property that simplifies each part 1 Prove coverage Show that every object falls in some case 2 Settle each case Use the extra fact that defines it 3 Check the edges Zero, equality and smallest values 4 Combine State the conclusion once for all 5

Parity: two cases

Claim: for every integer n, n² + 3n is even.

Proof. Every integer is even or odd. If n = 2k, then n² + 3n = 4k² + 6k = 2(2k² + 3k). If n = 2k + 1, then n² + 3n = 4k² + 4k + 1 + 6k + 3 = 2(2k² + 5k + 2). In both cases the result is even. ∎

Neither case uses anything special about the particular integer. Each handles infinitely many numbers at once.

Remainders: as many cases as you need

When you divide an integer by m > 0, the remainder is one of 0, 1, ..., m − 1. That gives a split that is exhaustive by a theorem.

Claim: for every integer n, n⁵ − n is divisible by 5.

Factor first: n⁵ − n = n(n − 1)(n + 1)(n² + 1). Then write n = 5q + r.

Remainder r A factor divisible by 5
0 n
1 n − 1
4 n + 1
2 n² + 1, since 2² + 1 = 5
3 n² + 1, since 3² + 1 = 10

In the last two rows, n² + 1 = 25q² + 10qr + r² + 1, and r² + 1 is a multiple of 5. All five remainders appear, so the claim is proved. A check: 3⁵ − 3 = 240. This is one instance of Fermat's little theorem, and the method belongs to modular arithmetic.

Choosing a good split

The same claim can often be divided in several ways, and the choice decides how much work you do. Look for the property that causes the difficulty, then split on it.

Difficulty in the claim A split worth trying
Behavior depends on divisibility by m The m possible remainders
An absolute value appears Whether the inside is negative or not
A maximum or minimum appears Which quantity is larger
You want to divide by x x = 0 and x ≠ 0
A quadratic with a parameter Sign of the leading coefficient and of the discriminant

The fourth row matters even when the claim never mentions cases. Suppose you want to solve x² = 5x. Dividing by x gives x = 5 and silently discards x = 0. Splitting first keeps both: if x = 0 the equation holds, and if x ≠ 0 division is allowed and gives x = 5.

Choose the coarsest split that works. Ten remainders will settle a question about divisibility by 5, but five are enough.

Using cases to rule things out

Claim: a sum of two integer squares never leaves remainder 3 when divided by 4.

Proof. An even number 2k has square 4k², with remainder 0. An odd number 2k + 1 has square 4(k² + k) + 1, with remainder 1. So each square leaves remainder 0 or 1. A sum of two squares therefore leaves remainder 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 or 1 + 1 = 2. None is 3. ∎

It follows at once that numbers such as 7, 11 and 2023 are not sums of two squares. The converse does not hold: 21 leaves remainder 1 and still is not a sum of two squares, as you can check by trying 21 − 0, 21 − 1, 21 − 4, 21 − 9 and 21 − 16, none of which is a square.

Sign and absolute value

The absolute value is itself defined by cases: |x| = x if x ≥ 0, and |x| = −x if x < 0.

Claim: for real x and y, |xy| = |x| · |y|.

Proof. If x ≥ 0 and y ≥ 0, then xy ≥ 0, and both sides equal xy. If x < 0 and y < 0, then xy > 0, so |xy| = xy = (−x)(−y). If x ≥ 0 and y < 0, then xy ≤ 0, so |xy| = −xy = x(−y). The remaining case, x < 0 and y ≥ 0, is the previous one with the names of x and y exchanged. ∎

Note where zero went. It sits in the "≥ 0" side. A split into "positive" and "negative" alone would lose it, which is the most common gap in sign arguments.

The triangle inequality

Claim: for all real x and y, |x + y| ≤ |x| + |y|.

A direct split on the signs of x and y needs four cases and further subcases. A better route uses one fact: for every real t, both t ≤ |t| and −t ≤ |t|.

Proof. If x + y ≥ 0, then |x + y| = x + y ≤ |x| + |y|, using t ≤ |t| twice. If x + y < 0, then |x + y| = (−x) + (−y) ≤ |x| + |y|, using −t ≤ |t| twice. ∎

Only two cases remain, because the split is on the quantity inside the troublesome absolute value, x + y, and not on its parts. When a case analysis starts to sprawl, ask whether you are splitting on the right thing.

"Without loss of generality"

The last case above was dismissed by symmetry. This is often phrased as "without loss of generality", or WLOG.

It is legitimate when swapping or renaming turns the omitted case into one already proved, without changing the claim. Here |xy| = |x| · |y| is unchanged if x and y trade places.

It is not legitimate for an asymmetric claim. If a statement concerns x − y, swapping the letters flips its sign. Before using the phrase, perform the swap on paper and look at what happens to every hypothesis and the conclusion.

Claim: max(x, y) = (x + y + |x − y|)/2. Both sides are symmetric, so assume x ≥ y. Then |x − y| = x − y, and the right side is (x + y + x − y)/2 = x, which is the maximum.

How to be sure nothing is missing

Use splits that come with a guarantee.

  • A statement and its negation: P or not P.
  • Remainders on division by m: exactly m possibilities.
  • Order of two real numbers: x < y, x = y or x > y.
  • Sign of one real number: negative, zero or positive.
  • Size of a finite object: n = 0, n = 1 or n ≥ 2.

With two independent properties, multiply them out. Two signs for x and two for y give four combinations, and a small table shows whether you have all four.

Then test coverage with awkward examples: zero, equal values, the smallest allowed input, a number that sits on a boundary. For each, name the case that contains it. If you cannot, there is a gap.

When there are very many cases

Sometimes the list is long. To prove something about primes greater than 3, split by remainder on division by 6. Remainders 0, 2 and 4 give even numbers, and remainder 3 gives a multiple of 3, so a prime greater than 3 must leave remainder 1 or 5. That is a case analysis that shrinks the problem.

The four color theorem sits at the far end. Its proof reduces the question to a large finite collection of configurations, which are checked by computer. Mathematicians must then trust both the argument that the list is complete and the program that checks it. That has been reexamined with formal proof software.

A long case analysis can be correct and still unsatisfying. Often a better idea merges the cases, as when a square absorbs a distinction of sign.

Writing the cases clearly

Announce the split before you start: "We consider three cases according to the remainder of n on division by 3." Label each case, state its assumption in the first sentence and end it with the same conclusion.

Avoid leaning on one case's assumption inside another. A variable defined as n = 2k in the even case does not exist in the odd case. After the last case, add one sentence saying that the cases cover all possibilities and so the claim holds.

If two cases have nearly identical proofs, you may write one and explain the exact change needed for the other. "The second case is similar" is acceptable only if a reader could really carry it out.

Cases that surprise

Cases can prove that something exists without saying which. Claim: there are irrational numbers a and b with aᵇ rational.

Proof. Consider √2 raised to √2. If it is rational, take a = b = √2. If it is irrational, take a equal to it and b = √2; then aᵇ = (√2)² = 2. ∎

One of the two cases delivers the pair, and the argument does not say which. Such reasoning is discussed in constructive and nonconstructive proofs. For another place where cases appear in everyday work, see direct proof examples that split on parity partway through.

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