Set (mathematics)#Basic operations

{{about|sets themselves|the branches of mathematics studying sets|Naive set theory|and|Set theory}}

{{Short description|Collection of mathematical objects}}

File:Example of a set.svg]]

File:Example of a set rearranged.svg

In mathematics, a set is a collection of different things; these things are called elements or members of the set and are typically mathematical objects of any kind: numbers, symbols, points in space, lines, other geometric shapes, variables, or even other sets. A set may be finite or infinite, depending whether the number of its elements is finite or not. There is a unique set with no elements, called the empty set; a set with a single element is a singleton.

Sets are ubiquitous in modern mathematics. Indeed, set theory, more specifically Zermelo–Fraenkel set theory, has been the standard way to provide rigorous foundations for all branches of mathematics since the first half of the 20th century.

Context

Before the end of the 19th century, sets were not studied specifically, and were not clearly distinguished from sequences. Most mathematicians considered infinity as potential{{Mdash}}meaning that it is the result of an endless process{{mdash}}and were reluctant to consider infinite sets, that is sets whose number of members is not a natural number. Specifically, a line was not considered as the set of its points, but as a locus where points may be located.

The mathematical study of infinite sets began with Georg Cantor (1845–1918). This provided some counterintuitive facts and paradoxes. For example, the number line has an infinite number of elements that is strictly larger than the infinite number of natural numbers, and any line segment has the same number of elements as the whole space. Also, Russell's paradox implies that the phrase "the set of all sets" is self-contradictory.

Together with other counterintuitive results, this led to the foundational crisis of mathematics, which was eventually resolved with the general adoption of Zermelo–Fraenkel set theory as a robust foundation of set theory and all mathematics.

Meanwhile, sets started to be widely used in all mathematics. In particular, algebraic structures and mathematical spaces are typically defined in terms of sets. Also, many older mathematical results are restated in terms of sets. For example, Euclid's theorem is often stated as "the set of the prime numbers is infinite". This wide use of sets in mathematics was prophesied by David Hilbert when saying: "No one will drive us from the paradise which Cantor created for us."{{Citation

| last = Hilbert

| first = David

| title = Über das Unendliche

| year = 1926

| author-link = David Hilbert

| periodical = Mathematische Annalen

| volume = 95

| pages = 161–190

|doi=10.1007/BF01206605|jfm=51.0044.02| s2cid = 121888793

}}

: "Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können."

: Translated in {{Citation| title = On the infinite

| first = Jean

| last = Van Heijenoort

| author-link = Jean Van Heijenoort

| publisher = Harvard University Press

}}

Generally, the common usage of sets in mathematics does not require the full power of Zermelo–Fraenkel set theory. In mathematical practice, sets can be manipulated independently of the logical framework of this theory.

The object of this article is to summarize the manipulation rules and properties of sets that are commonly used in mathematics, without reference to any logical framework. For the branch of mathematics that studies sets, see Set theory; for an informal presentation of the corresponding logical framework, see Naive set theory; for a more formal presentation, see Axiomatic set theory and Zermelo–Fraenkel set theory.

==Basic notions==

