1.4. CardinalityΒΆ

In this section, we deal with questions concerning the size of a set. When do we say that two sets have same number of elements?

If we can find a one-to-one correspondence between two sets A and B then we can say that the two sets A and B have same number of elements.

In other words, if there exists a bijective function f:A→B, we say that A and B have same number of elements.

Definition 1.74 (Equivalent sets)

Two sets A and B are said to be equivalent (denoted as A∼B) if there exists a bijective function f:Aβ†’B. When two sets are equivalent, we say that they have same cardinality.

Note that two sets may be equivalent yet not equal to each other.

Example 1.17 (Equivalent sets)

  • The set of natural numbers N is equivalent to the set of integers Z. Consider the function f:Nβ†’Z given by

    f(n)={(nβˆ’1)/2if n is odd;βˆ’n/2if n is even.

    It is easy to show that this function is bijective.

  • N is equivalent to the set of even natural numbers E. Consider the function f:Nβ†’E given by f(n)=2n. This is a bijective mapping.

  • N is equivalent to the set of rational numbers Q.

  • The sets {a,b,c} and {1,4,9} are equivalent but not equal.

Theorem 1.5 (Cardinality as equivalence relation)

Let A,B,C be sets. Then:

  1. A∼A.

  2. If A∼B, then B∼A.

  3. If A∼B, and B∼C, then A∼C.

Thus, it is an equivalence relation.

Proof. (1). Construct a function f:Aβ†’A given by f(a)=aβˆ€a∈A. This is bijective. Hence A∼A.

(2). It is given that A∼B. Thus, there exists a function f:Aβ†’B which is bijective. Thus, there exists an inverse function g:Bβ†’A which is bijective. Thus, B∼A.

(3). It is given that A∼B and B∼C. Thus, there exist two bijective functions f:Aβ†’B and g:Bβ†’C. Define a function h:Aβ†’C given by h=g∘f. Since composition of bijective functions is bijective , h is bijective. Thus, A∼C.

1.4.1. Cardinality and Natural NumbersΒΆ

We now look closely at the set of natural numbers N={1,2,3,…}.

Definition 1.75

Any subset of N of the form {1,…,n} is called a segment of N. n is called the number of elements in the segment or its cardinality.

Remark 1.15

Two segments {1,…,m} and {1,…,n} are equivalent only if m=n.

Thus, a proper subset of a segment cannot be equivalent to the segment.

Definition 1.76

A set that is equivalent to a segment is called a finite set.

The cardinality or number of elements of a set which is equivalent to a segment is equal to the number of elements in the segment.

Remark 1.16

The empty set βˆ… is also considered to be finite with zero elements.

Definition 1.77

A set that is not finite is called an infinite set.

It should be noted that so far we have defined number of elements only for sets which are equivalent to a segment.

Definition 1.78

A set A is called countable if it is equivalent to N, i.e., if there exists a bijective correspondence of N with the elements of A.

Definition 1.79

A countable set A is usually written as A={a1,a2,…} which indicates the one-to-one correspondence of A with the set of natural numbers N. This notation is also known as the enumeration of A.

Definition 1.80

An infinite set which is not countable is called an uncountable set.

With the definitions in place, we are now ready to study the connections between countable, uncountable and finite sets.

1.4.2. Well Ordering PrincipleΒΆ

We recall some properties of natural numbers which will be used later.

Property 1.3 (Well ordering principle)

Every nonempty subset of N has a least element.

Well ordering principle is equivalent to the principle of mathematical induction.

Theorem 1.6 (Principle of mathematical induction)

If a subset S of N satisfies the following properties:

  • 1∈S and

  • n∈S⟹n+1∈S,

then S=N.

The principle of mathematical induction is applied as follows. We consider a set Sβ‰œ{n∈N|n satisfies P} where P is some property that the members of this set satisfy. We then show that 1 satisfies the property P. Further, we show that if n satisfies property P, then n+1 also has to satisfy P. Then, applying the principle of mathematical induction, we claim that S=N i.e. every number n∈N satisfies the property P.

1.4.3. Infinite SetsΒΆ

Theorem 1.7

Every infinite set contains a countable subset.

Proof. Let A be an infinite set. Clearly, Aβ‰ βˆ…. Pick an element a1∈A. Consider the set A1β‰œAβˆ–{a1}. Since A is infinite, hence A1 is nonempty. Pick an element a2∈A1. Clearly, a2β‰ a1. Consider the set A2β‰œAβˆ–{a1,a2}. Again, by the same argument, since A is infinite, A2 is non-empty. We can pick a3∈A2. Proceeding in the same way we construct a set Bβ‰œ{a1,a2,a3,…}. The set is countable and by construction it is a subset of A.

Theorem 1.8

Every subset of a countable set is either finite or countable. i.e. if A is countable and BβŠ†A, then either B is finite or B∼A.

Proof. Let A be a countable set and BβŠ†A. If B is finite, then there is nothing to prove. So we consider B as infinite and show that it is countable. Since A is countable, hence A∼N. Thus, B is equivalent to a subset of N. Without loss of generality, let us assume that B is a subset of N. We now construct a mapping f:Nβ†’B as follows. Let b1 be the least element of B (which exists due to the well ordering principle). We assign f(1)=b1. Now, let b2 be the least element of Bβˆ–{b1}. We assign f(2)=b2. Similarly, assuming that f(1)=b1,f(2)=b2,…,f(n)=bn has been assigned, we assign f(n+1)= the least element of Bβˆ–{b1,…,bn}. This least element again exists due to the well ordering principle. This completes the definition of f using the principle of mathematical induction. It is easy to show that the function is bijective.
This proves that B∼N.

We present different characterizations of a countable set.

Theorem 1.9 (Characterizations of countable sets)

Let A be an infinite set. The following are equivalent:

  1. A is countable.

  2. There exists a (partial) function f:N→A that is onto.

  3. There exists a (total) function g:A→N that is one-one.

Proof. (1)⟹ (2). Since A is countable, there exists a function f:Nβ†’A which is bijective. Choosing B=N, we get the result.

(2)⟹ (3). We are given that there exists a (partial) function f:Nβ†’A that is onto. For some a∈A, consider fβˆ’1(a)={b∈N|f(b)=a}. Since f is onto, hence fβˆ’1(a) is nonempty. Since fβˆ’1(a) is a subset of natural numbers, it has a least element due to the well ordering principle. Further, if a1,a2∈A are distinct, then fβˆ’1(a1) and fβˆ’1(a2) are disjoint and the corresponding least elements are distinct. Assign g(a)= least element of fβˆ’1(a)βˆ€a∈A. Such a function is well defined by construction. Clearly, the function is one-one.

(3)⟹ (1). We are given that there exists a function g:Aβ†’N that is one-one. Clearly, A∼g(A) where g(A)βŠ†N. Since A is infinite, hence g(A) is also infinite. Due to Theorem 1.8, g(A) is countable since it is the subset of a countable set N. Then, g(A)∼N. Thus, A∼g(A)∼N and A is countable.

Theorem 1.10 (Countable union of countable sets)

Let {A1,A2,…} be a countable family of sets where each Ai is a countable set. Then

A=⋃i=1∞Ai

is countable.

Proof. Let An={a1n,a2n,…}βˆ€n∈N. Further, let B={2k3n:k,n∈N}. Note that every element of B is a natural number, hence BβŠ†N. Since B is infinite, hence by Theorem 1.8 B is countable, i.e. B∼N. We note that if b1=2k13n1 and b2=2k23n2, then b1=b2 if and only if k1=k2 and n1=n2. Now define a mapping f:Nβ†’A with domf=B, given by f(2k3n)=akn (picking k-th element from n-th set). Clearly, f is well-defined and onto. Thus, using Theorem 1.9, A is countable.

Theorem 1.11

Let {A1,A2,…,An} be a finite collection of sets such that each Ai is countable. Then their Cartesian product A=A1Γ—A2Γ—β‹―Γ—An is countable.

Proof. Let Ai={a1i,a2i,…}βˆ€1≀i≀n. Choose n distinct prime numbers p1,p2,…,pn. Consider the set B={p1k1p2k2…pnkn:k1,k2,…,kn∈N}. Clearly, BβŠ‚N. Define a function f:Aβ†’N as

f(ak11,ak22,…,aknn)=p1k1p2k2…pnkn.

By fundamental theorem of arithmetic, every natural number has a unique prime factorization. Thus, f is one-one. Invoking Theorem 1.9, A is countable.

Theorem 1.12 (Cardinality of rational numbers)

The set of rational numbers Q is countable.

Proof. Let pq be a positive rational number with p>0 and q>0 having no common factor. Consider a mapping f(pq)=2p3q. This is a one-one mapping into natural numbers. Hence invoking Theorem 1.9, the set of positive rational numbers is countable. Similarly, the set of negative rational numbers is countable. Invoking Theorem 1.10, Q is countable.

Theorem 1.13 (Cardinality of set of finite subsets)

The set of all finite subsets of N is countable.

Proof. Let F denote the set of finite subsets of N. Let f∈F. Then we can write f={n1,…,nk} where k is the number of elements in f. Consider the sequence of prime numbers {pn} where pn denotes n-th prime number. Now, define a mapping g:Fβ†’N as

g(f)=∏i=1kpni.

The mapping g is one-one, since the prime decomposition of a natural number is unique. Hence invoking Theorem 1.9, F is countable.

Corollary 1.2

The set of all finite subsets of a countable set is countable.

1.4.4. Partial Order for CardinalityΒΆ

Definition 1.81 (Equivalence with subset)

We say that Aβͺ―B whenever there exists a (total) one-one function f:Aβ†’B. In other words, A is equivalent to a subset of B.

In this sense, B has at least as many elements as A.

Theorem 1.14

The relation βͺ― satisfies following properties

  1. Reflexivity: Aβͺ―A for all sets A.

  2. Transitivity: If Aβͺ―B and Bβͺ―C, then Aβͺ―C.

  3. Antisymmetry: If Aβͺ―B and Bβͺ―A, then A∼B.

Thus, βͺ― is a partial order.

Proof. (1). We can use the identity function f(a)=aβˆ€a∈A.

(2). Straightforward application of Theorem 1.1 that composition of injective functions is injective.

(3). Straightforward application of SchrΓΆder-Bernstein Theorem.

1.4.5. Power SetsΒΆ

Theorem 1.15 (Cardinality of power set)

If A is a set, then Aβͺ―P⁑(A) and A≁P⁑(A).

This result establishes that the power set of a set is larger than itself.

Proof. We first show that Aβͺ―P⁑(A):

  1. If A=βˆ…, then P⁑(A)={βˆ…} and the result is trivial.

  2. So, lets consider non-empty A.

  3. We can choose f:Aβ†’P⁑(A) given by f(x)={x}βˆ€x∈A.

  4. This is clearly a one-one (total) function leading to Aβͺ―P⁑(A).

Next we show that A≁P⁑(A):

  1. For the sake of contradiction, lets us assume that A∼P⁑(A).

  2. Then, there exists a bijective function g:Aβ†’P⁑(A).

  3. Consider the set B={a∈A|aβˆ‰g(a)}.

  4. Since BβŠ†A, hence B∈P⁑(A).

  5. Since g is bijective, there exists a∈A such that g(a)=B.

  6. Now if a∈B then aβˆ‰g(a)=B.

  7. And if aβˆ‰B, then a∈g(a)=B.

  8. This is impossible, hence A≁P⁑(A).

1.4.6. Cardinal NumbersΒΆ

We now introduce a general definition for cardinality.

Definition 1.82 (Cardinal numbers)

For every set A a symbol (playing the role of a number) can be assigned that designates the number of elements in the set. This number is known as cardinal number of the set and is denoted by cardA or |A|. It is also known as cardinality.

Note that the cardinal numbers are different from natural numbers, real numbers etc.

  1. If A is finite, with A={a1,a2,…,an}, then cardA=n.

  2. We use the symbol β„΅0 to denote the cardinality of N.

  3. By saying A has the cardinality of β„΅0, we simply mean that A∼N.

  4. If a and b are two cardinal numbers, then by a≀b, we mean that there exist two sets A and B such that cardA=a, cardB=b and Aβͺ―B.

  5. By a<b, we mean that Aβͺ―B and A≁B.

  6. a≀b and b≀a guarantees that a=b.

Theorem 1.16 (Real numbers as power set of natural numbers)

P⁑(N)∼R.

Proof. We shall proceed as follows:

  1. Establish a (total) injective mapping Rβ†’P⁑(N).

  2. Establish a (total) injective mapping P⁑(N)β†’R.

  3. Claim that a bijective mapping between the two exists due to SchrΓΆder-Bernstein theorem.

Rβ†’P⁑(N)

  1. Define g:Rβ†’P⁑(Q) as

    g(r)={q∈Q|q<r}.
  2. Note that g is injective. If r1<r2 then there is a rational number q such that r1<q<r2. Thus, g(r1)β‰ g(r2).

  3. Since, Q∼N, hence there exists a bijection between P⁑(Q) and P⁑(N).

  4. Thus, there exists an injection from R to P⁑(N).

P⁑(N)β†’R

  1. Recall that 2N∼P⁑(N).

  2. Thus, each subset of N corresponds to a sequence x={xn} in 2N.

  3. Define a mapping h:2N→R as:

    h(x)=βˆ‘n=1∞xn3n
  4. h maps each sequence x to a unique number y∈[0,1].

  5. h is an injective mapping.

Definition 1.83 (Infinite cardinal number)

A cardinal number a satisfying β„΅0≀a is known as infinite cardinal number.

Definition 1.84 (Cardinality of the continuum)

The cardinality of R denoted by c is known as the cardinality of the continuum.

Theorem 1.17 (Power sets and binary functions)

Let 2={0,1}. Then 2X∼P⁑(X) for every set X.

We mention that the notation AB means the set of all functions of type f:B→A.

Proof. 2X is the set of all functions f:X→2. i.e. a function from X to {0,1} which can take only one the two values 0 and 1.

Define a mapping g:P⁑(X)β†’2X as follows. Let y∈P⁑(X). Then g(y) is a function f:Xβ†’{0,1} given by

f(x)={1if x∈y;0if xβˆ‰y.

The function g is bijective. Thus 2X∼P⁑(X).

Remark 1.17

We denote the cardinal number of P⁑(X) by 2cardX. Thus, c=2β„΅0.

Remark 1.18 (An ordering of cardinal numbers)

The following inequalities of cardinal numbers hold:

0<1<2<β‹―<nβ‹―<β„΅0<2β„΅0=c<2c<22c….