On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Sets & Logic · Grade 9-12

Counterexample

A counterexample is one specific case that satisfies a claim's hypothesis yet contradicts its conclusion, disproving the general statement.

¬(∀x P(x))⇔∃x ¬P(x)

Quick Answer

A counterexample is one specific case that satisfies a claim's hypothesis yet contradicts its conclusion, disproving the general statement. You use one when you suspect an 'always', 'every' or 'for all' claim is false: instead of arguing in general, you produce a single case that meets the conditions and fails the conclusion. Against 'every prime is odd', the number 2 is enough. One valid counterexample settles the question completely, which makes it the quickest way to show a conjecture is wrong.

Why This Matters

A general claim can pass a thousand checks and still be false: n2−n+41 is prime for n=1 through 40 and fails at n=41. Knowing that one case can sink a claim stops you from trusting patterns too early, saves you from attempting proofs of false statements, and gives a cheap test for any rule before you build on it.

Intuitive Explanation

Someone says, 'Every swan is white.' You could watch a million white swans and still not be sure. But one black swan, and black swans do live in Australia, ends the argument. A claim about every case is a promise with no exceptions, so a single exception breaks it. That lopsidedness is the core of the idea: confirming 'for all' needs a general argument, while refuting it needs one example.

A counterexample has to pass two tests. It must satisfy the hypothesis, the 'if' part, and it must break the conclusion, the 'then' part. To refute 'if n is prime, then n is odd', the number 9 is useless: it is odd, but it is not prime, so it never fell under the claim. The number 2 is prime and even, so it does both jobs at once.

A confirming example can look similar but does the opposite work. Checking that 3, 5 and 7 are odd primes supports the claim without proving it. Also make sure the claim really is universal. 'Some prime is even' is an existence claim, so no single case can refute it; showing it false would take an argument about every prime.

Think of it like this. A universal claim works like a chain holding a weight: it is only as strong as its weakest link. You can inspect a hundred sound links, but one cracked link drops the load, and a counterexample is that cracked link. Unlike a chain, a broken claim can often be repaired by narrowing it, as in 'every prime greater than 2 is odd'.

Core idea. A counterexample is a single instance fitting the hypothesis but breaking the conclusion, which disproves a universal claim outright.


When to Use

Look for a counterexample when a statement says always, every, for all or never and you suspect it is false, or when you are asked to disprove it. Try special values first (0, 1, negatives, fractions, the prime 2, a square among rectangles), since claims often break there. If you believe the statement is true, the hunt will fail and you need a proof instead. If a claim says some or there exists, one case can prove it but no single case can disprove it.

Tip. Ask: Am I trying to kill a universal claim by exhibiting one case that fits the hypothesis but breaks the conclusion?

How to Recognize It

Before hunting for a counterexample, split the claim into its 'if' part and its 'then' part, because a valid counterexample must pass the first and fail the second.

  1. Does the claim cover every case of some kind, such as every prime or all real x?

    If yes, one failing case disproves it. If the claim only says some case exists, as in 'some prime is even', no single example can refute it; showing it false needs an argument about every case, closer to a proof.

  2. Does your candidate actually meet the claim's condition?

    Against 'if n is odd, then n2+1 is odd', the number 4 proves nothing because 4 is not odd. Check the 'if' part first; here 3 works, since 32+1=10 is even.

  3. Have you tried the awkward values first: 0, 1, negatives, fractions, the prime 2, or a square among rectangles?

    If not, try them first, since false claims often break there: 'x<x for all positive x' fails at x=14, where x=12. If every awkward value passes, start to suspect the claim is true.

  4. After a long search, do you start to believe the claim is true?

    If yes, switch to proof: look for a reason that covers every case at once. More failed searches never prove a 'for all' claim; a million checked cases are still only confirming examples.

Counterexample compared with Proof, Edge case, and Confirming example

All four rows involve examples or claims about every case, so they get muddled. Ask what your example does to the claim: breaks it (counterexample), supports it without settling anything (confirming example), tests a rule at an extreme (edge case), or gives way to an argument covering all cases (proof).

Counterexample

