Set (mathematics)
At first glance, a "set" might seem like a simple concept—just a collection of things. Yet, this seemingly straightforward idea underpins nearly all modern mathematics, providing a rigorous language to define everything from numbers to functions. Dive into the surprising history and profound impact of sets, an intellectual journey that challenged our understanding of infinity and the very foundations of logic. Sets are the fundamental building blocks of mathematics, providing a universal language for defining objects and relationships. The pioneering work of Georg Cantor on infinite sets led to groundbreaking discoveries and unexpected paradoxes that reshaped mathematical foundations. Modern set theory, particularly Zermelo-Fraenkel, resolved these paradoxes, establishing a robust framework and defining essential operations like union, intersection, and difference.
AI Summary
At first glance, a "set" might seem like a simple concept—just a collection of things. Yet, this seemingly straightforward idea underpins nearly all modern mathematics, providing a rigorous language to define everything from numbers to functions. Dive into the surprising history and profound impact of sets, an intellectual journey that challenged our understanding of infinity and the very foundations of logic.
- Sets are the fundamental building blocks of mathematics, providing a universal language for defining objects and relationships.
- The pioneering work of Georg Cantor on infinite sets led to groundbreaking discoveries and unexpected paradoxes that reshaped mathematical foundations.
- Modern set theory, particularly Zermelo-Fraenkel, resolved these paradoxes, establishing a robust framework and defining essential operations like union, intersection, and difference.
Before Sets: An Uncharted Territory
For centuries, mathematicians worked with collections of numbers or geometric shapes without formally defining them as 'sets.' The idea of a set as a distinct mathematical object, with its own rules and properties, simply didn't exist. Concepts like infinity were often seen as a never-ending process, not a completed collection of items.
Imagine a line—today we might think of it as an infinite collection of points. But before the late 19th century, a line was primarily understood as a 'locus,' a path where points could be located, rather than a completed set of all those individual points. This subtle distinction highlights how fundamentally our mathematical perspective has shifted.
The Revolution of Infinity: Georg Cantor
Everything changed with Georg Cantor in the late 19th century. He dared to grapple with 'actual infinity'—thinking of infinite collections as concrete objects that could be studied and compared. His work was revolutionary, but it also brought forth some truly mind-bending concepts.
Cantor discovered that not all infinities are created equal. For instance, he proved that the 'number' of points on a tiny line segment is actually the same as the 'number' of points on an infinitely long line, or even in all of space! This sounds deeply counterintuitive, but his rigorous methods showed it to be true.
The Foundational Crisis: Russell's Paradox
While Cantor opened up new mathematical 'paradises,' his work also revealed hidden dangers. The informal way sets were initially defined led to logical contradictions, most famously articulated by Bertrand Russell in the early 20th century. This sparked what's known as the 'foundational crisis' of mathematics.
Russell's paradox asks us to consider a set defined as 'the set of all sets that do not contain themselves.' If this set contains itself, then by its definition, it shouldn't. But if it doesn't contain itself, then it should belong to the set. This self-contradictory loop exposed a fatal flaw in the informal understanding of sets.
A New Foundation: Zermelo-Fraenkel Set Theory
To resolve this crisis, mathematicians sought a more rigorous framework. The answer came in the form of axiomatic set theory, particularly the Zermelo-Fraenkel (ZF) axioms, often including the Axiom of Choice (ZFC). This system provides a rock-solid foundation, preventing paradoxes like Russell's by carefully defining how sets can be constructed.
With a secure foundation, sets quickly became indispensable. Modern mathematical concepts, from algebraic structures like groups and rings to the very definition of functions and spaces, are now routinely expressed using the language of sets. As mathematician David Hilbert famously declared, 'No one will drive us from the paradise which Cantor created for us!'
What is a Set? The Core Ideas
So, what exactly is a set? Simply put, a set is a well-defined collection of distinct objects, called its 'elements' or 'members.' These elements can be anything: numbers, symbols, points, lines, or even other sets. The key is that each element is unique within a given set.
We use a special symbol, $\in$, to denote membership. So, if an object $x$ is an element of set $S$, we write $x \in S$. If it's not, we write $x \notin S$. For example, if $\mathbb{Z}$ represents the set of integers, then $-3 \in \mathbb{Z}$ is true, but $1.5 \notin \mathbb{Z}$ is false.
A crucial property of sets is called 'extensionality': a set is uniquely defined by its elements. This means that the order in which we list elements doesn't matter, and repeating elements has no effect. Two sets are equal if and only if they contain precisely the same elements.
This principle of extensionality is formally expressed as this logical equivalence. It tells us that for sets $A$ and $B$ to be equal, every element in $A$ must be in $B$, AND every element in $B$ must be in $A$.
A = B \iff (\forall x)(x \in A \iff x \in B)
There's one unique set with no elements at all—this is the 'empty set,' denoted by $\emptyset$ or simply {}. And a set containing exactly one element is called a 'singleton,' written as {x}, where $x$ is its sole member.
Sets can be either 'finite' or 'infinite.' A finite set has a number of elements that we can count and express as a natural number. An infinite set, like the set of all natural numbers $\mathbb{N}$, has an endless quantity of elements.
Specifying a Set: Roster vs. Set-Builder
Since sets are defined by their elements, we have two primary ways to describe them: by listing their elements directly or by stating a rule that all their elements must follow.
Roster Notation
The simplest way is 'roster notation,' where we list all elements within curly braces, separated by commas. For example, the set of primary colors might be {blue, white, red}. The order of listing doesn't change the set, nor does repeating elements.
For larger sets, especially those with a clear pattern, we can use ellipses (...). For instance, the set of positive integers up to 1000 can be written as {1, 2, 3, ..., 1000}. This notation even extends to some infinite sets, like the integers: {..., -2, -1, 0, 1, 2, ...}.
Set-Builder Notation
For sets defined by a property, we use 'set-builder notation.' This involves a variable, a vertical bar (read as 'such that'), and a logical condition. For example, the set $E$ of even numbers can be written as $E = \{x \mid x \text{ is an integer and } x \text{ is divisible by } 2\} $.
Sometimes, to avoid Russell-like paradoxes and provide context, we specify a larger 'universe' or 'domain of discourse' from which the elements are drawn. So, if we're discussing rational numbers, the implied universe might be all real numbers.
Relations Between Sets: Subsets
Sets aren't just isolated collections; they can relate to each other. A set $A$ is a 'subset' of set $B$ if every element of $A$ is also an element of $B$. We denote this with $A \subseteq B$, meaning $A$ is contained in $B$.
This formal definition states that $A$ is a subset of $B$ if and only if for every element $x$, if $x$ is in $A$, then $x$ must also be in $B$. If $A$ is a subset of $B$ but not equal to $B$, we call it a 'proper subset,' denoted $A \subset B$ (or $A \subsetneq B$).
A \subseteq B \iff (\forall x)(x \in A \implies x \in B)
An interesting property is that the empty set $\emptyset$ is considered a subset of every set. This makes intuitive sense: there are no elements in $\emptyset$ that are not in any other set, so the condition for being a subset is always met.
Building New Sets: Basic Operations
Just like we perform arithmetic operations on numbers, we can perform operations on sets to combine or transform them. These fundamental operations are often visualized using diagrams, helping to illustrate the relationships between sets.
Intersection
The 'intersection' of two sets, $A$ and $B$, denoted $A \cap B$, is the set containing all elements that are common to both $A$ and $B$. Think of it as the overlap between the two collections.
The symbol $\land$ means 'and.' So, an element $x$ is in the intersection if it belongs to set $A$ AND it belongs to set $B$. Intersection is both commutative ($A \cap B = B \cap A$) and associative, meaning the order of operations doesn't change the result for multiple sets.
A \cap B = \{x \mid x \in A \land x \in B\}Union
The 'union' of two sets, $A$ and $B$, denoted $A \cup B$, is the set containing all elements that belong to set $A$, or to set $B$, or to both. It combines the two collections into one larger set.
Here, $\lor$ means 'or.' An element $x$ is in the union if it's in $A$ OR in $B$. Like intersection, union is also commutative ($A \cup B = B \cup A$) and associative. The empty set $\emptyset$ acts as an identity element for union, meaning $A \cup \emptyset = A$.
A \cup B = \{x \mid x \in A \lor x \in B\}Set Difference
The 'set difference' of $A$ and $B$, written $A \setminus B$ (or $A-B$), is the set of all elements that are in set $A$ but not in set $B$. It effectively 'removes' the elements of $B$ from $A$.
The symmetric difference, $A \Delta B$, is a related operation. It represents the elements that are in either $A$ or $B$, but not in their intersection. In other words, it's the union of $(A \setminus B)$ and $(B \setminus A)$.
A \setminus B = \{x \mid x \in A \land x \notin B\}The Power Set
Beyond these basic operations, a fascinating concept is the 'power set' of a given set $U$, denoted $\mathcal{P}(U)$. This is the set of all possible subsets of $U$, including the empty set and $U$ itself. If $U$ has $n$ elements, then its power set $\mathcal{P}(U)$ will have $2^n$ elements.
Article
Set (mathematics)
A set of polygons in an Euler diagram
This set equals the one above since they have the same elements.
In mathematics, a set is a collection of different things; the things are called elements or members of the set and are typically mathematical objects: numbers, symbols, points in space, lines, other geometric shapes, variables, functions, or even other sets.
Mathematics typically does not define precisely what constitutes a "set" or "collection", because such a definition would have to be in terms of something else previously defined. Instead, sets serve as foundational objects whose behavior is described by axioms modeled on intuition about collections, and then essentially all other mathematical objects are rigorously defined in terms of sets.
Set theory studies possible axiom systems and their consequences. Since the first half of the 20th century, ZFC (Zermelo–Fraenkel set theory with the axiom of choice) has been the axiom system most commonly used.
Context
Set (mathematics)
Before the end of the 19th century, sets were not studied specifically, and they were not clearly distinguished from sequences. Most mathematicians considered infinity as potential—meaning that it is the result of an endless process—and were reluctant to consider infinite sets. For example, a line was considered not as a set of points, but as a locus where a point may be located.
The mathematical study of infinite sets began with Georg Cantor (1845–1918). This provided some counterintuitive statements 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 line. Assuming the existence of a set of all sets led to a contradiction, Russell's paradox. This led to the foundational crisis of mathematics, and to proposed resolutions. One of these, Zermelo–Fraenkel set theory, has been generally adopted as a foundation of set theory and all mathematics, though much of mathematics does not require its full power.
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 that Cantor created for us."
The object of this article is to summarize the manipulation rules and properties of sets that are commonly used in mathematics, without reference to a specific 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
Set (mathematics)
In mathematics, a set is a collection of different things, called elements or members of the set. A set may also be called a collection or family, especially when its elements are themselves sets; this may avoid confusion between the set and its members. A set may be specified either by listing its elements or by giving 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.
If ${\displaystyle x}$ is an element of a set ${\displaystyle S}$, one says that ${\displaystyle x}$ belongs to ${\displaystyle S}$ or is in ${\displaystyle S}$, and one writes ${\displaystyle x\in S}$. The statement "${\displaystyle y}$ is not in ${\displaystyle S\,}$" is written as ${\displaystyle y\not \in S}$. For example, if ${\displaystyle \mathbb {Z} }$ is the set of all integers, then ${\displaystyle -3\in \mathbb {Z} }$ and ${\displaystyle 1.5\not \in \mathbb {Z} }$. The axiom of extensionality states that two sets are equal if and only if they have the same elements.
There exists a set with no elements, and extensionality implies that there is only one such set. It is called the empty set (or null set) and is denoted ${\displaystyle \varnothing }$, ${\displaystyle \emptyset }$, or ${\displaystyle \{\,\}}$.
A singleton is a set with exactly one element. If ${\displaystyle x}$ is this element, the singleton is denoted ${\displaystyle \{x\}}$. The sets ${\displaystyle \{\emptyset \}}$ and ${\displaystyle \emptyset }$ are different, because the former has one element (namely, ${\displaystyle \emptyset }$) and the latter has no elements at all.
A set is finite if there exists a natural number ${\displaystyle n}$ such that the first ${\displaystyle n}$ natural numbers can be put in bijection (one-to-one correspondence) with the elements of the set. In this case, one says that ${\displaystyle n}$ is the number of elements of the set. A set is infinite if such an ${\displaystyle n}$ does not exist. The empty set is a finite set with ${\displaystyle 0}$ elements.
The standard number systems of natural numbers, integers, rational numbers, and real numbers are infinite sets.
The natural numbers form an infinite set, commonly denoted ${\displaystyle \mathbb {N} }$. Other examples of infinite sets include the integers (${\displaystyle \mathbb {Z} }$), the rational numbers (${\displaystyle \mathbb {Q} }$), the real numbers (${\displaystyle \mathbb {R} }$), nonzero real vector spaces, curves, and most other mathematical spaces.
Specifying a set
Set (mathematics)
Extensionality implies that to specify a set, it suffices either to list its elements or to provide a property that characterize the set's elements among the elements of a possibly larger set.
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. For example, one sees that ${\displaystyle \{4,2,1,3\}}$ and ${\displaystyle \{{\text{blue, white, red}}\}}$ denote sets and not tuples because of the enclosing braces.
The notations ${\displaystyle \{\,\}}$ for the empty set and ${\displaystyle \{x\}}$ for a singleton are examples of roster notation.
When specifying a set, all that matters is whether each potential element is in the set or not, so a set does not change if elements are repeated or arranged in a different order. For example, ${\displaystyle \{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 an ellipsis to abbreviate the notation; for example, ${\displaystyle \{1,2,3,\ldots ,10\}}$ is a shorthand for ${\displaystyle \{1,2,3,4,5,6,7,8,9,10\}}$. Ellipses in roster notation can also be used to describe some infinite sets; for example, the set of all integers can be denoted as ${\displaystyle \{\ldots ,-3,-2,-1,0,1,2,3,\ldots \}}$ or ${\displaystyle \{0,1,-1,2,-2,3,-3,\ldots \}.}$
Set-builder notation
Set-builder notation specifies a set as being the set of all elements that satisfy some logical formula. More precisely, if ${\displaystyle P(x)}$ is a logical formula depending on a variable ${\displaystyle x}$, which evaluates to true or false depending on the value of ${\displaystyle x}$, then ${\displaystyle \{x\mid P(x)\}}$ or ${\displaystyle \{x:P(x)\}}$ denotes the set of all ${\displaystyle x}$ for which ${\displaystyle P(x)}$ is true. For example, a set ${\displaystyle F}$ can be specified as follows: ${\displaystyle 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 "${\displaystyle F}$ is the set of all ${\displaystyle n}$ such that ${\displaystyle n}$ is an integer in the range from 0 to 19 inclusive".
Some logical formulas, such as ${\displaystyle \color {red}{S{\text{ is a set}}}}$ or ${\displaystyle \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 ${\displaystyle U}$ that must contain all elements of the specified set, and write the notation as ${\displaystyle \{x\mid x\in U{\text{ and ...}}\}}$ or ${\displaystyle \{x\in U\mid {\text{ ...}}\}.}$
One may also define ${\displaystyle 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 ${\displaystyle U}$. This amounts to saying that ${\displaystyle x\in U}$ is implicit in set-builder notation. In this case, ${\displaystyle 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 ${\displaystyle \{x\mid x\not \in \mathbb {Q} \}}$ is an abbreviation of ${\displaystyle \{x\in \mathbb {R} \mid x\not \in \mathbb {Q} \},}$ which defines the irrational numbers.
Subsets
Set (mathematics)
A subset of a set ${\displaystyle B}$ is a set ${\displaystyle A}$ such that every element of ${\displaystyle A}$ is also an element of ${\displaystyle B}$. The following are different ways of expressing the same thing:
• ${\displaystyle A}$ is a subset of ${\displaystyle B}$, • ${\displaystyle \forall x\;(x\in A\implies x\in B)}$, • ${\displaystyle A}$ is contained in ${\displaystyle B}$, • ${\displaystyle A\subseteq B}$, • ${\displaystyle B}$ is a superset of ${\displaystyle A}$, • ${\displaystyle B}$ contains ${\displaystyle A}$, • ${\displaystyle B\supseteq A}$.
The relationship between sets established by ⊆ is called inclusion or containment.
A set ${\displaystyle A}$ is a proper subset of a set ${\displaystyle B}$ if ${\displaystyle A\subseteq B}$ and ${\displaystyle A\neq B}$; to denote this, one writes ${\displaystyle A\subsetneq B}$, or ${\displaystyle A\subsetneqq B}$. Likewise, one may write ${\displaystyle B\supsetneq A}$ or ${\displaystyle B\supsetneqq A}$.
The notation ${\displaystyle A\subset B}$ often means ${\displaystyle A\subseteq B}$, but some authors use ${\displaystyle A\subset B}$ to mean ${\displaystyle A\subsetneq B}$. To avoid ambiguity, one can write ${\displaystyle A\subseteq B}$ or ${\displaystyle A\subsetneq B}$, depending on what is intended.
Examples
• The set of all humans is a proper subset of the set of all mammals. • ${\displaystyle \{1,3\}\subset \{1,2,3,4\}}$ • ${\displaystyle \{1,2,3,4\}\subseteq \{1,2,3,4\}}$
Properties of containment
• Two sets are equal if and only if they contain each other: ${\displaystyle A=B}$ is equivalent to (${\displaystyle A\subseteq B}$ and ${\displaystyle B\subseteq A}$). • The empty set is a subset of every set: ${\displaystyle \varnothing \subseteq A}$.
Basic operations
Set (mathematics)
There are several standard operations that produce new sets from given sets, analogously to how 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.
Intersection
The intersection of A and B, denoted A ∩ B
The intersection of two sets ${\displaystyle A}$ and ${\displaystyle B}$ is a set denoted ${\displaystyle A\cap B}$ whose elements are those elements that belong to both ${\displaystyle A}$ and ${\displaystyle B}$. That is, ${\displaystyle A\cap B=\{x\mid x\in A\land x\in B\},}$ where ${\displaystyle \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.
If ${\displaystyle {\mathcal {S}}}$ is a nonempty set of sets, its intersection, denoted ${\textstyle \bigcap {A\in {\mathcal {S}}}A,}$ is the set whose elements are those elements that belong to all sets in ${\displaystyle {\mathcal {S}}}$. That is, ${\displaystyle \bigcap {A\in {\mathcal {S}}}A=\{x\mid (\forall A\in {\mathcal {S}})\;x\in A\}.}$ Example: If ${\displaystyle {\mathcal {S}}=\{X,Y\}}$, then ${\textstyle \bigcap {A\in {\mathcal {S}}}A=X\cap Y}$.
Union
The union of A and B, denoted A ∪ B
The union of two sets ${\displaystyle A}$ and ${\displaystyle B}$ is a set denoted ${\displaystyle A\cup B}$ whose elements are those elements that belong to ${\displaystyle A}$ or ${\displaystyle B}$ or both. That is, ${\displaystyle A\cup B=\{x\mid x\in A\lor x\in B\},}$ where ${\displaystyle \lor }$ denotes the logical or.
Union is associative and commutative.
If ${\displaystyle {\mathcal {S}}}$ is a set of sets, its union, denoted ${\textstyle \bigcup S=\bigcup {A\in {\mathcal {S}}}A,}$ is the set whose elements are those elements that belong to at least one set in ${\displaystyle {\mathcal {S}}}$. That is, ${\displaystyle \bigcup {A\in {\mathcal {S}}}A=\{x\mid (\exists A\in {\mathcal {S}})\;x\in A\}.}$ Example: If ${\displaystyle {\mathcal {S}}=\{X,Y\}}$, then ${\textstyle \bigcup {A\in {\mathcal {S}}}A=X\cup Y}$.
Set difference
The set difference A \ B
The set difference of two sets ${\displaystyle A}$ and ${\displaystyle B}$, is a set, denoted ${\displaystyle A\setminus B}$ or ${\displaystyle A-B}$, whose elements are those elements that belong to ${\displaystyle A}$, but not to ${\displaystyle B}$. That is, ${\displaystyle A\setminus B=\{x\mid x\in A\land x\not \in B\},}$ where ${\displaystyle \land }$ denotes the logical and.
The complement of A in U
When ${\displaystyle B\subseteq A}$ the difference ${\displaystyle A\setminus B}$ is also called the complement of ${\displaystyle B}$ in ${\displaystyle A}$. When all sets that are considered are subsets of a fixed universal set ${\displaystyle U}$, the complement ${\displaystyle U\setminus A}$ is often called the absolute complement of ${\displaystyle A}$.
The symmetric difference of A and B
The symmetric difference of two sets ${\displaystyle A}$ and ${\displaystyle B}$, denoted ${\displaystyle A\,\Delta \,B}$, is the set of those elements that belong to ${\displaystyle A}$ or ${\displaystyle B}$ but not to both: ${\displaystyle A\,\Delta \,B=(A\setminus B)\cup (B\setminus A).}$
Algebra of subsets
The set of all subsets of a set ${\displaystyle U}$ is called the powerset of ${\displaystyle U}$, often denoted ${\displaystyle {\mathcal {P}}(U)}$. The powerset is an algebraic structure whose main operations are union, intersection, set difference, symmetric difference and absolute complement (complement in ${\displaystyle U}$).
The powerset is a Boolean ring that has symmetric difference as addition, intersection as multiplication, the empty set as additive identity, ${\displaystyle U}$ as multiplicative identity, and the subset itself as the additive inverse.
The powerset is also a Boolean algebra for which the join ${\displaystyle \lor }$ is the union ${\displaystyle \cup }$, the meet ${\displaystyle \land }$ is the intersection ${\displaystyle \cap }$, and the negation is the set complement.
As for every Boolean algebra, the powerset 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
Set (mathematics)
A function ${\displaystyle f}$ from a set ${\displaystyle A}$ to a set ${\displaystyle B}$ is a rule that assigns to each element of ${\displaystyle A}$ a unique element of ${\displaystyle B}$. For example, the square function maps each real number ${\displaystyle x}$ to ${\displaystyle x^{2}}$.
The notation ${\displaystyle f:A\to B}$ denotes a function ${\displaystyle f}$ from ${\displaystyle A}$ to ${\displaystyle B}$. The result of applying ${\displaystyle f}$ to an element ${\displaystyle a}$ of ${\displaystyle A}$ is denoted ${\displaystyle f(a)}$; it is called the value of ${\displaystyle f}$ at ${\displaystyle a}$, or the image of ${\displaystyle a}$ under ${\displaystyle f}$. The set ${\displaystyle A}$ is called the domain of ${\displaystyle f}$, and ${\displaystyle B}$ is called the codomain of ${\displaystyle f}$.
The graph of a function ${\displaystyle f:A\to B}$ is the set of all ordered pairs ${\displaystyle (a,f(a))}$ as ${\displaystyle a}$ ranges over all elements of ${\displaystyle A}$. It is a subset of the Cartesian product ${\displaystyle A\times B}$ defined below. For example, the graph of the square function is a parabola in ${\displaystyle \mathbb {R} \times \mathbb {R} =\mathbb {R} ^{2}}$; it contains points such as ${\displaystyle (3,9)}$ and ${\displaystyle (-4,16)}$.
Once the domain and codomain are specified, the graph of ${\displaystyle f}$ contains the same information as ${\displaystyle f}$ itself. This point of view allows one to formally define 'function' in terms of sets. Specifically, a function from ${\displaystyle A}$ to ${\displaystyle B}$ is a triple ${\displaystyle (A,B,G)}$ of sets with ${\displaystyle G\subset A\times B}$ such that for every element ${\displaystyle a}$ in ${\displaystyle A}$, there exists a unique element ${\displaystyle b}$ in ${\displaystyle B}$ such that ${\displaystyle (a,b)\in G}$. (For functions from ${\displaystyle \mathbb {R} }$ to ${\displaystyle \mathbb {R} }$ especially, the condition on ${\displaystyle G}$ is called the vertical line test.)
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 ${\displaystyle 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 ${\displaystyle a{i}}$.
When the index set is ${\displaystyle \{1,2\}}$, an indexed family is called an ordered pair. When the index set is the set of the ${\displaystyle n}$ first natural numbers, an indexed family is called an ${\displaystyle 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, ${\displaystyle (b,2,b)}$ denotes the 3-tuple ${\displaystyle A}$ such that ${\displaystyle A{1}=b,A{2}=2,A{3}=b}$.
The above notations ${\displaystyle \textstyle \bigcup {A\in {\mathcal {S}}}A}$ and ${\displaystyle \textstyle \bigcap {A\in {\mathcal {S}}}A}$ are commonly replaced with a notation involving indexed families, namely ${\displaystyle \bigcup {i\in {\mathcal {I}}}A{i}=\{x\mid (\exists i\in {\mathcal {I}})\;x\in A{i}\}}$ and ${\displaystyle \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 ${\displaystyle {\mathcal {S}}={\mathcal {I}}}$ and ${\displaystyle i=A=A{i}}$. The formulas remain correct, even in the case where ${\displaystyle A{i}=A{j}}$ for some ${\displaystyle i\neq j}$, since ${\displaystyle A=A\cup A=A\cap A}$.
External operations
Set (mathematics)
In § 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
Given sets ${\displaystyle A}$ and ${\displaystyle B}$, their Cartesian product (or simply product), denoted ${\displaystyle A\times B}$, is the set of all ordered pairs ${\displaystyle (a,b)}$ such that ${\displaystyle a\in A}$ and ${\displaystyle b\in B}$; that is, ${\displaystyle A\times B=\{(a,b)\mid a\in A{\text{ and }}b\in B\}.}$ The definition makes sense even if ${\displaystyle A=B}$.
One can likewise define ${\displaystyle A\times B\times C}$ as a set of ordered triples ${\displaystyle (a,b,c)}$, and likewise for any finite number of sets.
In fact, the number of sets does not have to be finite. Given any indexed family of sets ${\displaystyle (A{i}){i\in I}}$, the product ${\displaystyle \prod {i\in I}A{i}}$ is the set of all indexed families of elements ${\displaystyle (a{i}){i\in I}}$ such that ${\displaystyle a{i}\in A{i}}$ for each ${\displaystyle i\in I}$. The axiom of choice implies that any product of nonempty sets is nonempty.
Set exponentiation
Given two sets ${\displaystyle E}$ and ${\displaystyle F}$, the set exponentiation, denoted ${\displaystyle F^{E}}$, is the set that has as elements all functions from ${\displaystyle E}$ to ${\displaystyle F}$.
Equivalently, ${\displaystyle F^{E}}$ can be viewed as the Cartesian product of a family, indexed by ${\displaystyle E}$, of sets that are all equal to ${\displaystyle 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
The power set of a set ${\displaystyle E}$ is the set that has all subsets of ${\displaystyle E}$ as elements, including the empty set and ${\displaystyle E}$ itself. It is often denoted ${\displaystyle {\mathcal {P}}(E)}$. For example, ${\displaystyle {\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 ${\displaystyle E}$ and the functions from ${\displaystyle E}$ to ${\displaystyle \{0,1\}}$; this correspondence associates to each subset the function that takes the value ${\displaystyle 1}$ on the subset and ${\displaystyle 0}$ elsewhere. Because of this correspondence, the power set of ${\displaystyle E}$ is commonly identified with set exponentiation: ${\displaystyle {\mathcal {P}}(E)=\{0,1\}^{E}.}$ In this notation, ${\displaystyle \{0,1\}}$ is often abbreviated as ${\displaystyle 2}$, which gives ${\displaystyle {\mathcal {P}}(E)=2^{E}.}$ In particular, if ${\displaystyle E}$ has ${\displaystyle n}$ elements, then ${\displaystyle 2^{E}}$ has ${\displaystyle 2^{n}}$ elements.
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 ${\displaystyle A}$ and ${\displaystyle B}$ is commonly denoted ${\displaystyle A\sqcup B}$ and is thus defined as ${\displaystyle A\sqcup B=\{(a,i)\mid (i=1\land a\in A)\lor (i=2\land a\in B\}.}$
If ${\displaystyle A=B}$ is a set with ${\displaystyle n}$ elements, then ${\displaystyle A\cup A=A}$ has ${\displaystyle n}$ elements, while ${\displaystyle A\sqcup A}$ has ${\displaystyle 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 ${\displaystyle \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 ${\displaystyle \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 ${\displaystyle (A{i}){i\in {\mathcal {I}}}}$, there is a natural map ${\displaystyle {\begin{aligned}\bigsqcup {i\in {\mathcal {I}}}A{i}&\to \bigcup {i\in {\mathcal {I}}}A{i}\\(a,i)&\mapsto a,\end{aligned}}}$ which consists in "forgetting" the indices.
This map is always surjective; it is bijective if and only if the ${\displaystyle A{i}}$ are pairwise disjoint, that is, all intersections of two sets of the family are empty. In this case, ${\displaystyle \textstyle \bigcup {i\in {\mathcal {I}}}A{i}}$ and ${\displaystyle \textstyle \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
Set (mathematics)
Informally, the cardinality of a set ${\displaystyle S}$, often denoted ${\displaystyle \vert S\vert }$, is the number of its members. This number is the natural number ${\displaystyle n}$ when there is a bijection between the set that is considered and the set ${\displaystyle \{1,2,\ldots ,n\}}$ of the first ${\displaystyle n}$ natural numbers. The cardinality of the empty set is ${\displaystyle 0}$. A set with the cardinality of a natural number is called a finite set, which applies in both cases. Otherwise, one has an infinite set.
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 ${\displaystyle S}$ and ${\displaystyle T}$ have the same cardinality if there exists a one-to-one correspondence (bijection) between them. This is denoted ${\displaystyle \vert S\vert =\vert T\vert }$, 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 ${\displaystyle (-1,1)}$ and the set of all real numbers have the same cardinality, a bijection being provided by the function ${\displaystyle 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 ${\displaystyle S}$ has a cardinality smaller than or equal to the cardinality of another set ${\displaystyle T}$ if there is an injection from ${\displaystyle S}$ to ${\displaystyle T}$. This is denoted ${\displaystyle \vert S\vert \leq \vert T\vert }$.
Schröder–Bernstein theorem implies that ${\displaystyle \vert S\vert \leq \vert T\vert }$ and ${\displaystyle \vert T\vert \leq \vert S\vert }$ imply ${\displaystyle \vert S\vert =\vert T\vert }$. Also, one has ${\displaystyle \vert S\vert \leq \vert T\vert }$, if and only if there is a surjection from ${\displaystyle T}$ to ${\displaystyle S}$. For every two sets ${\displaystyle S}$ and ${\displaystyle T}$, one has either ${\displaystyle \vert S\vert \leq \vert T\vert }$ or ${\displaystyle \vert T\vert \leq \vert S\vert }$. So, inequality of cardinalities is a total order.
The cardinality of the set ${\displaystyle \mathbb {N} }$ of the natural numbers, denoted ${\displaystyle \vert \mathbb {N} \vert =\aleph {0}}$, is the smallest infinite cardinality. This means that if ${\displaystyle S}$ is a set of natural numbers, then either ${\displaystyle S}$ is finite or ${\displaystyle \vert S\vert =\vert \mathbb {N} \vert }$.
Sets with cardinality less than or equal to ${\displaystyle \vert \mathbb {N} \vert =\aleph {0}}$ are called countable sets; these are either finite sets or countably infinite sets (sets of cardinality ${\displaystyle \aleph {0}}$); some authors use "countable" to mean "countably infinite". Sets with cardinality strictly greater than ${\displaystyle \aleph {0}}$ are called uncountable sets.
Cantor's diagonal argument shows that, for every set ${\displaystyle S}$, its power set (the set of its subsets) ${\displaystyle 2^{S}}$ has a greater cardinality: ${\displaystyle |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 ${\displaystyle {\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 ${\displaystyle \mathbb {R} }$ has the same cardinality of an open interval, every subset of ${\displaystyle \mathbb {R} }$ that contains a nonempty open interval also has the cardinality ${\displaystyle {\mathfrak {c}}}$.
One has ${\displaystyle {\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, ${\displaystyle {\mathfrak {c}}>\aleph {0}.}$
When published in 1878 by Georg Cantor, this result was so astonishing that it was rejected by mathematicians, and several decades were needed before its common acceptance.
It can be shown that ${\displaystyle {\mathfrak {c}}}$ is also the cardinality of the entire plane, and of any finite-dimensional Euclidean space.
The continuum hypothesis, a conjecture formulated by Georg Cantor in 1878, states that there is no set with cardinality strictly between ${\displaystyle \aleph {0}}$ and ${\displaystyle {\mathfrak {c}}}$. In 1963, Paul Cohen proved that the continuum hypothesis is independent of the axioms of Zermelo–Fraenkel set theory with the axiom of choice. This means that if the most widely used set theory is consistent (that is not self-contradictory), 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
Set (mathematics)
Informally, the axiom of choice says that, given any family of nonempty sets, one can choose simultaneously an element in each of them. 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
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 ${\displaystyle S}$ be a partial ordered set. A chain in ${\displaystyle S}$ is a subset that is totally ordered under the induced order. Zorn's lemma states that, if every chain in ${\displaystyle S}$ has an upper bound in ${\displaystyle S}$, then ${\displaystyle S}$ has (at least) a maximal element, that is, an element that is not smaller than another element of ${\displaystyle S}$.
In most uses of Zorn's lemma, ${\displaystyle 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 ${\displaystyle S}$ are linearly independent subsets of the vector space. The union of a chain of elements of ${\displaystyle 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 independent set must span the vector space because of maximality, and is therefore a basis.
Another classical use of Zorn's lemma is the proof that every proper ideal—that is, an ideal that is not the whole ring—of a ring is contained in a maximal ideal. Here, ${\displaystyle 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 ${\displaystyle 1}$ would belong to the union, and this implies that it would belong to a member of the chain.
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 ${\displaystyle n}$, the set of the ${\displaystyle 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) ${\displaystyle P(n)}$ depending on a natural number, mathematical induction is the fact that for proving that ${\displaystyle P(n)}$ is always true, it suffices to prove that for every ${\displaystyle n}$, ${\displaystyle (m<n\implies P(m))\implies P(n).}$ 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:
• ${\displaystyle P(0)}$ is true, where ${\displaystyle 0}$ denotes the least element of the well-ordered set • ${\displaystyle P(x)\implies P(S(x))}$, where ${\displaystyle S(x)}$ denotes the successor of ${\displaystyle x}$, that is the least element that is greater than ${\displaystyle x}$ • ${\displaystyle (\forall y;\;y<x\implies P(y))\implies P(x)}$, when ${\displaystyle x}$ is not a successor.
Transfinite induction is fundamental for defining ordinal numbers and cardinal numbers.