## What are your favorite instructional counterexamples?

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

Related: question #879, Most interesting mathematics mistake. But the intent of this question is more pedagogical.

In many branches of mathematics, it seems to me that a good counterexample can be worth just as much as a good theorem or lemma. The only branch where I think this is explicitly recognized in the literature is topology, where for example Munkres is careful to point out and discuss his favorite counterexamples in his book, and Counterexamples in Topology is quite famous. The art of coming up with counterexamples, especially minimal counterexamples, is in my mind an important one to cultivate, and perhaps it is not emphasized enough these days.

So: what are your favorite examples of counterexamples that really illuminate something about some aspect of a subject?

Bonus points if the counterexample is minimal in some sense, bonus points if you can make this sense rigorous, and extra bonus points if the counterexample was important enough to impact yours or someone else's research, especially if it was simple enough to present in an undergraduate textbook.

As usual, please limit yourself to one counterexample per answer.

-

1
@Regenbogen - I am familiar with the proof that Selmer's curve has points everywhere locally but not globally. But that counterexample led many people to study the manner in which the Hasse Prinicple could fail. For example, there is the Brauer-Manin Obstruction. However Skorobogatov has found examples of curves with trivial Manin obstruction and everywhere local points but no global points, so the story is not finished...In my comment I was suggesting that someone more familiar with the current work might use this example. – Ben Linowitz Mar 2 2010 at 17:23
show 4 more comments

## 52 Answers

I like the Sorgenfrey line. It's finer than the metric topology on R, and hereditarily Lindelöf, hereditarily separable, first countable, but not second countable. It's non-orderable, but generalised orderable, etc. It's a popular example for metrisation theorems, e.g. All its compact subsets are at most countable.

-

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

Here is a useful example of counter-examples in commutative ring theory;

Let $R=P(\mathbb{N})$ be the power set of $\mathbb{N}.$ It has a ring structure $(R, +, \times)$ where $+$ is the symmetric difference of sets and $\times$ is the intersection of sets.

Applications:

Obviously, $R$ is a commutative ring with $1$, ($\mathbb{N}$ is the $1$).

1) Let $R$ be a commutative ring with $1$ and a multiplicative closed set of $R$. If $R$ is Noetherian (Artinian) ring then $S^{-1}R$ is Noetherian (Artinian). Does the converse hold?

No, it doesn't.

Using the above example, for any prime ideal $p$ of $R$, $R_p$ (the localization at $p$) is Noetherian (Artinian) while, $R$ is not Noetherian (Artinian).

Outline:

Consider P({1}) $\subset$ P({1,2}) $\subset...$ and $P(\mathbb{N}) \supset$ P($\mathbb{N} \setminus${1}) $\supset$ P($\mathbb{N} \setminus${1,2}) $\supset ...$ showing that $R$ is neither Noetherian nor Artinian ring.

It is easy to verify that $R_p$ is isomorphic to $\mathbb{Z}/2$, hence it is both Noetherian & Artinian. (Every element of $R_p$ is either $0/1$ or a invertible.)

2) Let $R$ be an integral domain (also commutative with $1$), then for every multiplicative closed set of $R$, $S^{-1}R$ is an integral domain, hence for every $R_p.$ Does the converse hold?

By the above example, it doesn't, since $(P(\mathbb{N}),+,\times)$ is not an integral domain.

-

1
It may be worth noticing that this ring $R$ is nothing but $(\mathbb Z/2)^{\mathbb N}$ in disguise. Also, I am surprised with your statement that localizations $R_p$ are all isomorphic to $\mathbb Z/2$. – ACL Mar 17 2011 at 9:10

3
The prime ideals in this ring are the complements of the ultrafilters on `$\mathbb N$`, so the spectrum is the Stone-Cech compactification of the discrete space `$\mathbb N$`. – Andreas Blass Mar 17 2011 at 13:53
show 1 more comment

Small's Example from noncommutative algebra...

The triangular ring $T = \pmatrix{\mathbb{Z} & \mathbb{Q} \\ 0 & \mathbb{Q}}$ has the following properties:

• It's right noetherian but not left noetherian
• It's right hereditary but not left hereditary
• The right global dimension is 1 but the left global dimension is 2
• This generalizes to give an example of a ring with right global dimension $n$ and left global dimension $n+1$ by replacing $\mathbb{Z}$ by $R$, a commutative noetherian domain of global dimension $n$, then replacing $\mathbb{Q}$ by $K = Frac(R)$
• A similar example gives a ring which is noetherian but neither left nor right Ore. Just take $R = \pmatrix{S & 0 \\ S & I}$ where $S = \pmatrix{\mathbb{Z} & 0 \\ \mathbb{Z}_p & \mathbb{Z}_p}$ and $I = \pmatrix{\mathbb{Z} & 0 \\ 0 & \mathbb{Z}_p}$ is an $S$-ideal.

