Maths WorkshopMaths problems with full solutions
Exercise 419Logic, sets and proofs › Countability and cardinalityL1Added 3 Nov 2026

$\mathbb{Z}$ is countable

#integers#countability#bijection

Statement

Show that Z\mathbb{Z} is countably infinite.

Hint

Interleave nonnegative and negative integers.

Show solutionHide solution

Solution

Bijection. Define f:N→Zf:\mathbb{N}\to\mathbb{Z} by
f(n)={n/2if n even,−(n+1)/2if n odd.f(n)=\begin{cases}n/2&\text{if }n\text{ even},\\ -(n+1)/2&\text{if }n\text{ odd}.\end{cases}

Check. 0↦00\mapsto0, 1↦−11\mapsto-1, 2↦12\mapsto1, 3↦−23\mapsto-2, 4↦24\mapsto2, etc. Injective and surjective.

Conclusion. ∣Z∣=ℵ0|\mathbb{Z}|=\aleph_0.