Set (mathematics)
Template:About Template:Short description
In mathematics, a set is a collection of different[1] things;[2][3][4] 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 geometrical shapes, variables, or even other sets.Template:Sfn 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.Template:Sfn
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 potentialTemplate:Mdashmeaning that it is the result of an endless processTemplate:Mdashand were reluctant to consider infinite sets, that is sets whose number of members is not a natural number. In particular, a line was not considered as the set of its points, but as a locus where points may be located.
The mathematical study of 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."[5]
Generally, the common usage of sets in mathematics does not requires 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.
Definitions
In mathematics, a set is a collection of different things.[1][2][3][4] 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.Template:Sfn[6] 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.[7][8][9]
If Template:Tmath is an element of a set Template:Tmath, one says that Template:Tmath belongs to Template:Tmath or is in Template:Tmath, and this is written as Template:Tmath.Template:Sfn The statement "Template:Tmath is not in Template:Tmath" is written as Template:Tmath, which can also be read as "y is not in B".[10][11] For example, if Template:Tmath is the set of the integers, one has Template:Tmath and Template:Tmath. 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).[12] This property, called extensionality, can be written in formula as This implies that there is only one set with no element, the empty set (or null set) that is denoted Template:Tmath,Template:Efn or Template:TmathTemplate:Sfn[13] A singleton is a set with exactly one element.Template:Efn If Template:Tmath is this element, the singleton is denoted Template:Tmath If Template:Tmath is itself a set, it must not be confused with Template:Tmath For example, Template:Tmath is a set with no elements, while Template:Tmath is a singleton with Template:Tmath as its unique element.
A set is finite if there exists a natural number Template:Tmath such that the Template:Tmath first natural numbers can be put in one to one correspondence with the elements of the set. In this case, one says that Template:Tmath is the number of elements of the set. A set is infinite if such an Template:Tmath does not exists. The empty set is a finite set with Template:Tmath elements. The natural numbers form an infinite set, commonly denoted Template:Tmath.
Specifying a set
Extentionality 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.[14] that specifies a set by listing its elements between braces, separated by commas.[15][16][17][18] For example, one knows that and denote sets and not tuples because of the enclosing braces.
Above notations Template:Tmath and Template:Tmath for the empty set and for a singleton are examples of roster notation.
For a set, all that matters is whether each element is in it or not; so, the set is not changed if one changes the order or repeat some elements. So, one has, for example,[19][20][21]
When there is a clear pattern for generating all set elements, one can use ellipses for abbreviating the notation,[22][23] such as in for the positive integers not greater than Template:Tmath.
Ellipses allow also expanding roster notation to some infinite sets. For example, the set of all integers can be denoted as or
Set-builder notation
Set-builder notation specifies a set as being the set of all elements that satisfy some logical formula.[24][25][26] More precisely, if Template:Tmath is a logical formula depending on a variable Template:Tmath, which evaluates to true or false depending on the value of Template:Tmath, then or[27] denotes the set of all Template:Tmath for which Template:Tmath is true.[7] For example, a set Template:Mvar can be specified as follows: In this notation, the vertical bar "|" is read as "such that", and the whole formula can be read as "Template:Mvar is the set of all Template:Mvar such that Template:Mvar is an integer in the range from 0 to 19 inclusive".
Some logical formulas, such as Template:Tmath or Template:Tmath 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 Template:Tmath that must contain all elements of the specified set, and write the notation as or
One may also define Template:Tmath once for all and take the convention that every variable that appears on the left of the vertical bat of the notation represents an element of Template:Tmath. This amounts to say that Template:Tmath is implicit in set-builder notation. In this case, Template:Tmath 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 is an abbreviation of which defines the irrational numbers.
Subsets
Template:Main A subset of a set Template:Tmath is a set Template:Tmath such that every element of Template:Tmath is also an element of Template:Tmath.[28] If Template:Tmath is a subset of Template:Tmath, one says commonly that Template:Tmath is contained in Template:Tmath, Template:Tmath contains Template:Tmath, or Template:Tmath is a superset of Template:Tmath. This denoted Template:Tmath and Template:Tmath. However many authors use Template:Tmath and Template:Tmath instead. The definition of a subset can be expressed in notation as
A set Template:Tmath is a proper subset of a set Template:Tmath if Template:Tmath and Template:Tmath. This is denoted Template:Tmath and Template:Tmath. When Template:Tmath is used for the subset relation, or in case of possible ambiguity, one uses commonly Template:Tmath and Template:Tmath.Template:Sfn
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, Template:Math and Template:Math is equivalent to A = B.[25][7] The empty set is a subset of every set: Template:Math.Template:Sfn
Examples:
- The set of all humans is a proper subset of the set of all mammals.
- Template:Math.
- Template:Math
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 Venn diagrams.[29]
The main basic operations on sets are the following ones.
Intersection
The intersection of two sets Template:Tmath and Template:Tmath is a set denoted Template:Tmath whose elements are those elements that belong to both Template:Tmath and Template:Tmath. That is, where Template:Tmath 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 Template:Tmath, intersection has Template:Tmath as identity element.
If Template:Tmath is a nonempty set of sets, its intersection, denoted is the set whose elements are those elements that belong to all sets in Template:Tmath. That is,
These two definitions of the intersection coincide when Template:Tmath has two elements.
Union