Having been trained to think in a commutative world, I found the existence of an example for any one of these to be surprising. The fact that they were all (basically) the same example is even more amazing.

-

As a counter-example for Fatou's lemma in measure theory: strict inequality can occure! Just take the measure space $\mathbb{N}$ with the counting measure and consider the functions \begin{equation} f_n(k) = \delta_{nk} \end{equation} Then the sum of $f_n$ is always $1$ while the pointwise limit of the $f_n$ will be the zero function having zero integral. If you have this counter-example then you do not need fancy measures and integrals at al to produce examples that in Fatou's lemma strict inequality may happen...

-

I occasionally use the following "counterexample" to unique factorization in Z in an introduction to math course: (1003)(1007)=(901)(1121). Once the students figure out what's going on, I think they learn something from it.

-

A standard result in introductory calculus classes is that, if a function has positive derivative on an open interval, then it's increasing there.

Based on this, students tend to think that, if $f'(a)>0$, then $f$ must be increasing "near $a$."

However, the example $f(x) = 2x^2\sin(1/x)+x$ (set $f(0)=0$) shows that this is quite false!

-

"Every finitely-branching tree with infinitely many nodes has an infinite branch" is constructively false, as witnessed by the following counterexample:

http://math.andrej.com/wp-content/uploads/2006/05/kleene-tree.pdf

Andrej Bauer's exposition (above) is especially nice; most textbooks take a far less direct route to the result, which makes it harder to see what's really going on past the level of "yeah, the proof is correct step-by-step."

-

Here is some simple counterexample in commutative algebra, which I found really cute when I first meet it:

Let $k$ be a field, $A = k[X_{1},X_{2},X_{3}\ldots],$ $I = (X_{1}, X_{2}^{2}, X_{3}^{3},\ldots)$ and $R = A/I.$ Then $\text{Spec}(R)$ consists of one point (because $\text{rad}(I)$ is maximal ideal of $A$); in particular $\text{Spec}(R)$ is a noetherian space, and $\dim R = 0$; although $R$ is not noetherian ring (since $\text{nil}(R)^{n}\neq 0$ for every $n$).

-

1
Nevertheless, I think that it's not obvious that there exist commutative rings with only one prime (not only with one maximal) ideal that are not noetherian. – ifk Apr 4 2010 at 21:35

2
@ifk: There are simpler examples of that: Consider the direct sum $R=k\oplus V$ of a field $k$ and an infinite dimensional vector space $V$, made into a ring so that $V$ is an ideal which squares to zero, $k$ and $V$ multiply as you expect, and $k$ is a subring (this is called a trivial extension, in some contexts) Then $R$ is commutative, has only one prime, and it is not noetherian. – Mariano Suárez-Alvarez Apr 5 2010 at 6:05
show 2 more comments

The 5-cycle $C_5$ is a great counterexample. It's the smallest imperfect graph, it's self-complementary, it has chromatic number $>\Delta$, it has no stable set meeting every maximum clique and yet satisfies $\omega = \frac{2}{3}(\Delta+1)$, it has chromatic number $> \frac 1 2 (\Delta+\omega+1)$, meaning that Reed's $\chi, \omega, \Delta$ conjecture is somehow tight.

And when you blow up each vertex into a clique or stable set of size $k$, the fun continues. For $k=3$ this gives you Catlin's counterexample to Hajos' Conjecture.

-

I'm shocked that noone has mentioned the Quaternion group! This thing is a counterexample to lots of basic questions you'd come up with while learning (finite) group theory.

For example (although not really a counterexample to a specific question), if you know the semidirect product construction and Sylow theorems and are trying to classify groups of low order, the quaternion group is the first group you can't construct as a semidirect product of cyclic groups. This can be an entry point for the extension problem for groups and cohomology of groups.

-

The elliptic curve 960d1 in Cremona's tables is the smallest conductor example of an optimal elliptic curve with nontrivial Shafarevich-Tate group which is isogenous to an elliptic curve with trivial Shafarevich-Tate group.

-