Meaning
Use this when you want to disprove a universal 'for all' claim and a single violating instance would settle it.
Key test
Am I trying to kill a universal claim by exhibiting one case that fits the hypothesis but breaks the conclusion?
Formula
¬(∀x P(x))⇔∃x ¬P(x)
Example
Claim: 'For all integers n, n2−n+11 is prime.' Disprove it.

Proof

Meaning
Establishes a universal claim is true for every case, the opposite goal.
Key test
Use when you must confirm a 'for all' statement, not refute it.
Formula
∀x P(x)
Example
Prove every even square is divisible by 4

Edge case

Meaning
Probes how a formula behaves at extremes; need not disprove anything.
Key test
Use when exploring boundary behavior rather than refuting a claim.
Example
Checking x=0 in 1/x

Confirming example

Meaning
A case that supports the claim, which can never prove a universal.
Key test
Use only to illustrate, never to establish a 'for all'.
Example
3 is an odd prime (does not prove all are)

Formula & Notation

¬(∀x P(x))⇔∃x ¬P(x)
¬(∀x P(x))⇔∃x0 ¬P(x0); a single witness x0 with ¬P(x0) refutes the universal claim

How to read it: To disprove ∀x P(x), exhibit a specific x0 such that ¬P(x0)

Worked Examples

Example 1 — Disprove a claim

Easy

Claim: 'For all integers n, n2−n+11 is prime.' Disprove it.
Show the steps and the answer
  1. Check small values: n=0,1,2,3,4 give 11,11,13,17,23, all prime.

    The early cases all work, which is why the claim looks believable; passing checks prove nothing.

  2. Pick n so that every term shares a factor: at n=11, the terms n2, −n and 11 are all multiples of 11.

    If 11 divides every piece, it divides the total, so the total cannot be prime unless it is 11 itself.

  3. Compute: 112−11+11=121−11+11=121.

    Showing the actual output makes the counterexample checkable by anyone.

  4. Factor: 121=11⋅11, so it is not prime.

    n=11 is an integer, so it meets the hypothesis, and its output is composite, so it breaks the conclusion.

Answer: n=11 is a counterexample, so the claim is false

Takeaway: To break a 'prime for every n' formula, choose n so that every term is divisible by the same number. One such n settles the question.

Example 2 — Edge case, not counterexample

Standard

You test n=0 in n2−n+11 and get 11, a prime. What did that accomplish?
Show the steps and the answer
  1. Compare the result with the claim: 02−0+11=11, which is prime, so the claim holds at n=0.

    A case that agrees with the conclusion is a confirming example, not a counterexample.

  2. Ask what one agreeing case can show: the claim covers infinitely many integers and n=0 is just one of them.

    Every other integer is still untested, so the claim is neither proved nor disproved.

  3. Classify the test: trying n=0 is an edge-case probe of the formula at a special input.

    Testing 0 is a sound habit, but here it simply passed.

  4. Recall from the previous problem that n=11 gives 121=11⋅11.

    The claim is false after all, and the passing test at 0 gave no warning of it.

Answer: It proves nothing about the universal claim

Takeaway: A passing test, even at a special input like 0, cannot prove a 'for all' claim. Only a failing case settles anything, and it settles the claim as false.

Example 3 — Find the mistake: outside the hypothesis

Application

Claim: 'If a whole number is divisible by 4, then it is divisible by 8.' Priya writes: "Counterexample: 6. It is not divisible by 8, so the claim is false." Find the mistake and correct it.
Show the steps and the answer
  1. Check 6 against the hypothesis: 6÷4=1.5, so 6 is not divisible by 4.

    A counterexample must satisfy the 'if' part. The claim says nothing about 6, so 6 cannot break it.

  2. Search only among multiples of 4: 4, 8, 12, 16, and so on.

    These are the numbers the claim makes a promise about.

  3. Test 4: 4÷8=0.5, so 4 is not divisible by 8. Likewise 12÷8=1.5.

    Each of 4 and 12 meets the hypothesis and breaks the conclusion, so either one is a genuine counterexample.

Answer: 6 is not a counterexample; 4 (or 12) is, so the claim is false.

Takeaway: Before offering a counterexample, check that it satisfies the 'if' part. A case outside the hypothesis says nothing about the claim.

