Lably
Skip to content

Counterexample

Exception to a proposed general rule

  • 4 min read
  • 2 chapters
  • 2 labs on Lably

Learn it on Lably

In mathematics

In mathematics, counterexamples are often used to establish the boundaries of possible theorems. By using counterexamples to show that certain conjectures are false, mathematical researchers can then avoid going down blind alleys and learn to modify conjectures to produce provable theorems. It is sometimes said that mathematical development consists primarily in finding (and proving) theorems and counterexamples.

Rectangle example

Suppose that a mathematician is studying geometry and shapes, and she wishes to prove certain theorems about them. She conjectures that "All rectangles are squares", and she is interested in knowing whether this statement is true or false.

In this case, she can either attempt to prove the truth of the statement using deductive reasoning, or she can attempt to find a counterexample to the statement if she suspects it to be false. In the latter case, a counterexample would be a rectangle that is not a square, such as a rectangle with two sides of length 5 and two sides of length 7. However, despite having found rectangles that were not squares, all the rectangles she did find had four sides. She then makes the new conjecture "All rectangles have four sides". This is logically weaker than her original conjecture, since every square has four sides, but not every four-sided shape is a square.

The above example explained — in a simplified way — how a mathematician might weaken her conjecture in the face of counterexamples, but counterexamples can also be used to demonstrate the necessity of certain assumptions and hypotheses. For example, suppose that after a while, the mathematician above settled on the new conjecture "All shapes that are rectangles and have four sides of equal length are squares". This conjecture has two parts to the hypothesis: the shape must be 'a rectangle' and must have 'four sides of equal length'. The mathematician then would like to know if she can remove either assumption, and still maintain the truth of her conjecture. This means that she needs to check the truth of the following two statements:

  1. "All shapes that are rectangles are squares."
  2. "All shapes that have four sides of equal length are squares".

A counterexample to (1) was already given above, and a counterexample to (2) is a non-square rhombus. Thus, the mathematician now knows that each assumption by itself is insufficient.

Other mathematical examples

A counterexample to the statement "all prime numbers are odd numbers" is the number 2, as it is a prime number but is not an odd number. Neither 7 nor 10 is a counterexample, since neither one contradicts the statement. In this example, 2 is in fact the only possible counterexample to the statement, but that alone is enough to contradict the statement. In a similar manner, the statement "All natural numbers are either prime or composite" has the number 1 as a counterexample, as 1 is neither prime nor composite.

Euler's sum of powers conjecture was disproved by counterexample. It asserted that at least n nth powers were necessary to sum to another nth power. This conjecture was disproved in 1966, with a counterexample involving n = 5; other n = 5 counterexamples are now known, as well as some n = 4 counterexamples.

Witsenhausen's counterexample shows that it is not always true (for control problems) that a quadratic loss function and a linear equation of evolution of the state variable imply optimal control laws that are linear.

All Euclidean plane isometries are mappings that preserve area, but the converse is false as shown by the counterexamples of shear mapping and squeeze mapping.

Other examples include the disproofs of the Seifert conjecture, the Pólya conjecture, the conjecture of Hilbert's fourteenth problem, Tait's conjecture, and the Ganea conjecture.

In 2026, the Jacobian conjecture for ⁠n>2⁠ was disproved by Levent Alpöge which he credited to Anthropic's Claude Fable 5 large language model. The announcement, containing the explicit counterexample, was made by Alpöge via a Tweet on the X social media platform.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Topics in mathematics