Cardinality
In mathematics, the cardinality of a set is a measure of the number of elements of the set. For example, the set [math]\displaystyle{ A = \{2, 4, 6\} }[/math] contains 3 elements, and therefore [math]\displaystyle{ A }[/math] has a cardinality of 3. Beginning in the late 19th century, this concept was generalized to infinite sets, which allows one to distinguish between different types of infinity, and to perform arithmetic on them. There are two approaches to cardinality: one which compares sets directly using bijections and injections, and another which uses cardinal numbers.^{[1]} The cardinality of a set is also called its size, when no confusion with other notions of size^{[2]} is possible.
The cardinality of a set [math]\displaystyle{ A }[/math] is usually denoted [math]\displaystyle{ A }[/math], with a vertical bar on each side;^{[3]} this is the same notation as absolute value, and the meaning depends on context. The cardinality of a set [math]\displaystyle{ A }[/math] may alternatively be denoted by [math]\displaystyle{ n(A) }[/math], [math]\displaystyle{ A }[/math], [math]\displaystyle{ \operatorname{card}(A) }[/math], or [math]\displaystyle{ \#A }[/math].
History
A crude sense of cardinality, an awareness that groups of things or events compare with other groups by containing more, fewer, or the same number of instances, is observed in a variety of presentday animal species, suggesting an origin millions of years ago.^{[4]} Human expression of cardinality is seen as early as 40000 years ago, with equating the size of a group with a group of recorded notches, or a representative collection of other things, such as sticks and shells.^{[5]} The abstraction of cardinality as a number is evident by 3000 BCE, in Sumerian mathematics and the manipulation of numbers without reference to a specific group of things or events.^{[6]}
From the 6th century BCE, the writings of Greek philosophers show the first hints of the cardinality of infinite sets. While they considered the notion of infinity as an endless series of actions, such as adding 1 to a number repeatedly, they did not consider the size of an infinite set of numbers to be a thing.^{[7]} The ancient Greek notion of infinity also considered the division of things into parts repeated without limit. In Euclid's Elements, commensurability was described as the ability to compare the length of two line segments, a and b, as a ratio, as long as there were a third segment, no matter how small, that could be laid endtoend a whole number of times into both a and b. But with the discovery of irrational numbers, it was seen that even the infinite set of all rational numbers was not enough to describe the length of every possible line segment.^{[8]} Still, there was no concept of infinite sets as something that had cardinality.
To better understand infinite sets, a notion of cardinality was formulated circa 1880 by Georg Cantor, the originator of set theory. He examined the process of equating two sets with bijection, a onetoone correspondence between the elements of two sets based on a unique relationship. In 1891, with the publication of Cantor's diagonal argument, he demonstrated that there are sets of numbers that cannot be placed in onetoone correspondence with the set of natural numbers, i.e. uncountable sets that contain more elements than there are in the infinite set of natural numbers.^{[9]}
Comparing sets
While the cardinality of a finite set is just the number of its elements, extending the notion to infinite sets usually starts with defining the notion of comparison of arbitrary sets (some of which are possibly infinite).
Definition 1: A = B
 Two sets A and B have the same cardinality if there exists a bijection (a.k.a., onetoone correspondence) from A to B,^{[10]} that is, a function from A to B that is both injective and surjective. Such sets are said to be equipotent, equipollent, or equinumerous. This relationship can also be denoted A ≈ B or A ~ B.
 For example, the set E = {0, 2, 4, 6, ...} of nonnegative even numbers has the same cardinality as the set N = {0, 1, 2, 3, ...} of natural numbers, since the function f(n) = 2n is a bijection from N to E (see picture).
 For finite sets A and B, if some bijection exists from A to B, then each injective or surjective function from A to B is a bijection. This is no longer true for infinite A and B. For example, the function g from N to E, defined by g(n) = 4n is injective, but not surjective, and h from N to E, defined by h(n) = n  (n mod 2) is surjective, but not injective. Neither g nor h can challenge E = N, which was established by the existence of f.
Definition 2: A ≤ B
 A has cardinality less than or equal to the cardinality of B, if there exists an injective function from A into B.
Definition 3: A < B
 A has cardinality strictly less than the cardinality of B, if there is an injective function, but no bijective function, from A to B.
 For example, the set N of all natural numbers has cardinality strictly less than its power set P(N), because g(n) = { n } is an injective function from N to P(N), and it can be shown that no function from N to P(N) can be bijective (see picture). By a similar argument, N has cardinality strictly less than the cardinality of the set R of all real numbers. For proofs, see Cantor's diagonal argument or Cantor's first uncountability proof.
If A ≤ B and B ≤ A, then A = B (a fact known as Schröder–Bernstein theorem). The axiom of choice is equivalent to the statement that A ≤ B or B ≤ A for every A, B.^{[11]}^{[12]}
Cardinal numbers
In the above section, "cardinality" of a set was defined functionally. In other words, it was not defined as a specific object itself. However, such an object can be defined as follows.
The relation of having the same cardinality is called equinumerosity, and this is an equivalence relation on the class of all sets. The equivalence class of a set A under this relation, then, consists of all those sets which have the same cardinality as A. There are two ways to define the "cardinality of a set":
 The cardinality of a set A is defined as its equivalence class under equinumerosity.
 A representative set is designated for each equivalence class. The most common choice is the initial ordinal in that class. This is usually taken as the definition of cardinal number in axiomatic set theory.
Assuming the axiom of choice, the cardinalities of the infinite sets are denoted
 [math]\displaystyle{ \aleph_0 \lt \aleph_1 \lt \aleph_2 \lt \ldots . }[/math]
For each ordinal [math]\displaystyle{ \alpha }[/math], [math]\displaystyle{ \aleph_{\alpha + 1} }[/math] is the least cardinal number greater than [math]\displaystyle{ \aleph_\alpha }[/math].
The cardinality of the natural numbers is denoted alephnull ([math]\displaystyle{ \aleph_0 }[/math]), while the cardinality of the real numbers is denoted by "[math]\displaystyle{ \mathfrak c }[/math]" (a lowercase fraktur script "c"), and is also referred to as the cardinality of the continuum. Cantor showed, using the diagonal argument, that [math]\displaystyle{ {\mathfrak c} \gt \aleph_0 }[/math]. We can show that [math]\displaystyle{ \mathfrak c = 2^{\aleph_0} }[/math], this also being the cardinality of the set of all subsets of the natural numbers.
The continuum hypothesis says that [math]\displaystyle{ \aleph_1 = 2^{\aleph_0} }[/math], i.e. [math]\displaystyle{ 2^{\aleph_0} }[/math] is the smallest cardinal number bigger than [math]\displaystyle{ \aleph_0 }[/math], i.e. there is no set whose cardinality is strictly between that of the integers and that of the real numbers. The continuum hypothesis is independent of ZFC, a standard axiomatization of set theory; that is, it is impossible to prove the continuum hypothesis or its negation from ZFC—provided that ZFC is consistent. For more detail, see § Cardinality of the continuum below.^{[13]}^{[14]}^{[15]}
Finite, countable and uncountable sets
If the axiom of choice holds, the law of trichotomy holds for cardinality. Thus we can make the following definitions:
 Any set X with cardinality less than that of the natural numbers, or  X  <  N , is said to be a finite set.
 Any set X that has the same cardinality as the set of the natural numbers, or  X  =  N  = [math]\displaystyle{ \aleph_0 }[/math], is said to be a countably infinite set.^{[10]}
 Any set X with cardinality greater than that of the natural numbers, or  X  >  N , for example  R  = [math]\displaystyle{ \mathfrak c }[/math] >  N , is said to be uncountable.
Infinite sets
Our intuition gained from finite sets breaks down when dealing with infinite sets. In the late nineteenth century Georg Cantor, Gottlob Frege, Richard Dedekind and others rejected the view that the whole cannot be the same size as the part.^{[16]} One example of this is Hilbert's paradox of the Grand Hotel. Indeed, Dedekind defined an infinite set as one that can be placed into a onetoone correspondence with a strict subset (that is, having the same size in Cantor's sense); this notion of infinity is called Dedekind infinite. Cantor introduced the cardinal numbers, and showed—according to his bijectionbased definition of size—that some infinite sets are greater than others. The smallest infinite cardinality is that of the natural numbers ([math]\displaystyle{ \aleph_0 }[/math]).
Cardinality of the continuum
One of Cantor's most important results was that the cardinality of the continuum ([math]\displaystyle{ \mathfrak{c} }[/math]) is greater than that of the natural numbers ([math]\displaystyle{ \aleph_0 }[/math]); that is, there are more real numbers R than natural numbers N. Namely, Cantor showed that [math]\displaystyle{ \mathfrak{c} = 2^{\aleph_0} = \beth_1 }[/math] (see Beth one) satisfies:
 [math]\displaystyle{ 2^{\aleph_0} \gt \aleph_0 }[/math]
 (see Cantor's diagonal argument or Cantor's first uncountability proof).