The union of two sets Template:Tmath and Template:Tmath is a set denoted Template:Tmath whose elements are those elements that belong to Template:Tmath or Template:Tmath, or both. That is, where Template:Tmath 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 Template:Tmath is a set of sets, its union, denoted is the set whose elements are those elements that belong to at least one set in Template:Tmath. That is,
These two definitions of the union coincide when Template:Tmath has two elements.
Set difference

The set difference of two sets Template:Tmath and Template:Tmath, is a set, denoted Template:Tmath or Template:Tmath, whose elements are those elements that belong to Template:Tmath, but not to Template:Tmath. That is, where Template:Tmath denotes the logical and.
When Template:Tmath the difference Template:Tmath is also called the complement of Template:Tmath in Template:Tmath. When all sets that are considered are subsets of a fixed unversal set Template:Tmath, the complement Template:Tmath is often called the absolute complement of Template:Tmath.
The symmetric difference of two sets Template:Tmath and Template:Tmath, denoted Template:Tmath, is the set of those elements that belong to Template:Mvar or Template:Mvar but not to both:
Algebra of subsets
Template:Main The set of all subsets of a set Template:Tmath is called the powerset of Template:Tmath, often denoted Template:Tmath. The powerset is an algebraic structure whose main operations are union, intersection, set difference, symmetric difference and absolute complement (complement in Template:Tmath).
The powerset is a Boolean ring that has the symmetric difference as addition, the intersection as multiplication, the emptyset as additive identity, Template:Tmath as multiplicative identity, and complement as additive inverse.
The powerset is also a Boolean algebra for which the join Template:Tmath is the union Template:Tmath, the meet Template:Tmath is the intersection Template:Tmath, 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.
Applications
Sets are ubiquitous in modern mathematics. For example, structures in abstract algebra, such as groups, fields and rings, are sets closed under one or more operations.
One of the main applications of naive set theory is in the construction of relations. A relation from a domain Template:Math to a codomain Template:Math is a subset of the Cartesian product Template:Math. For example, considering the set Template:Math of shapes in the game of the same name, the relation "beats" from Template:Math to Template:Math is the set Template:Math; thus Template:Math beats Template:Math in the game if the pair Template:Math is a member of Template:Math. Another example is the set Template:Math of all pairs Template:Math, where Template:Math is real. This relation is a subset of Template:Math, because the set of all squares is subset of the set of all real numbers. Since for every Template:Math in Template:Math, one and only one pair Template:Math is found in Template:Math, it is called a function. In functional notation, this relation can be written as Template:Math.
Euler and Venn diagrams

B is a superset of A.
An Euler diagram is a graphical representation of a collection of sets; each set is depicted as a planar region enclosed by a loop, with its elements inside. If Template:Mvar is a subset of Template:Mvar, then the region representing Template:Mvar is completely inside the region representing Template:Mvar. If two sets have no elements in common, the regions do not overlap.
A Venn diagram, in contrast, is a graphical representation of Template:Mvar sets in which the Template:Mvar loops divide the plane into Template:Math zones such that for each way of selecting some of the Template:Mvar sets (possibly all or none), there is a zone for the elements that belong to all the selected sets and none of the others. For example, if the sets are Template:Mvar, Template:Mvar, and Template:Mvar, there should be a zone for the elements that are inside Template:Mvar and Template:Mvar and outside Template:Mvar (even if such elements do not exist).
Special sets of numbers in mathematics