Any classical counter-example to inversion of a limit and an integral, $f_n:[0,1[\to\mathbb{R} ; x\mapsto n^2 x^n$ say. Basic, but important to motivate the dominated convergence theorem.

-

$\textbf{Algebra.}$

• The symmetric group $S_{3}$ is the first $\text{non-abelian}$ group and also this group has a fascinating property that $S_{3} \cong \mathscr{I}(S_{3})$ where $\mathscr{I}$ denotes the $\text{Inner - Automorphism}$ group.

• Example of a group which is $\textbf{isomorphic}$ to it's proper subgroup. $\mathsf{Answer:}$ Take $G=(\mathbb{Z},+)$ and take $H= 2\mathbb{Z}$. Then $G \cong H$.

• Example of a free module in which a linearly independent subset cannot be extended to a basis. $\textbf{Answer.}$ As a $\mathbb{Z}$ module $\mathbb{Z}$ is free with basis $\{1\}$ and $\{-1\}$. Now $\{2\}$ is linearly independent over $\mathbb{Z}$. Note that $2$ cannot generate $\mathbb{Z}$ over $\mathbb{Z}$. If at all there is a basis $\mathscr{B}$ containing $2$, $\mathscr{B}$ should have atleast one more element, say $b$. We then have $b\cdot 2 - 2\cdot b =0$, i.e $\{2,b\}$ is linearly dependent subset of $\mathscr{B}$ which is absurd.

$\textbf{Analysis.}$

• The function defined by $f(x) = x^{2} \cdot \sin\frac{1}{x}$ for $x \neq 0$ and $f(x) =0$ for $x=0$. This is example of a function whose derivatives are not continuous.

• Set that is not Lebesgue measurable. Example given by Vitali.

-

This is an easy one, but one I've found useful in the past to keep in mind, and which I've passed on to many younger students who are new to homological algebra. These students sometimes struggle with the idea of a non-free projective module because if you're new to modules and you still think of them via analogy to vector spaces then it's natural to think direct summands of free modules should be free.

A nice counter-example to keep in mind is the ring $\mathbb{Z}/6\mathbb{Z}$ and the projective but not free module $\mathbb{Z}/3\mathbb{Z}$ (projective because $\mathbb{Z}/6\mathbb{Z} \cong \mathbb{Z}/3\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}$)

-

A nice counterexample to the statement "$L^p$ convergence to $0$ implies pointwise a.e. convergence to $0$" is obtained by taking characteristic functions of length $\frac{1}{n}$ wrapping around the interval $[0,1]$. These integrate to $\frac{1}{n}$, but converge nowhere to $0$ because the harmonic series diverges.

A counterexample to the converse is easier: just take $f_n = n(n+1)\chi_{[\frac{1}{n+1},\frac{1}{n}]}$. These integrate to $1$ and converge everywhere to $0$.

-

1
$\chi_{[0,1/2]}, \chi_{[1/2,5/6]}, \chi_{[5/6,1] \cup [0,1/12]}, \chi_{[1/12,17/60]}...$. – Douglas Zare Jul 10 at 4:58
show 3 more comments

From an earlier post: "The 8-element quaternion group. It can't be reconstructed from its character table (D_4 has the same one), and every subgroup is normal but it's not abelian."

Although the character tables for the dihedral group D of order 8 and the quaternion group Q of order 8 may seem the same, they are not. Using Adams operations on the representation rings for D and Q, it is possible to show that these representation rings are different as rings with operations (either lambda or Adams operations). These Adams operations are defined in a paper by Aityah and Tall, where it is shown how to calculate them directly from character tables.

-

3
It can't be possible to define lambda operations directly from the character table; you need to know some of the multiplication table as well. – Qiaochu Yuan Jul 31 2011 at 18:07

Assume given three projective systems `$\{A_n,\alpha_{nm}\}_{n\in\mathbb{N}}$`, `$\{B_n,\beta_{nm}\}_{n\in\mathbb{N}}$` and `$\{C_n,\kappa_{nm}\}_{n\in\mathbb{N}}$` of abelian groups (modules over some ring would equally do), endowed with arrrows $$0\rightarrow A_n\xrightarrow{f_n}B_n\xrightarrow{g_n}C_n\rightarrow 0$$ making the above sequences exact for every $n$ and satisfying the commutativity conditions $\beta_{nm}\circ f_n=f_m\circ\alpha_{nm}$ and $\kappa_{nm}\circ f_n=f_m\circ\beta_{nm}$. Then one can form the projective limits of the system to find a sequence $$0\rightarrow \varprojlim A_n\xrightarrow{f}\varprojlim B_n \xrightarrow{g}\varprojlim C_n$$ and a classical result says that, in order for this sequence to be right-exact, one needs the system $A_n$ to be stationary - meaning that $\alpha_{nm}(A_n)=\alpha_{n'm}(A_{n'})\subseteq A_m$ for all $n,n'\gg m$.