Where You'll See It

  • A bug report against working code

    A bug report is a counterexample to 'this program works for every input'. One failing case, such as a customer named O'Brien whose apostrophe crashes a sign-up form, proves the code is wrong no matter how many thousands of other names went through. Testers keep that one input as a permanent test.

  • Fermat's prime formula

    Fermat believed every number 22n+1 is prime; it is for n=0 to 4, giving 3, 5, 17, 257 and 65537. In 1732 Euler found that n=5 gives 4294967297=641⋅6700417, and that single factorization ended the claim.

  • A 200-year-old conjecture ended

    Euler also conjectured that a fifth power can never be a sum of fewer than five fifth powers. In 1966 Lander and Parkin found 275+845+1105+1335=1445, four fifth powers, and published it in a paper only two sentences long.

Common Mistakes

  1. The slip: Giving a confirming example and thinking it proves the claim

    Instead: one supporting case cannot establish a universal statement.

  2. The slip: Producing a case that fails the hypothesis

    Instead: a valid counterexample must satisfy the 'if' part and break the 'then' part.

  3. The slip: Trying to disprove a claim that was only about 'some'

    Instead: a counterexample refutes 'for all', not an existence claim.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Claim: "If a number is divisible by 4, then it is divisible by 8." Find a counterexample.

    Hint: Try small multiples of 4.

  2. Claim: "The sum of any two primes is even." Find a counterexample.

    Hint: Is every prime odd?

  3. Claim: "For all real a and b, a2+b2=a+b." Disprove it with specific numbers.

    Hint: Try a pair that makes a2+b2 a perfect square.

  4. Claim: "For every positive integer n, 2n+1 is prime." Test n=1,2,3 and find a counterexample.

    Hint: Work out each value and check for factors.

  5. Claim: "All multiples of 6 are even." Kim checks 12, 18 and 24 and says she has proved it. Are examples enough, or is a proof needed?

    Hint: Can a few cases cover infinitely many multiples of 6?

  6. Claim: "If n is odd, then n2 is odd." Jay says n=4 is a counterexample because 42=16 is even. Correct him.

    Hint: Does n=4 satisfy the "if" part of the claim?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Can one counterexample really overturn a famous conjecture?

Yes, and it has happened. In 1769 Leonhard Euler conjectured that, for powers above the second, you need at least nn nn-th powers to add up to another nn-th power. In 1966 L. J. Lander and T. R. Parkin used a computer to find 275+845+1105+1335=144527^5 + 84^5 + 110^5 + 133^5 = 144^5, four fifth powers adding to a fifth power. That single equation ended a conjecture nearly two centuries old.

If a claim fails once, is it worthless?

Usually not, because the counterexample shows where to repair it. The claim 'x2>xx^2 > x for all real xx' fails at x=12x = \frac{1}{2}, and checking further shows it fails for every xx from 0 to 1. The repaired claim, 'x2>xx^2 > x whenever x>1x > 1 or x<0x < 0', is true. Mathematicians often turn a broken conjecture into a theorem by adding the condition a counterexample exposed.

If I cannot prove a claim, does that show it is false?

No. A failed proof shows only that one argument did not work. Many true theorems resisted proof for centuries; Fermat's Last Theorem waited about 350 years before Andrew Wiles proved it in the 1990s. To show a claim false you need an actual case where the hypothesis holds and the conclusion fails, written down and checked. Until you have one, the honest verdict is 'not yet known'.

Does a counterexample have to be a number?

No. It can be any object that fits the claim's condition. Against 'a quadrilateral with four equal sides must be a square', a rhombus with angles of 60∘60^\circ and 120∘120^\circ is the counterexample. Against 'a function with an unbroken graph has a slope at every point', the function ∣x∣|x|, with its sharp corner at 0, does the job. A drawing, a function or a set can all break a claim.

Learning Path

← Before

Quantifiers
Counterexample

You are here

You need Quantifiers first, because a counterexample attacks a 'for all' statement, and the negation of 'for all' is 'there is a case where it fails'. Counterexamples add a fast, decisive way to show a claim is false. Next, Proof (Intuition) handles the other direction: finding a reason a claim must hold in every case, the only way a universal statement can be confirmed.

See Also