Tutorials › Topology (Undergraduate) › Countability Criteria Using Injections

Countability and Cardinality · Tutorial 22 of 799

Countability Criteria Using Injections

Learn to turn an injection into a repetition-free enumeration and to distinguish finite countability from countable infinitude.

Intermediate 9 min read

What You'll Learn

  • Use the convention that countable sets are finite or countably infinite.
  • Prove both directions of the injection criterion, including the empty and finite cases.
  • Extract an enumeration from an injection by ordering its image in the natural numbers.
  • Explain why the resulting enumeration has no repetitions and includes every element.
  • Recognize and correct the mistake of reversing the direction of an injection.

Countability and Injections into \(\mathbb{N}\)

Countability is often introduced by listing the elements of a set. An injection into the natural numbers gives a different way to describe the same size restriction: it assigns distinct natural-number labels to distinct elements. To get a listing from those labels, order the labels and recover the corresponding elements. We will prove that this works for every infinite countable set, while keeping track of the finite case as well.

Throughout, \(\mathbb{N}=\{1,2,3,\dots\}\). A function \(f:S\to\mathbb{N}\) is an injection if \(f(s)=f(t)\) implies \(s=t\). We use the convention that a set is countable if it is finite or countably infinite; it is countably infinite if there is a bijection from \(\mathbb{N}\) to it. An enumeration without repetitions of an infinite set \(S\) is a bijection \(e:\mathbb{N}\to S\).

Theorem: A set \(S\) is countable if and only if there is an injection \(f:S\to\mathbb{N}\). Moreover, if \(S\) is infinite and such an injection exists, then \(S\) has an enumeration without repetitions.

The key step is to show that an infinite subset of \(\mathbb{N}\) can itself be listed in increasing order. This gives a systematic way to arrange the labels assigned by an injection.

Ordering an Infinite Set of Labels

Lemma: If \(M\subseteq\mathbb{N}\) is infinite, there is a strictly increasing sequence \((m_k)\) whose set of terms is exactly \(M\).

Proof. Define \(m_1\) to be the least element of \(M\). After \(m_1,\dots,m_k\) have been defined, let \(m_{k+1}\) be the least element of \(M\setminus\{m_1,\dots,m_k\}\). This set is nonempty: if removing finitely many elements from the infinite set \(M\) left nothing, then \(M\) would be finite. Its least element exists by the well-ordering principle for \(\mathbb{N}\). At each step the chosen element is larger than the previous ones, so the sequence is strictly increasing.

It remains to show that every \(m\in M\) occurs. Suppose, to the contrary, that some \(m\in M\) never occurs. At every step, \(m\) remains among the available elements, so the least available element satisfies \(m_k\le m\). The terms \(m_k\) are distinct, which would give infinitely many distinct elements of the finite set \(\{1,2,\dots,m\}\). This is impossible. Thus every element of \(M\) occurs, and the sequence lists \(M\) without repetitions. \(\square\)

The least-element rule matters: it fixes a definite next label at every stage. No arbitrary choices of elements are needed. The proof that nothing is missed uses the fact that only finitely many natural numbers are at most any fixed \(m\).

Proof of the Injection Criterion

Proof of the theorem. First suppose \(S\) is countable. If \(S\) is empty, the empty function from \(S\) to \(\mathbb{N}\) is an injection. If \(S\) is finite and has \(n\ge1\) elements, a bijection from \(S\) to \(\{1,\dots,n\}\) is also an injection into \(\mathbb{N}\). If \(S\) is countably infinite, a bijection from \(S\) to \(\mathbb{N}\) is, in particular, an injection.

Conversely, suppose \(f:S\to\mathbb{N}\) is injective, and let \(M=f(S)\subseteq\mathbb{N}\). If \(M\) is finite, then \(S\) is finite: every element of \(M\) has exactly one preimage in \(S\), by the definition of \(M\) and injectivity. Thus the correspondence \(s\mapsto f(s)\) pairs the elements of \(S\) with the elements of \(M\).

If \(M\) is infinite, apply the lemma to obtain a strictly increasing sequence \((m_k)\) listing all of \(M\). For each \(k\), there is exactly one \(s_k\in S\) such that \(f(s_k)=m_k\): existence follows from \(m_k\in f(S)\), and uniqueness follows from injectivity. Define \(e(k)=s_k\). If \(e(k)=e(j)\), applying \(f\) gives \(m_k=m_j\); since the \(m_k\) are distinct, \(k=j\). Thus \(e\) is injective. Every \(s\in S\) is included because \(f(s)\in M\), so \(f(s)=m_k\) for some \(k\), and uniqueness of the preimage gives \(s=e(k)\). Hence \(e:\mathbb{N}\to S\) is a bijection. This proves that \(S\) is countable and, when \(S\) is infinite, supplies an enumeration without repetitions. \(\square\)

This proof also explains the direction of the construction. The injection assigns a natural-number label to each element. The labels that are actually used form \(M\). Listing \(M\) in increasing order and taking the unique element with each label turns the injection into an enumeration.