In mathematics, a set is a collection of different things.{{cite book |quote=By an 'aggregate' (Menge) we are to understand any collection into a whole (Zusammenfassung zu einem Ganzen) M of definite and separate objects m of our intuition or our thought.|last1=Cantor |first1=Georg |last2=Jourdain |first2=((Philip E.B. (Translator))) |date=1915 |title=Contributions to the founding of the theory of transfinite numbers |publisher=New York Dover Publications (1954 English translation) }} Here: p.85{{cite book|author1=P. K. Jain|author2=Khalil Ahmad|author3=Om P. Ahuja|title=Functional Analysis|url=https://books.google.com/books?id=yZ68h97pnAkC&pg=PA1|year=1995|publisher=New Age International|isbn=978-81-224-0801-0|page=1}}{{cite book|author=Samuel Goldberg|title=Probability: An Introduction|url=https://books.google.com/books?id=CmzFx9rB_FcC&pg=PA2|date=1 January 1986|publisher=Courier Corporation|isbn=978-0-486-65252-8|page=2}}{{cite book|author1=Thomas H. Cormen|author2=Charles E Leiserson|author3=Ronald L Rivest|author4=Clifford Stein|title=Introduction To Algorithms|url=https://books.google.com/books?id=NLngYyWFl_YC&pg=PA1070|year=2001|publisher=MIT Press|isbn=978-0-262-03293-3|page=1070}} These things are called elements or members of the set and are typically mathematical objects of any kind such as numbers, symbols, points in space, lines, other geometrical shapes, variables, functions, or even other sets.{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/n11/mode/2up 1]}}{{Cite book |last=Maddocks |first=J. R. |title=The Gale Encyclopedia of Science |publisher=Gale |year=2004 |isbn=0-7876-7559-8 |editor-last=Lerner |editor-first=K. Lee |pages=3587–3589 |language=en |editor-last2=Lerner |editor-first2=Brenda Wilmoth}} A set may also be called a collection or family, especially when its elements are themselves sets; this may avoid the confusion between the set and its members, and may make reading easier. A set may be specified either by listing its elements or by a property that characterizes its elements, such as for the set of the prime numbers or the set of all students in a given class.{{Cite book |last=Devlin |first=Keith J. |title=Sets, Functions and Logic: Basic concepts of university mathematics |publisher=Springer |year=1981 |isbn=978-0-412-22660-1 |pages= |language=en |chapter=Sets and functions}}{{Cite web |title=Set - Encyclopedia of Mathematics |url=https://encyclopediaofmath.org/wiki/Set |access-date=2025-02-06 |website=encyclopediaofmath.org}}{{Cite web |last=Publishers |first=HarperCollins |title=The American Heritage Dictionary entry: set |url=https://www.ahdictionary.com/word/search.html?q=set |access-date=2025-02-06 |website=www.ahdictionary.com}}

If {{tmath|x}} is an element of a set {{tmath|S}}, one says that {{tmath|x}} belongs to {{tmath|S}} or is in {{tmath|S}}, and this is written as {{tmath|x\in S}}.{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/2/mode/2up 2]}} The statement "{{tmath|y}} is not in {{tmath|S\,}}" is written as {{tmath|y\not\in S}}, which can also be read as "y is not in B".{{cite book|author1=Marek Capinski|author2=Peter E. Kopp|title=Measure, Integral and Probability|url=https://books.google.com/books?id=jdnGYuh58YUC&pg=PA2|year=2004|publisher=Springer Science & Business Media|isbn=978-1-85233-781-0|page=2}}{{Cite web|title=Set Symbols|url=https://www.mathsisfun.com/sets/symbols.html|access-date=2020-08-19|website=www.mathsisfun.com}} For example, if {{tmath|\Z}} is the set of the integers, one has {{tmath|-3\in\Z}} and {{tmath|1.5 \not\in \Z}}. Each set is uniquely characterized by its elements. In particular, two sets that have precisely the same elements are equal (they are the same set).{{Cite book |last=Stoll |first=Robert |title=Sets, Logic and Axiomatic Theories |year=1974 |publisher=W. H. Freeman and Company |pages= [https://archive.org/details/setslogicaxiomat0000stol/page/5 5] |isbn=9780716704577 |url= https://archive.org/details/setslogicaxiomat0000stol |url-access=registration}} This property, called extensionality, can be written in formula as

A=B \iff \forall x\; (x\in A \iff x \in B).This implies that there is only one set with no element, the empty set (or null set) that is denoted {{tmath|\varnothing, \empty}},{{efn|Some typographical variants are occasionally used, such as {{math|ϕ}},{{cite book |last=Aggarwal |first=M.L. |title=Understanding ISC Mathematics Class XI |publisher=Arya Publications (Avichal Publishing Company) |year=2021 |volume=1 |page=A=3 |chapter=1. Sets}} or {{mvar|ϕ}}.{{cite book |last=Sourendra Nath |first=De |title=Chhaya Ganit (Ekadash Shreni) |date=January 2015 |publisher=Scholar Books Pvt. Ltd. |page=5 |chapter=Unit-1 Sets and Functions: 1. Set Theory}}}} or {{tmath|\{\,\}.}}{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/8/mode/2up 8]}}{{cite book |author1=K.T. Leung |url=https://books.google.com/books?id=cdmy2eOhJdkC&pg=PA27 |title=Elementary Set Theory, Part I/II |author2=Doris Lai-chue Chen |date=1 July 1992 |publisher=Hong Kong University Press |isbn=978-962-209-026-2 |page=27}} A singleton is a set with exactly one element.{{efn|The term unit set is also occasionally used.{{Cite book |last=Stoll |first=Robert |title=Sets, Logic and Axiomatic Theories |year=1974 |publisher=W. H. Freeman and Company |pages= [https://archive.org/details/setslogicaxiomat0000stol/page/5 5] |isbn=9780716704577 |url= https://archive.org/details/setslogicaxiomat0000stol |url-access=registration}}}} If {{tmath|x}} is this element, the singleton is denoted {{tmath|\{x\}.}} If {{tmath|x}} is itself a set, it must not be confused with {{tmath|\{x\}.}} For example, {{tmath|\empty}} is a set with no elements, while {{tmath|\{\empty\} }} is a singleton with {{tmath|\empty}} as its unique element.

A set is finite if there exists a natural number {{tmath|n}} such that the {{tmath|n}} first natural numbers can be put in one to one correspondence with the elements of the set. In this case, one says that {{tmath|n}} is the number of elements of the set. A set is infinite if such an {{tmath|n}} does not exist. The empty set is a finite set with {{tmath|0}} elements.

File:number-systems.svg

The natural numbers form an infinite set, commonly denoted {{tmath|\N}}. Other examples of infinite sets include number sets that contain the natural numbers, real vector spaces, curves and most sorts of spaces.

Specifying a set

Extensionality implies that for specifying a set, one has either to list its elements or to provide a property that uniquely characterizes the set elements.

=Roster notation=

Roster or enumeration notation is a notation introduced by Ernst Zermelo in 1908 that specifies a set by listing its elements between braces, separated by commas.A. Kanamori, "[https://math.bu.edu/people/aki/8.pdf The Empty Set, the Singleton, and the Ordered Pair]", p.278. Bulletin of Symbolic Logic vol. 9, no. 3, (2003). Accessed 21 August 2023.{{cite book|author=Charles Roberts|title=Introduction to Mathematical Proofs: A Transition|url=https://books.google.com/books?id=NjBLnLyE4jAC&pg=PA45|date=24 June 2009|publisher=CRC Press|isbn=978-1-4200-6956-3|page=45}}{{cite book|first=David |last=Johnson|first2=David B. |last2=Johnson|first3=Thomas A. |last3=Mowry|title=Finite Mathematics: Practical Applications |edition=Docutech|url=https://books.google.com/books?id=ZQAqzxLFXhoC&pg=PA220|date=June 2004|publisher=W. H. Freeman|isbn=978-0-7167-6297-3|page=220}}{{cite book|first=Ignacio |last=Bello|first2=Anton |last2=Kaul|first3=Jack R. |last3=Britton|title=Topics in Contemporary Mathematics|url=https://books.google.com/books?id=d8Se_8DWTQ4C&pg=PA47|date=29 January 2013|publisher=Cengage |isbn=978-1-133-10742-2|page=47}}{{cite book|first=Susanna S. |last=Epp|title=Discrete Mathematics with Applications|url=https://books.google.com/books?id=PPc_2qUhXrAC&pg=PA13|date=4 August 2010|publisher=Cengage |isbn=978-0-495-39132-6|page=13}} For example, one knows that

\{4, 2, 1, 3\}

and

\{\text{blue, white, red}\}

denote sets and not tuples because of the enclosing braces.

Above notations {{tmath|\{\,\} }} and {{tmath|\{x\} }} for the empty set and for a singleton are examples of roster notation.

When specifying sets, it only matters whether each distinct element is in the set or not; this means a set does not change if elements are repeated or arranged in a different order. For example,{{cite book|first=Stephen B. |last=Maurer|first2=Anthony |last2=Ralston|title=Discrete Algorithmic Mathematics|url=https://books.google.com/books?id=_0vNBQAAQBAJ&pg=PA11|date=21 January 2005|publisher=CRC Press|isbn=978-1-4398-6375-6|page=11}}{{Cite web|title=Introduction to Sets|url=https://www.mathsisfun.com/sets/sets-introduction.html|access-date=2020-08-19|website=www.mathsisfun.com}}{{cite book|first=D. |last=Van Dalen|first2=H. C. |last2=Doets|first3=H. |last3=De Swart|title=Sets: Naïve, Axiomatic and Applied: A Basic Compendium with Exercises for Use in Set Theory for Non Logicians, Working and Teaching Mathematicians and Students|url=https://books.google.com/books?id=PfbiBQAAQBAJ&pg=PA1|date=9 May 2014|publisher=Elsevier Science|isbn=978-1-4831-5039-0|page=1}}

\{1,2,3,4\}=\{4, 2, 1, 3\} = \{4, 2, 4, 3, 1, 3\}.

When there is a clear pattern for generating all set elements, one can use ellipses for abbreviating the notation,{{cite book|first=Alfred |last=Basta|first2=Stephan |last2=DeLong|first3=Nadine |last3=Basta|title=Mathematics for Information Technology|url=https://books.google.com/books?id=VUYLAAAAQBAJ&pg=PA3|date=1 January 2013|publisher=Cengage |isbn=978-1-285-60843-3|page=3}}{{cite book|first=Laura |last=Bracken|first2=Ed |last2=Miller|title=Elementary Algebra|url=https://books.google.com/books?id=nFkrl_kDiTAC&pg=PA36|date=15 February 2013|publisher=Cengage |isbn=978-0-618-95134-5|page=36}} such as in

\{1,2,3,\ldots,1000\}

for the positive integers not greater than {{tmath|1000}}.

Ellipses allow also expanding roster notation to some infinite sets. For example, the set of all integers can be denoted as

\{\ldots, -3, -2, -1, 0, 1, 2, 3, \ldots\}

or

\{0, 1, -1, 2, -2, 3, -3, \ldots\}.

=Set-builder notation=

{{main|Set-builder notation}}

Set-builder notation specifies a set as being the set of all elements that satisfy some logical formula.{{cite book|author=Frank Ruda|title=Hegel's Rabble: An Investigation into Hegel's Philosophy of Right|url=https://books.google.com/books?id=VV0SBwAAQBAJ&pg=PA151|date=6 October 2011|publisher=Bloomsbury Publishing|isbn=978-1-4411-7413-0|page=151}}{{cite book|author=John F. Lucas|title=Introduction to Abstract Mathematics|url=https://books.google.com/books?id=jklsb5JUgoQC&pg=PA108|year=1990|publisher=Rowman & Littlefield|isbn=978-0-912675-73-2|page=108}}{{Cite web|last=Weisstein|first=Eric W.|title=Set|url=https://mathworld.wolfram.com/Set.html|access-date=2020-08-19|website=Wolfram MathWorld |language=en}} More precisely, if {{tmath|P(x)}} is a logical formula depending on a variable {{tmath|x}}, which evaluates to true or false depending on the value of {{tmath|x}}, then

\{x \mid P(x)\}

or{{cite book|author=Ralph C. Steinlage|title=College Algebra|url=https://books.google.com/books?id=lcg3gY3444IC|year=1987|publisher=West Publishing Company|isbn=978-0-314-29531-6}}

\{x : P(x)\}

denotes the set of all {{tmath|x}} for which {{tmath|P(x)}} is true. For example, a set {{mvar|F}} can be specified as follows:

F = \{n \mid n \text{ is an integer, and } 0 \leq n \leq 19\}.

In this notation, the vertical bar "|" is read as "such that", and the whole formula can be read as "{{mvar|F}} is the set of all {{mvar|n}} such that {{mvar|n}} is an integer in the range from 0 to 19 inclusive".

Some logical formulas, such as {{tmath| \color{red}{S \text{ is a set} } }} or {{tmath|\color{red}{S \text{ is a set and } S\not\in S} }} cannot be used in set-builder notation because there is no set for which the elements are characterized by the formula. There are several ways for avoiding the problem. One may prove that the formula defines a set; this is often almost immediate, but may be very difficult.

One may also introduce a larger set {{tmath|U}} that must contain all elements of the specified set, and write the notation as

\{x\mid x\in U \text{ and ...}\}

or

\{x\in U\mid \text{ ...}\}.

One may also define {{tmath|U}} once for all and take the convention that every variable that appears on the left of the vertical bar of the notation represents an element of {{tmath|U}}. This amounts to say that {{tmath|x\in U}} is implicit in set-builder notation. In this case, {{tmath|U}} is often called the domain of discourse or a universe.

For example, with the convention that a lower case Latin letter may represent a real number and nothing else, the expression

\{x\mid x\not\in \Q\}

is an abbreviation of

\{x\in \R \mid x\not\in \Q\},

which defines the irrational numbers.

Subsets

{{Main|Subset}}

A subset of a set {{tmath|B}} is a set {{tmath|A}} such that every element of {{tmath|A}} is also an element of {{tmath|B}}.{{cite book|author=Felix Hausdorff|title=Set Theory|url=https://books.google.com/books?id=yvVIdH16k0YC&pg=PA30|year=2005|publisher=American Mathematical Soc.|isbn=978-0-8218-3835-8|page=30}} If {{tmath|A}} is a subset of {{tmath|B}}, one says commonly that {{tmath|A}} is contained in {{tmath|B}}, {{tmath|B}} contains {{tmath|A}}, or {{tmath|B}} is a superset of {{tmath|A}}. This denoted {{tmath|A\subseteq B}} and {{tmath|B\supseteq A}}. However many authors use {{tmath|A\subset B}} and {{tmath|B\supset A}} instead. The definition of a subset can be expressed in notation as

A \subseteq B \quad \text{if and only if}\quad \forall x\; (x\in A \implies x\in B).

A set {{tmath|A}} is a proper subset of a set {{tmath|B}} if {{tmath|A \subseteq B}} and {{tmath|A\neq B}}. This is denoted {{tmath|A\subset B}} and {{tmath|B\supset A}}. When {{tmath|A\subset B}} is used for the subset relation, or in case of possible ambiguity, one uses commonly {{tmath|A\subsetneq B}} and {{tmath|B\supsetneq A}}.{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/2/mode/2up 3]}}

The relationship between sets established by ⊆ is called inclusion or containment. Equality between sets can be expressed in terms of subsets. Two sets are equal if and only if they contain each other: that is, {{math|AB}} and {{math|BA}} is equivalent to A = B. The empty set is a subset of every set: {{math|∅ ⊆ A}}.{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/8/mode/2up 8]}}

Examples:

  • The set of all humans is a proper subset of the set of all mammals.
  • {{math|{{mset|1, 3}} ⊂ {{mset|1, 2, 3, 4}}}}.
  • {{math|{{mset|1, 2, 3, 4}} ⊆ {{mset|1, 2, 3, 4}}}}

Basic operations

There are several standard operations that produce new sets from given sets, in the same way as addition and multiplication produce new numbers from given numbers. The operations that are considered in this section are those such that all elements of the produced sets belong to a previously defined set. These operations are commonly illustrated with Euler diagrams and Venn diagrams.{{Cite book |last=Tanton |first=James |title=Encyclopedia of Mathematics |publisher=Facts On File |year=2005 |isbn=0-8160-5124-0 |location=New York |pages=460–61 |language=en |chapter=Set theory}}

The main basic operations on sets are the following ones.

=Intersection=

File:Venn0001.svg

The intersection of two sets {{tmath|A}} and {{tmath|B}} is a set denoted {{tmath|A \cap B}} whose elements are those elements that belong to both {{tmath|A}} and {{tmath|B}}. That is,

A \cap B=\{x\mid x\in A \land x\in B\},

where {{tmath|\land}} denotes the logical and.

Intersection is associative and commutative; this means that for proceeding a sequence of intersections, one may proceed in any order, without the need of parentheses for specifying the order of operations. Intersection has no general identity element. However, if one restricts intersection to the subsets of a given set {{tmath|U}}, intersection has {{tmath|U}} as identity element.

If {{tmath|\mathcal S}} is a nonempty set of sets, its intersection, denoted

\bigcap_{A\in \mathcal S} A,

is the set whose elements are those elements that belong to all sets in {{tmath|\mathcal S}}. That is,

\bigcap_{A\in \mathcal S} A =\{x\mid (\forall A\in \mathcal S)\; x\in A\}.

These two definitions of the intersection coincide when {{tmath|\mathcal S}} has two elements.

=Union=

File:Venn0111.svg

The union of two sets {{tmath|A}} and {{tmath|B}} is a set denoted {{tmath|A \cup B}} whose elements are those elements that belong to {{tmath|A}} or {{tmath|B}} or both. That is,

A \cup B=\{x\mid x\in A \lor x\in B\},

where {{tmath|\lor}} denotes the logical or.

Union is associative and commutative; this means that for proceeding a sequence of intersections, one may proceed in any order, without the need of parentheses for specifying the order of operations. The empty set is an identity element for the union operation.

If {{tmath|\mathcal S}} is a set of sets, its union, denoted

\bigcup_{A\in \mathcal S} A,

is the set whose elements are those elements that belong to at least one set in {{tmath|\mathcal S}}. That is,

\bigcup_{A\in \mathcal S} A =\{x\mid (\exists A\in \mathcal S)\; x\in A\}.

These two definitions of the union coincide when {{tmath|\mathcal S}} has two elements.

=Set difference=

File:Venn0100.svg

The set difference of two sets {{tmath|A}} and {{tmath|B}}, is a set, denoted {{tmath|A \setminus B}} or {{tmath|A - B}}, whose elements are those elements that belong to {{tmath|A}}, but not to {{tmath|B}}. That is,

A \setminus B=\{x\mid x\in A \land x\not\in B\},

where {{tmath|\land}} denotes the logical and.

File:Venn1010.svg

When {{tmath|B\subseteq A}} the difference {{tmath|A \setminus B}} is also called the complement of {{tmath|B}} in {{tmath|A}}. When all sets that are considered are subsets of a fixed universal set {{tmath|U}}, the complement {{tmath|U \setminus A}} is often called the absolute complement of {{tmath|A}}.

File:Venn0110.svg

The symmetric difference of two sets {{tmath|A}} and {{tmath|B}}, denoted {{tmath|A\,\Delta\,B}}, is the set of those elements that belong to {{mvar|A}} or {{mvar|B}} but not to both:

A\,\Delta\,B = (A \setminus B) \cup (B \setminus A).

=Algebra of subsets=

{{main|Algebra of sets}}

The set of all subsets of a set {{tmath|U}} is called the powerset of {{tmath|U}}, often denoted {{tmath|\mathcal P(U)}}. The powerset is an algebraic structure whose main operations are union, intersection, set difference, symmetric difference and absolute complement (complement in {{tmath|U}}).

The powerset is a Boolean ring that has the symmetric difference as addition, the intersection as multiplication, the empty set as additive identity, {{tmath|U}} as multiplicative identity, and complement as additive inverse.

The powerset is also a Boolean algebra for which the join {{tmath|\lor}} is the union {{tmath|\cup}}, the meet {{tmath|\land}} is the intersection {{tmath|\cap}}, and the negation is the set complement.

As every Boolean algebra, the power set is also a partially ordered set for set inclusion. It is also a complete lattice.

The axioms of these structures induce many identities relating subsets, which are detailed in the linked articles.

Functions

{{main article|Function (mathematics)}}

A function from a set {{mvar|A}}{{mdash}}the domain{{mdash}}to a set {{mvar|B}}{{mdash}}the codomain{{mdash}}is a rule that assigns to each element of {{mvar|A}} a unique element of {{mvar|B}}. For example, the square function maps every real number {{mvar|x}} to {{math|x2}}. Functions can be formally defined in terms of sets by means of their graph, which are subsets of the Cartesian product (see below) of the domain and the codomain.

Functions are fundamental for set theory, and examples are given in following sections.

=Indexed families=

Intuitively, an indexed family is a set whose elements are labelled with the elements of another set, the index set. These labels allow the same element to occur several times in the family.

Formally, an indexed family is a function that has the index set as its domain. Generally, the usual functional notation {{tmath|f(x)}} is not used for indexed families. Instead, the element of the index set is written as a subscript of the name of the family, such as in {{tmath|a_i}}.

When the index set is {{tmath|\{1,2\} }}, an indexed family is called an ordered pair. When the index set is the set of the {{tmath|n}} first natural numbers, an indexed family is called an {{tmath|n}}-tuple. When the index set is the set of all natural numbers an indexed family is called a sequence.

In all these cases, the natural order of the natural numbers allows omitting indices for explicit indexed families. For example, {{tmath|(b,2,b)}} denotes the 3-tuple {{tmath|A}} such that {{tmath|1=A_1=b, A_2=2, A_3=b}}.

The above notations \bigcup_{A\in \mathcal S} A and \bigcap_{A\in \mathcal S} A are commonly replaced with a notation involving indexed families, namely

\bigcup_{i\in \mathcal I} A_i=\{x\mid (\exists i\in \mathcal I)\; x\in A_i\}

and

\bigcap_{i\in \mathcal I} A_i=\{x\mid (\forall i\in \mathcal I)\; x\in A_i\}.

The formulas of the above sections are special cases of the formulas for indexed families, where {{tmath|1=\mathcal S = \mathcal I}} and {{tmath|1=i = A =A_i}}. The formulas remain correct, even in the case where {{tmath|1=A_i=A_j}} for some {{tmath|i\neq j}}, since {{tmath|1=A=A\cup A= A\cap A.}}

External operations

In {{alink|Basic operations}}, all elements of sets produced by set operations belong to previously defined sets. In this section, other set operations are considered, which produce sets whose elements can be outside all previously considered sets. These operations are Cartesian product, disjoint union, set exponentiation and power set.

=Cartesian product=

{{main|Cartesian product|Direct product}}

The Cartesian product of two sets has already be used for defining functions.

Given two sets {{tmath|A_1}} and {{tmath|A_2}}, their Cartesian product, denoted {{tmath|A_1\times A_2}} is the set formed by all ordered pairs {{tmath|(a_1, a_2)}} such that {{tmath|a_1\in A_1}} and {{tmath|a_i\in A_1}}; that is,

A_1\times A_2 = \{(a_1, a_2) \mid a_1\in A_1 \land a_2\in A_2\}.

This definition does not supposes that the two sets are different. In particular,

A\times A = \{(a_1, a_2) \mid a_1\in A \land a_2\in A\}.

Since this definition involves a pair of indices (1,2), it generalizes straightforwardly to the Cartesian product or direct product of any indexed family of sets:

\prod_{i\in \mathcal I} A_i= \{(a_i)_{i\in \mathcal I}\mid (\forall i\in \mathcal I) \;a_i\in A_i\}.

That is, the elements of the Cartesian product of a family of sets are all families of elements such that each one belongs to the set of the same index. The fact that, for every indexed family of nonempty sets, the Cartesian product is a nonempty set is insured by the axiom of choice.

=Set exponentiation=

{{main|Set exponentiation}}

Given two sets {{tmath|E}} and {{tmath|F}}, the set exponentiation, denoted {{tmath|F^E}}, is the set that has as elements all functions from {{tmath|E}} to {{tmath|F}}.

Equivalently, {{tmath|F^E}} can be viewed as the Cartesian product of a family, indexed by {{tmath|E}}, of sets that are all equal to {{tmath|F}}. This explains the terminology and the notation, since exponentiation with integer exponents is a product where all factors are equal to the base.

=Power set=

{{main|Power set}}

The power set of a set {{tmath|E}} is the set that has all subsets of {{tmath|E}} as elements, including the empty set and {{tmath|E}} itself. It is often denoted {{tmath|\mathcal P(E)}}. For example,

\mathcal P(\{1,2,3\})=\{\emptyset, \{1\}, \{2\}, \{3\}, \{1,2\}, \{1,3\}, \{2,3\}, \{1,2,3\}\}.

There is a natural one-to-one correspondence (bijection) between the subsets of {{tmath|E}} and the functions from {{tmath|E}} to {{tmath|\{0,1\} }}; this correspondence associates to each subset the function that takes the value {{tmath|1}} on the subset and {{tmath|0}} elsewhere. Because of this correspondence, the power set of {{tmath|E}} is commonly identified with a set exponentiation:

\mathcal P(E)=\{0,1\}^E.

In this notation, {{tmath|\{0,1\} }} is often abbreviated as {{tmath|2}}, which gives{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/18/mode/2up 19]}}

\mathcal P(E)=2^E.

In particular, if {{tmath|E}} has {{tmath|n}} elements, then {{tmath|2^E}} has {{tmath|2^n}} elements.{{sfn|Halmos|1960|p=[https://archive.org/details/naivesettheory00halm/page/20/mode/2up 20]}}

=Disjoint union=

{{main|Disjoint union}}

The disjoint union of two or more sets is similar to the union, but, if two sets have elements in common, these elements are considered as distinct in the disjoint union. This is obtained by labelling the elements by the indexes of the set they are coming from.

The disjoint union of two sets {{tmath|A}} and {{tmath|B}} is commonly denoted {{tmath|A\sqcup B}} and is thus defined as

A\sqcup B=\{(a,i)\mid (i=1 \land a\in A)\lor (i=2 \land a\in B\}.

If {{tmath|1=A=B}} is a set with {{tmath|n}} elements, then {{tmath|1=A\cup A =A}} has {{tmath|n}} elements, while {{tmath|1=A\sqcup A}} has {{tmath|2n}} elements.

The disjoint union of two sets is a particular case of the disjoint union of an indexed family of sets, which is defined as

\bigsqcup_{i \in \mathcal I}=\{(a,i)\mid i\in \mathcal I \land a\in A_i\}.

The disjoint union is the coproduct in the category of sets. Therefore the notation

\coprod_{i \in \mathcal I}=\{(a,i)\mid i\in \mathcal I \land a\in A_i\}

is commonly used.

== Internal disjoint union ==

Given an indexed family of sets {{tmath|(A_i)_{i\in \mathcal I} }}, there is a natural map

\begin{align}

\bigsqcup_{i\in \mathcal I} A_i&\to \bigcup_{i\in \mathcal I} A_i\\

(a,i)&\mapsto a ,

\end{align}

which consists in "forgetting" the indices.

This maps is always surjective; it is bijective if and only if the {{tmath|A_i}} are pairwise disjoint, that is, all intersections of two sets of the family are empty. In this case, \bigcup_{i\in \mathcal I} A_i and \bigsqcup_{i\in \mathcal I} A_i are commonly identified, and one says that their union is the disjoint union of the members of the family.

If a set is the disjoint union of a family of subsets, one says also that the family is a partition of the set.

Cardinality

{{Main|Cardinality|Cardinal number}}

Informally, the cardinality of a set {{math|S}}, often denoted {{math|{{mabs|S}}}}, is the number of its members.{{cite book|author=Yiannis N. Moschovakis|title=Notes on Set Theory|url=https://books.google.com/books?id=ndx0_6VCypcC|year=1994|publisher=Springer Science & Business Media|isbn=978-3-540-94180-4}} This number is the natural number {{tmath|n}} when there is a bijection between the set that is considered and the set {{tmath|\{1,2,\ldots, n \} }} of the {{tmath|n}} first natural numbers. The cardinality of the empty set is {{tmath|0}}.{{cite book|author=Karl J. Smith|title=Mathematics: Its Power and Utility|url=https://books.google.com/books?id=-0x2JszrkooC&pg=PA401|date=7 January 2008|publisher=Cengage Learning|isbn=978-0-495-38913-2|page=401}} A set with the cardinality of a natural number is called a finite set which is true for both cases. Otherwise, one has an infinite set.{{Cite book |last=Biggs |first=Norman L. |title=Discrete Mathematics |publisher=Oxford University Press |year=1989 |isbn=0-19-853427-2 |edition=revised |location=New York |pages=39 |language=en |chapter=Functions and counting}}

The fact that natural numbers measure the cardinality of finite sets is the basis of the concept of natural number, and predates for several thousands years the concept of sets. A large part of combinatorics is devoted to the computation or estimation of the cardinality of finite sets.

=Infinite cardinalities=

The cardinality of an infinite set is commonly represented by a cardinal number, exactly as the number of elements of a finite set is represented by a natural numbers. The definition of cardinal numbers is too technical for this article; however, many properties of cardinalities can be dealt without referring to cardinal numbers, as follows.

Two sets {{tmath|S}} and {{tmath|T}} have the same cardinality if there exists a one-to-one correspondence (bijection) between them. This is denoted |S|=|T|, and would be an equivalence relation on sets, if a set of all sets would exist.

For example, the natural numbers and the even natural numbers have the same cardinality, since multiplication by two provides such a bijection. Similarly, the interval {{tmath|(-1, 1)}} and the set of all real numbers have the same cardinality, a bijection being provided by the function {{tmath|x\mapsto \tan(\pi x/2)}}.

Having the same cardinality of a proper subset is a characteristic property of infinite sets: a set is infinite if and only if it has the same cardinality as one of its proper subsets.

So, by the above example, the natural numbers form an infinite set.

Besides equality, there is a natural inequality between cardinalities: a set {{tmath|S}} has a cardinality smaller than or equal to the cardinality of another set {{tmath|T}} if there is an injection frome {{tmath|S}} to {{tmath|T}}. This is denoted |S|\le |T|.

Schröder–Bernstein theorem implies that |S|\le |T| and |T|\le |S| imply |S|= |T|. Also, one has |S|\le |T|, if and only if there is a surjection from {{tmath|T}} to {{tmath|S}}. For every two sets {{tmath|S}} and {{tmath|T}}, one has either |S|\le |T| or |T|\le |S|.{{efn|This property is equivalent to the axiom of choice.}} So, inequality of cardinalities is a total order.

The cardinality of the set {{tmath|\N}} of the natural numbers, denoted |\N|=\aleph_0, is the smallest infinite cardinality. This means that if {{tmath|S}} is a set of natural numbers, then either {{tmath|S}} is finite or |S|=|\N|.

Sets with cardinality less than or equal to |\N|=\aleph_0 are called countable sets; these are either finite sets or countably infinite sets (sets of cardinality \aleph_0); some authors use "countable" to mean "countably infinite". Sets with cardinality strictly greater than \aleph_0 are called uncountable sets.

Cantor's diagonal argument shows that, for every set {{tmath|S}}, its power set (the set of its subsets) {{tmath|2^S}} has a greater cardinality:

|S|<\left|2^S \right|.

This implies that there is no greatest cardinality.

=Cardinality of the real numbers=

The cardinality of set of the real numbers is called the cardinality of the continuum and denoted {{tmath|\mathfrak c}}. (The term "continuum" referred to the real line before the 20th century, when the real line was not commonly viewed as a set of numbers.)

Since, as seen above, the real line {{tmath|\R}} has the same cardinality of an open interval, every subset of {{tmath|\R}} that contains a nonempty open interval has also the cardinality {{tmath|\mathfrak c}}.

One has

\mathfrak c = 2^{\aleph_0},

meaning that the cardinality of the real numbers equals the cardinality of the power set of the natural numbers. In particular,{{cite book|author=John Stillwell|title=The Real Numbers: An Introduction to Set Theory and Analysis|url=https://books.google.com/books?id=VPe8BAAAQBAJ|date=16 October 2013|publisher=Springer Science & Business Media|isbn=978-3-319-01577-4}}

\mathfrak c > \aleph_0.

When published in 1878 by Georg Cantor, this result was so astonishing that it was refused by mathematicians, and several tens years were needed before its common acceptance.

It can be shown that {{tmath|\mathfrak c}} is also the cardinality of the entire plane, and of any finite-dimensional Euclidean space.{{cite book|author=David Tall|title=Advanced Mathematical Thinking|url=https://books.google.com/books?id=czKqBgAAQBAJ&pg=PA212|date=11 April 2006|publisher=Springer Science & Business Media|isbn=978-0-306-47203-9|pages=211}}

The continuum hypothesis, was a conjecture formulated by Georg Cantor in 1878 that there is no set with cardinality strictly between {{tmath|\aleph_0}} and {{tmath|\mathfrak c}}.{{Cite journal

| first = Georg | last = Cantor

| title = Ein Beitrag zur Mannigfaltigkeitslehre

| journal = Journal für die Reine und Angewandte Mathematik

| volume = 1878 | issue = 84

| year = 1878 | pages=242–258

| url = http://www.digizeitschriften.de/dms/img/?PPN=PPN243919689_0084&DMDID=dmdlog15 | doi=10.1515/crll.1878.84.242| doi-broken-date = 1 November 2024

}} In 1963, Paul Cohen proved that the continuum hypothesis is independent of the axioms of Zermelo–Fraenkel set theory with the axiom of choice.

{{Cite journal

| first = Paul J. | last = Cohen

| title = The Independence of the Continuum Hypothesis

| journal = Proceedings of the National Academy of Sciences of the United States of America

| volume = 50 | issue = 6 | date = December 15, 1963a | pages = 1143–1148

| doi = 10.1073/pnas.50.6.1143

| pmid = 16578557

| pmc = 221287 | jstor=71858

| bibcode = 1963PNAS...50.1143C| doi-access = free

}}

This means that if the most widely used set theory is consistent (that is not self-contradictory),{{efn|The consistency of set theory cannot proved from within itself.}} then the same is true for both the set theory with the continuum hypothesis added as a further axiom, and the set theory with the negation of the continuum hypothesis added.

Axiom of choice

{{main|Axiom of choice}}

Informally, the axiom of choice says that, given any family of nonempty sets, one can choose simultaneously an element in each of them.{{efn|Gödel{{sfn|Gödel|1938}} and Cohen{{sfn|Cohen|1963b}} showed that the axiom of choice cannot be proved or disproved from the remaining set theory axioms, respectively.}} Formulated this way, acceptability of this axiom sets a foundational logical question, because of the difficulty of conceiving an infinite instantaneous action. However, there are several equivalent formulations that are much less controversial and have strong consequences in many areas of mathematics. In the present days, the axiom of choice is thus commonly accepted in mainstream mathematics.

A more formal statement of the axiom of choice is: the Cartesian product of every indexed family of nonempty sets is non empty.

Other equivalent forms are described in the following subsections.

= Zorn's lemma =

{{main|Zorn's lemma}}

Zorn's lemma is an assertion that is equivalent to the axiom of choice under the other axioms of set theory, and is easier to use in usual mathematics.

Let {{tmath|S}} be a partial ordered set. A chain in {{tmath|S}} is a subset that is totally ordered under the induced order. Zorn's lemma states that, if every chain in {{tmath|S}} has an upper bound in {{tmath|S}}, then {{tmath|S}} has (at least) a maximal element, that is, an element that is not smaller than another element of {{tmath|S}}.

In most uses of Zorn's lemma, {{tmath|S}} is a set of sets, the order is set inclusion, and the upperbound of a chain is taken as the union of its members.

An example of use of Zorn's lemma, is the proof that every vector space has a basis. Here the elements of {{tmath|S}} are linearly independent subsets of the vector space. The union of a chain of elements of {{tmath|S}} is linearly independent, since an infinite set is linearly independent if and only if each finite subset is, and every finite subset of the union of a chain must be included in a member of the chain. So, there exist a maximal linearly independent set. This linearly independant set must span the vector space because of maximality, and is theefore a basis.

Another classical use of Zorn's lemma is the proof that every proper ideal{{mdash}}that is, an ideal that is not the whole ring{{mdash}}of a ring is contained in a maximal ideal. Here, {{tmath|S}} is the set of the proper ideals containing the given ideal. The union of chain of ideals is an ideal, since the axioms of an ideal involve a finite number of elements. The union of a chain of proper ideals is a proper ideal, since otherwise {{tmath|1}} would belong to the union, and this implies that it would belong to a member of the chain.

= Transfinite induction =

{{main|Well-order|Transfinite induction}}

The axiom of choice is equivalent with the fact that a well-order can be defined on every set, where a well-order is a total order such that every nonempty subset has a least element.

Simple examples of well-ordered sets are the natural numbers (with the natural order), and, for every {{mvar|n}}, the set of the {{mvar|n}}-tuples of natural numbers, with the lexicographic order.

Well-orders allow a generalization of mathematical induction, which is called transfinite induction. Given a property (predicate) {{tmath|P(n)}} depending on a natural number, mathematical induction is the fact that for proving that {{tmath|P(n)}} is always true, it suffice to prove that for every {{tmath|n}},

:(m

Transfinite induction is the same, replacing natural numbers by the elements of a well-ordered set.

Often, a proof by transfinite induction easier if three cases are proved separately, the two first cases being the same as for usual induction:

  • P(0) is true, where {{tmath|0}} denotes the least element of the well-ordered set
  • P(x) \implies P(S(x)),\quad where {{tmath|S(x)}} denotes the successor of {{tmath|x}}, that is the least element that is greater than {{tmath|x}}
  • (\forall y;\; y when {{tmath|x}} is not a successor.

Transfinite induction is fundamental for defining ordinal numbers and cardinal numbers.

See also

Notes

{{notelist}}

Citations

{{Reflist}}

References

  • {{cite book |author-link=Joseph Dauben |last=Dauben |first=Joseph W. |title=Georg Cantor: His Mathematics and Philosophy of the Infinite |location=Boston |publisher=Harvard University Press |year=1979 |isbn=0-691-02447-2 |url-access=registration |url=https://archive.org/details/georgcantorhisma0000daub }}
  • {{cite book |author-link=Paul Halmos |last=Halmos |first=Paul R. |title=Naive Set Theory |url=https://archive.org/details/naivesettheory00halm |url-access=registration |location=Princeton, N.J. |publisher=Van Nostrand |year=1960 |isbn=0-387-90092-6 }}
  • {{cite book |last=Stoll |first=Robert R. |title=Set Theory and Logic |location=Mineola, N.Y. |publisher=Dover Publications |year=1979 |isbn=0-486-63829-4 }}
  • {{cite book |last=Velleman |first=Daniel |title=How To Prove It: A Structured Approach |publisher=Cambridge University Press |year=2006 |isbn=0-521-67599-5 }}
  • {{Cite journal|title=The Consistency of the Axiom of Choice and of the Generalized Continuum-Hypothesis|journal = Proceedings of the National Academy of Sciences of the United States of America|volume = 24|issue = 12|pages = 556–557|last=Gödel|first=Kurt|date=9 November 1938|pmc = 1077160|pmid = 16577857|bibcode = 1938PNAS...24..556G|doi = 10.1073/pnas.24.12.556|doi-access = free}}
  • {{Cite web|url=https://stacks.stanford.edu/file/druid:pd104gy5838/SCM0405.pdf |archive-url=https://ghostarchive.org/archive/20221009/https://stacks.stanford.edu/file/druid:pd104gy5838/SCM0405.pdf |archive-date=2022-10-09 |url-status=live|title=The Independence of the Axiom of Choice|last=Cohen|first=Paul|date=1963b|website=Stanford University Libraries|access-date=2019-03-22}}