The continuum hypothesis states that there is no cardinal number between the cardinality of the reals and the cardinality of the natural numbers, that is,
 [math]\displaystyle{ 2^{\aleph_0} = \aleph_1 }[/math]
However, this hypothesis can neither be proved nor disproved within the widely accepted ZFC axiomatic set theory, if ZFC is consistent.
Cardinal arithmetic can be used to show not only that the number of points in a real number line is equal to the number of points in any segment of that line, but that this is equal to the number of points on a plane and, indeed, in any finitedimensional space. These results are highly counterintuitive, because they imply that there exist proper subsets and proper supersets of an infinite set S that have the same size as S, although S contains elements that do not belong to its subsets, and the supersets of S contain elements that are not included in it.
The first of these results is apparent by considering, for instance, the tangent function, which provides a onetoone correspondence between the interval (−½π, ½π) and R (see also Hilbert's paradox of the Grand Hotel).
The second result was first demonstrated by Cantor in 1878, but it became more apparent in 1890, when Giuseppe Peano introduced the spacefilling curves, curved lines that twist and turn enough to fill the whole of any square, or cube, or hypercube, or finitedimensional space. These curves are not a direct proof that a line has the same number of points as a finitedimensional space, but they can be used to obtain such a proof.
Cantor also showed that sets with cardinality strictly greater than [math]\displaystyle{ \mathfrak c }[/math] exist (see his generalized diagonal argument and theorem). They include, for instance:
 the set of all subsets of R, i.e., the power set of R, written P(R) or 2^{R}
 the set R^{R} of all functions from R to R
Both have cardinality
 [math]\displaystyle{ 2^\mathfrak {c} = \beth_2 \gt \mathfrak c }[/math]
 (see Beth two).
The cardinal equalities [math]\displaystyle{ \mathfrak{c}^2 = \mathfrak{c}, }[/math] [math]\displaystyle{ \mathfrak c^{\aleph_0} = \mathfrak c, }[/math] and [math]\displaystyle{ \mathfrak c ^{\mathfrak c} = 2^{\mathfrak c} }[/math] can be demonstrated using cardinal arithmetic:
 [math]\displaystyle{ \mathfrak{c}^2 = \left(2^{\aleph_0}\right)^2 = 2^{2\times{\aleph_0}} = 2^{\aleph_0} = \mathfrak{c}, }[/math]
 [math]\displaystyle{ \mathfrak c^{\aleph_0} = \left(2^{\aleph_0}\right)^{\aleph_0} = 2^{{\aleph_0}\times{\aleph_0}} = 2^{\aleph_0} = \mathfrak{c}, }[/math]
 [math]\displaystyle{ \mathfrak c ^{\mathfrak c} = \left(2^{\aleph_0}\right)^{\mathfrak c} = 2^{\mathfrak c\times\aleph_0} = 2^{\mathfrak c}. }[/math]
Examples and properties
 If X = {a, b, c} and Y = {apples, oranges, peaches}, where a, b, and c are distinct, then  X  =  Y  because { (a, apples), (b, oranges), (c, peaches)} is a bijection between the sets X and Y. The cardinality of each of X and Y is 3.
 If  X  ≤  Y , then there exists Z such that  X  =  Z  and Z ⊆ Y.
 If  X  ≤  Y  and  Y  ≤  X , then  X  =  Y . This holds even for infinite cardinals, and is known as Cantor–Bernstein–Schroeder theorem.
 Sets with cardinality of the continuum include the set of all real numbers, the set of all irrational numbers and the interval [math]\displaystyle{ [0, 1] }[/math].
Union and intersection
If A and B are disjoint sets, then
 [math]\displaystyle{ \left\vert A \cup B \right\vert = \left\vert A \right\vert + \left\vert B \right\vert. }[/math]
From this, one can show that in general, the cardinalities of unions and intersections are related by the following equation:^{[17]}
 [math]\displaystyle{ \left\vert C \cup D \right\vert + \left\vert C \cap D \right\vert = \left\vert C \right\vert + \left\vert D \right\vert. }[/math]
See also
Wikidata has the properties:

 Aleph number
 Beth number
 Cantor's paradox
 Cantor's theorem
 Countable set
 Counting
 Ordinality
 Pigeonhole principle
References
 ↑ Weisstein, Eric W.. "Cardinal Number". http://mathworld.wolfram.com/CardinalNumber.html.
 ↑ Such as length and area in geometry. – A line of finite length is a set of points that has infinite cardinality.
 ↑ "Cardinality  Brilliant Math & Science Wiki" (in enus). https://brilliant.org/wiki/cardinality/.
 ↑ Cepelewicz, Jordana Animals Count and Use Zero. How Far Does Their Number Sense Go?, Quanta, August 9, 2021
 ↑ "Early Human Counting Tools". https://mathtimeline.weebly.com/earlyhumancountingtools.html.
 ↑ Duncan J. Melville (2003). Third Millennium Chronology , Third Millennium Mathematics. St. Lawrence University.
 ↑ Allen, Donald (2003). "The History of Infinity". https://www.math.tamu.edu/~dallen/masters/infinity/infinity.pdf.
 ↑ Kurt Von Fritz (1945). "The Discovery of Incommensurability by Hippasus of Metapontum". The Annals of Mathematics.
 ↑ Georg Cantor (1891). "Ueber eine elementare Frage der Mannigfaltigkeitslehre". Jahresbericht der Deutschen MathematikerVereinigung 1: 75–78. http://gdz.sub.unigoettingen.de/pdfcache/PPN37721857X_0001/PPN37721857X_0001___LOG_0029.pdf.
 ↑ ^{10.0} ^{10.1} "Infinite Sets and Cardinality" (in en). 20191205. https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Supplemental_Modules_for_Discrete_Math/Additional_Discrete_Topics_(Dean)/Infinite_Sets_and_Cardinality.
 ↑ Friedrich M. Hartogs (1915), Felix Klein; Walther von Dyck; David Hilbert et al., eds., "Über das Problem der Wohlordnung", Mathematische Annalen (Leipzig: B. G. Teubner) 76 (4): 438–443, doi:10.1007/bf01458215, ISSN 00255831, http://gdz.sub.unigoettingen.de/index.php?id=11&PPN=PPN235181684_0076&DMDID=DMDLOG_0037&L=1
 ↑ Felix Hausdorff (2002), Egbert Brieskorn; Srishti D. Chatterji, eds., Grundzüge der Mengenlehre (1. ed.), Berlin/Heidelberg: Springer, pp. 587, ISBN 3540422242, https://books.google.com/books?id=3nth_p6DpcC  Original edition (1914)
 ↑ Cohen, Paul J. (December 15, 1963). "The Independence of the Continuum Hypothesis". Proceedings of the National Academy of Sciences of the United States of America 50 (6): 1143–1148. doi:10.1073/pnas.50.6.1143. PMID 16578557. Bibcode: 1963PNAS...50.1143C.
 ↑ Cohen, Paul J. (January 15, 1964). "The Independence of the Continuum Hypothesis, II". Proceedings of the National Academy of Sciences of the United States of America 51 (1): 105–110. doi:10.1073/pnas.51.1.105. PMID 16591132. Bibcode: 1964PNAS...51..105C.
 ↑ Penrose, R (2005), The Road to Reality: A Complete guide to the Laws of the Universe, Vintage Books, ISBN 0099440687
 ↑ Georg Cantor (1887), "Mitteilungen zur Lehre vom Transfiniten", Zeitschrift für Philosophie und philosophische Kritik 91: 81–125
Reprinted in: Georg Cantor (1932), Adolf Fraenkel (Lebenslauf); Ernst Zermelo, eds., Gesammelte Abhandlungen mathematischen und philosophischen Inhalts, Berlin: Springer, pp. 378–439, http://gdz.sub.unigoettingen.de/dms/load/img/?PPN=PPN237853094&DMDID=DMDLOG_0060 Here: p.413 bottom  ↑ Applied Abstract Algebra, K.H. Kim, F.W. Roush, Ellis Horwood Series, 1983, ISBN:0853126127 (student edition), ISBN:0853125635 (library edition)
Original source: https://en.wikipedia.org/wiki/Cardinality.
Read more 