A classical counterexample showing the necessity of this condition is to take `$A_n=p^n\mathbb{Z}$` with $\alpha_{nm}$ given by inclusions, $B_n=\mathbb{Z}$ for all $n$ with identity maps $\beta_{nm}=\mathrm{id}$, and $C_n=\mathbb{Z}/p^n\mathbb{Z}$ with the obvious maps. The system $A_n$ is non-stationary because the image of $A_n$ in $A_m$ is `$p^n\mathbb{Z}\subseteq p^m\mathbb{Z}$` which becomes smaller and smaller as $n\rightarrow \infty$: the corresponding sequence of projective limits is $$0\rightarrow 0\rightarrow \mathbb{Z}\rightarrow\mathbb{Z}_p$$ which is clearly not right exact.

[Later remark]: After typing all down, I remarked that everything can be found in Wikipedia at http://en.wikipedia.org/wiki/Inverse_limit Moreover, the stationary condition quoted above, usually referred to as Mittag-Leffler condition, is enough to prove right-exactness of $\varprojlim$ in Ab, but there is a counterexample due to Deligne and Neeman showing that in other categories this is not enough, see http://www.springerlink.com/content/aeem2yx884nnufxn/

-

Rotations $\rho_\alpha$ of the unit circle by an angle $2\pi\alpha$ are nice examples in the theory of discrete dynamical systems.

If $\alpha=m/n$ is rational, then every point on the circle is periodic of prime period $n$ for $\rho_\alpha$, but has no fixed points. This shows that Sharkowskii's theorem does not hold in general for functions continuous $f\colon X\to X$ if $X$ is not the real line or an interval of the real line.

If $\alpha$ is irrational, then the orbit under $\rho_\alpha$ of every point of the circle is dense, but $\rho_\alpha$ has nor sensitive dependence on initial conditions, and in particular is not caotic.

-

The Warsaw circle $W$ http://en.wikipedia.org/wiki/Continuum_%28topology%29 is a counterexample for quite a number of too naive statements.

Some observations: $W$ is weakly contractible (because a map from a locally path connected space cannot ''go over the bad point''). There is a projection map $g:W \to S^1$ onto the usual circle. The point-preimages of $g$ are either points or, for a single point on $S^1$, a closed interval.

Thus the assumptions of the Vietoris-Begle mapping theorem hold for $g$, proving that $g$ induces an isomorphism in Cech cohomology. Thus the Cech cohomology of $W$ is that of $S^1$, but it has the singular homology of a point, by Hurewicz. These observations imply:

1. A map with contractible point-inverses does not need to be a weak homotopy equivalence, even if both, source and target, are compact metric spaces. Assuming that the base and the preimages are finite CW complexes does not help.

2. The Vietoris-Begle Theorem is false for singular cohomology (in particular, the wikipedia version of that Theorem is not quite correct).

3. $W$ does not have the homotopy type of a CW complex (since it is not contractible).

4. Even though the map $g$ is trivial on fundamental groups, it does not lift to the universal cover $p: \mathbb{R} \to S^1$, because $g$ cannot be nullhomotopic. Thus the assumption of local path connectivity in the lifting theorem is necessary.

-

My favorite counter-example is given in the shore paper, "Almost Commuting Unitaries," by R. Exel and T. Loring.

Here is a little background. Two $n \times n$ matrices $A$ and $B$ are said to be "almost-commuting" if there commutator, $[A, B]$, is small in some matrix norm. In the paper, the authors exhibit a family of unitary matrices, $U_n$ and $V_n$ that "almost-commute" in the sense that given $\epsilon > 0$ there exists an $N \in \mathbb{N}$ with $|| [U_n, V_n] || < \epsilon$ for all $n \geq N$, yet for any commuting $n \times n$ matrices, $X, Y$ $(XY = YX)$ there exists an absolute constant $C > 0$ such that $\max(||X - U_n||, ||Y - V_n||) > C > 0$. This was one of the first counter-examples in a research paper that I understood because the authors method of proof is very elementary. The most technical fact used is that the winding number of a closed curve around the origin is a homotopy invariant.

-

In topology, The comb space is an example of a path connected space which is not locally path connected. see http://en.wikipedia.org/wiki/Comb_space.

-

the example which shows that exp(zw) is not equal to exp (exp(z),w)

another one a continuous function of a complex variable need not have primitive in a region.the example is f(z) = square ( | z| ).

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 191, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9277982115745544, "perplexity_flag": "head"}