Worked Applications

Worked Example: A Finite Set

Let \(S=\{a,b,c,d\}\). Define \(f:S\to\mathbb{N}\) by \(f(a)=1\), \(f(b)=2\), \(f(c)=3\), and \(f(d)=4\). The four assigned labels are distinct, so \(f\) is injective. The image is \(M=\{1,2,3,4\}\), and the finite case of the criterion says that \(S\) is countable.

Check: the labels \(1,2,3,4\) each have exactly one preimage, respectively \(a,b,c,d\). Reading them back recovers the original set, with no element omitted or repeated. Since \(S\) has four elements, it is finite, not countably infinite.

Worked Example: A Sparse Infinite Subset of \(\mathbb{N}\)

Let \(M=\{k(k+1)/2:k\in\mathbb{N}\}\), a subset of \(\mathbb{N}\). The first values of the formula are \(1(2)/2=1\), \(2(3)/2=3\), \(3(4)/2=6\), and \(4(5)/2=10\), so the initial terms are \(1,3,6,10\). For each \(k\), the next value minus the current value is \[ \frac{(k+1)(k+2)}{2}-\frac{k(k+1)}{2} =\frac{(k+1)((k+2)-k)}{2} =k+1>0. \] Thus these values increase strictly. The set \(M\) is infinite, and the sequence \(m_k=k(k+1)/2\) lists it without repetitions by its definition.

The inclusion map \(f:M\to\mathbb{N}\), \(f(m)=m\), is injective. Its image is \(M\), and ordering that image gives exactly the sequence just computed. The first four terms check directly: \(1,3,6,10\) are distinct members of \(M\), and each is obtained by substituting \(k=1,2,3,4\), respectively. Hence \(M\) is countably infinite.

Worked Example: Recovering an Enumeration from Labels

Let \(S=\{0\}\cup\{1/n:n\in\mathbb{N}\}\), a subset of \(\mathbb{R}\) with its standard topology. Define \(f:S\to\mathbb{N}\) by \(f(0)=1\) and \(f(1/n)=n+1\). These formulas do not assign two different labels to the same element: \(0\) is not \(1/n\) for any positive \(n\). Also, if \(1/n=1/j\) for \(n,j\in\mathbb{N}\), multiplying by the positive integer \(nj\) gives \(j=n\). Therefore the labels \(1\) and \(n+1\) are all distinct, so \(f\) is injective.

The image is all of \(\mathbb{N}\): the label \(1\) comes from \(0\), and each integer \(r\ge2\) has the form \(r=n+1\) for \(n=r-1\in\mathbb{N}\), so it comes from \(1/(r-1)\). Ordering the labels as \(1,2,3,4,\dots\) and taking their unique preimages gives \[ 0,\quad \frac{1}{1},\quad \frac{1}{2},\quad \frac{1}{3},\quad \dots. \] The first four labels correspond to \(0,1,1/2,1/3\), respectively. The terms are distinct: \(0\) differs from every positive reciprocal, and equality of two positive reciprocals forces their denominators to be equal. Every element of \(S\) occurs by the definition of \(S\). This is an enumeration without repetitions, so \(S\) is countably infinite.

A Common Direction Error

Common pitfall. An injection \(f:S\to\mathbb{N}\) does not take natural numbers as inputs. For example, if \(S=\{x,y,z\}\) and \(f(x)=2\), \(f(y)=5\), \(f(z)=8\), the expression \(f(1)\) is undefined because \(1\) is not an element of the domain \(S\). So one cannot obtain an enumeration by writing \(f(1),f(2),\dots\).

The correction is to use the inverse correspondence on the image \(M=\{2,5,8\}\): the label \(2\) corresponds to \(x\), \(5\) to \(y\), and \(8\) to \(z\). In an infinite case, the lemma orders the image labels, after which the unique element carrying each label is read off. An injection into \(\mathbb{N}\) is therefore enough to produce a listing, but only after the direction of the correspondence is handled correctly.

The criterion is useful because it lets us prove countability by assigning distinct natural-number labels, even when a set is not already presented as a list. The proof supplies more than a size comparison: for an infinite set, it explains precisely how to turn those labels into a repetition-free enumeration. For a finite set, by contrast, an injection still certifies countability, but there is no bijection from \(\mathbb{N}\) to that set.

Check Your Understanding

For each question, keep the domain and codomain of the function explicit.

  1. Why is the empty function from \(\varnothing\) to \(\mathbb{N}\) an injection?
  2. If \(f:S\to\mathbb{N}\) is injective and \(f(S)\) has exactly three elements, what can you conclude about \(S\)?
  3. In the lemma, why must the least element still available at each stage exist?
  4. Explain why the increasing sequence in the lemma cannot omit an element \(m\in M\).
  5. For the set \(S=\{0\}\cup\{1/n:n\in\mathbb{N}\}\), write the unique element whose label is \(7\).