There are sets of such mathematical importance, to which mathematicians refer so frequently, that they have acquired special names and notational conventions to identify them.
Many of these important sets are represented in mathematical texts using bold (e.g. ) or blackboard bold (e.g. ) typeface.[30] These include
- or , the set of all natural numbers: (often, authors exclude Template:Math);[30]
- or , the set of all integers (whether positive, negative or zero): ;[30]
- or , the set of all rational numbers (that is, the set of all proper and improper fractions): . For example, Template:Math and Template:Math;[30]
- or , the set of all real numbers, including all rational numbers and all irrational numbers (which include algebraic numbers such as that cannot be rewritten as fractions, as well as transcendental numbers such as [[Pi|Template:Mvar]] and [[e (mathematical constant)|Template:Math]]);[30]
- or , the set of all complex numbers: Template:Math, for example, Template:Math.[30]
Each of the above sets of numbers has an infinite number of elements. Each is a subset of the sets listed below it.
Sets of positive or negative numbers are sometimes denoted by superscript plus and minus signs, respectively. For example, represents the set of positive rational numbers.
Functions
A function (or mapping) from a set Template:Mvar to a set Template:Mvar is a rule that assigns to each "input" element of Template:Mvar an "output" that is an element of Template:Mvar; more formally, a function is a special kind of relation, one that relates each element of Template:Mvar to exactly one element of Template:Mvar. A function is called
- injective (or one-to-one) if it maps any two different elements of Template:Mvar to different elements of Template:Mvar,
- surjective (or onto) if for every element of Template:Mvar, there is at least one element of Template:Mvar that maps to it, and
- bijective (or a one-to-one correspondence) if the function is both injective and surjective — in this case, each element of Template:Mvar is paired with a unique element of Template:Mvar, and each element of Template:Mvar is paired with a unique element of Template:Mvar, so that there are no unpaired elements.
An injective function is called an injection, a surjective function is called a surjection, and a bijective function is called a bijection or one-to-one correspondence.
Cardinality
The cardinality of a set Template:Math, denoted Template:Math, is the number of members of Template:Math.[31] For example, if Template:Math, then Template:Math. Repeated members in roster notation are not counted,[32][33] so Template:Math, too.
More formally, two sets share the same cardinality if there exists a bijection between them.
The cardinality of the empty set is zero.[34]
Infinite sets and infinite cardinality
The list of elements of some sets is endless, or infinite. For example, the set of natural numbers is infinite.[25] In fact, all the special sets of numbers mentioned in the section above are infinite. Infinite sets have infinite cardinality.
Some infinite cardinalities are greater than others. Arguably one of the most significant results from set theory is that the set of real numbers has greater cardinality than the set of natural numbers.[35] Sets with cardinality less than or equal to that of are called countable sets; these are either finite sets or countably infinite sets (sets of the same cardinality as Template:Tmath); some authors use "countable" to mean "countably infinite". Sets with cardinality strictly greater than that of are called uncountable sets.
However, it can be shown that the cardinality of a straight line (i.e., the number of points on a line) is the same as the cardinality of any segment of that line, of the entire plane, and indeed of any finite-dimensional Euclidean space.[36]
The continuum hypothesis
Template:Main The continuum hypothesis, formulated by Georg Cantor in 1878, is the statement that there is no set with cardinality strictly between the cardinality of the natural numbers and the cardinality of a straight line.[37] In 1963, Paul Cohen proved that the continuum hypothesis is independent of the axiom system ZFC consisting of Zermelo–Fraenkel set theory with the axiom of choice.[38] (ZFC is the most widely-studied version of axiomatic set theory.)
Power sets
Template:Main The power set of a set Template:Math is the set of all subsets of Template:Math.[25] The empty set and Template:Math itself are elements of the power set of Template:Math, because these are both subsets of Template:Math. For example, the power set of Template:Math is Template:Math. The power set of a set Template:Math is commonly written as Template:Math or Template:Math.[25]Template:Sfn[20]
If Template:Math has Template:Math elements, then Template:Math has Template:Math elements.Template:Sfn For example, Template:Math has three elements, and its power set has Template:Math elements, as shown above.
If Template:Math is infinite (whether countable or uncountable), then Template:Math is uncountable. Moreover, the power set is always strictly "bigger" than the original set, in the sense that any attempt to pair up the elements of Template:Math with the elements of Template:Math will leave some elements of Template:Math unpaired. (There is never a bijection from Template:Math onto Template:Math.)[39]
Partitions
A partition of a set S is a set of nonempty subsets of S, such that every element x in S is in exactly one of these subsets. That is, the subsets are pairwise disjoint (meaning any two sets of the partition contain no element in common), and the union of all the subsets of the partition is S.[40]Template:Sfn
Principle of inclusion and exclusion
The inclusion–exclusion principle is a technique for counting the elements in a union of two finite sets in terms of the sizes of the two sets and their intersection. It can be expressed symbolically as
A more general form of the principle gives the cardinality of any finite union of finite sets:
History
The concept of a set emerged in mathematics at the end of the 19th century.[41] The German word for set, Menge, was coined by Bernard Bolzano in his work Paradoxes of the Infinite.[42][43][44]
Georg Cantor, one of the founders of set theory, gave the following definition at the beginning of his Beiträge zur Begründung der transfiniten Mengenlehre:[45][1]
Bertrand Russell introduced the distinction between a set and a class (a set is a class, but some classes, such as the class of all sets, are not sets; see Russell's paradox):[46]
Naive set theory
Template:Main The foremost property of a set is that it can have elements, also called members. Two sets are equal when they have the same elements. More precisely, sets A and B are equal if every element of A is an element of B, and every element of B is an element of A; this property is called the extensionality of sets.Template:Sfn As a consequence, e.g. Template:Math and Template:Math represent the same set. Unlike sets, multisets can be distinguished by the number of occurrences of an element; e.g. Template:Math and Template:Math represent different multisets, while Template:Math and Template:Math are equal. Tuples can even be distinguished by element order; e.g. Template:Math and Template:Math represent different tuples.
The simple concept of a set has proved enormously useful in mathematics, but paradoxes arise if no restrictions are placed on how sets can be constructed:
- Russell's paradox shows that the "set of all sets that do not contain themselves", i.e., Template:Mset, cannot exist.
- Cantor's paradox shows that "the set of all sets" cannot exist.
Naïve set theory defines a set as any well-defined collection of distinct elements, but problems arise from the vagueness of the term well-defined.
Axiomatic set theory
In subsequent efforts to resolve these paradoxes since the time of the original formulation of naïve set theory, the properties of sets have been defined by axioms. Axiomatic set theory takes the concept of a set as a primitive notion.[47] The purpose of the axioms is to provide a basic framework from which to deduce the truth or falsity of particular mathematical propositions (statements) about sets, using first-order logic. According to Gödel's incompleteness theorems however, it is not possible to use first-order logic to prove any such particular axiomatic set theory is free from paradox.[48]
See also
- Algebra of sets
- Alternative set theory
- Category of sets
- Class (set theory)
- Family of sets
- Fuzzy set
- Mereology
- Principia Mathematica
Notes
References
References
External links
- Template:Wiktionaryinline
- Cantor's "Beiträge zur Begründung der transfiniten Mengenlehre" Template:In lang
Template:Set theory Template:Mathematical logic Template:Foundations-footer Template:Portal bar Template:Authority control
- ↑ 1.0 1.1 1.2 Template:Cite book Here: p.85
- ↑ 2.0 2.1 Template:Cite book
- ↑ 3.0 3.1 Template:Cite book
- ↑ 4.0 4.1 Template:Cite book
- ↑ Template:Citation
- "Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können."
- Translated in Template:Citation
- ↑ Template:Cite book
- ↑ 7.0 7.1 7.2 Template:Cite book
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite book
- ↑ Template:Cite web
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ A. Kanamori, "The Empty Set, the Singleton, and the Ordered Pair", p.278. Bulletin of Symbolic Logic vol. 9, no. 3, (2003). Accessed 21 August 2023.
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ 20.0 20.1 Template:Cite web
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ 25.0 25.1 25.2 25.3 25.4 Template:Cite book
- ↑ Template:Cite web
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ 30.0 30.1 30.2 30.3 30.4 30.5 Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite journal
- ↑ Bertrand Russell (1903) The Principles of Mathematics, chapter VI: Classes
- ↑ Template:Cite book
- ↑ Template:Cite web