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 geometric shapes, variables, or even other sets. [5] 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. [5]
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 —meaning that it is the result of an endless process—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 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." [6]
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.
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. [5] [7] 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. [8] [9] [10]
If is an element of a set , one says that belongs to or is in, and this is written as . [11] The statement " is not in " is written as , which can also be read as "y is not in B". [12] [13] For example, if is the set of the integers, one has and . 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). [14] 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 , [a] or [17] [18] A singleton is a set with exactly one element. [b] If is this element, the singleton is denoted If is itself a set, it must not be confused with For example, is a set with no elements, while is a singleton with as its unique element.
A set is finite if there exists a natural number such that the first natural numbers can be put in one to one correspondence with the elements of the set. In this case, one says that is the number of elements of the set. A set is infinite if such an does not exist. The empty set is a finite set with elements.
The natural numbers form an infinite set, commonly denoted . Other examples of infinite sets include number sets that contain the natural numbers, real vector spaces, curves and most sorts of spaces.
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 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. [19] [20] [21] [22] [23] For example, one knows that and denote sets and not tuples because of the enclosing braces.
Above notations and 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, [24] [25] [26]
When there is a clear pattern for generating all set elements, one can use ellipses for abbreviating the notation, [27] [28] such as in for the positive integers not greater than .
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 specifies a set as being the set of all elements that satisfy some logical formula. [29] [30] [31] More precisely, if is a logical formula depending on a variable , which evaluates to true or false depending on the value of , then or [32] denotes the set of all for which is true. [8] For example, a set F can be specified as follows: In this notation, the vertical bar "|" is read as "such that", and the whole formula can be read as "F is the set of all n such that n is an integer in the range from 0 to 19 inclusive".
Some logical formulas, such as or 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 that must contain all elements of the specified set, and write the notation as or
One may also define 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 . This amounts to say that is implicit in set-builder notation. In this case, 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.
A subset of a set is a set such that every element of is also an element of . [33] If is a subset of , one says commonly that is contained in , contains, or is a superset of . This denoted and . However many authors use and instead. The definition of a subset can be expressed in notation as
A set is a proper subset of a set if and . This is denoted and . When is used for the subset relation, or in case of possible ambiguity, one uses commonly and . [34]
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, A ⊆ B and B ⊆ A is equivalent to A = B. [30] [8] The empty set is a subset of every set: ∅ ⊆ A. [17]
Examples:
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. [35]
The main basic operations on sets are the following ones.
The intersection of two sets and is a set denoted whose elements are those elements that belong to both and . That is, where 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 , intersection has as identity element.
If is a nonempty set of sets, its intersection, denoted is the set whose elements are those elements that belong to all sets in . That is,
These two definitions of the intersection coincide when has two elements.
The union of two sets and is a set denoted whose elements are those elements that belong to or or both. That is, where 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 is a set of sets, its union, denoted is the set whose elements are those elements that belong to at least one set in . That is,
These two definitions of the union coincide when has two elements.
The set difference of two sets and , is a set, denoted or , whose elements are those elements that belong to , but not to . That is, where denotes the logical and.
When the difference is also called the complement of in . When all sets that are considered are subsets of a fixed universal set, the complement is often called the absolute complement of .
The symmetric difference of two sets and , denoted , is the set of those elements that belong to A or B but not to both:
The set of all subsets of a set is called the powerset of , often denoted . The powerset is an algebraic structure whose main operations are union, intersection, set difference, symmetric difference and absolute complement (complement in ).
The powerset is a Boolean ring that has the symmetric difference as addition, the intersection as multiplication, the emptyset as additive identity, as multiplicative identity, and complement as additive inverse.
The powerset is also a Boolean algebra for which the join is the union , the meet is the intersection , 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.
A function from a set A—the domain—to a set B—the codomain—is a rule that assigns to each element of A a unique element of B. For example, the square function maps every real number x to 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.
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 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 .
When the index set is , an indexed family is called an ordered pair. When the index set is the set of the first natural numbers, an indexed family is called an -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, denotes the 3-tuple such that .
The above notations and are commonly replaced with a notation involving indexed families, namely and
The formulas of the above sections are special cases of the formulas for indexed families, where and . The formulas remain correct, even in the case where for some , since
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.
The Cartesian product of two sets has already be used for defining functions.
Given two sets and , their Cartesian product, denoted is the set formed by all ordered pairs such that and ; that is,
This definition does not supposes that the two sets are different. In particular,
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: 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.
Given two sets and , the set exponentiation, denoted , is the set that has as elements all functions from to .
Equivalently, can be viewed as the Cartesian product of a family, indexed by , of sets that are all equal to . This explains the terminology and the notation, since exponentiation with integer exponents is a product where all factors are equal to the base.
The power set of a set is the set that has all subsets of as elements, including the emptyset and itself. [30] It is often denoted . For example,
There is a natural one-to-one correspondence (bijection) between the subsets of and the functions from to ; this correspondence associates to each subset the function that takes the value on the subset and elsewhere. Because of this correspondence, the power set of is commonly identified with a set exponentiation: In this notation, is often abbreviated as , which gives [30] [36] In particular, if has elements, then has elements. [37]
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 and is commonly denoted and is thus defined as
If is a set with elements, then has elements, while has 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
The disjoint union is the coproduct in the category of sets. Therefore the notation is commonly used.
Informally, the cardinality of a set S, often denoted |S|, is the number of its members. [38]
This number is the natural number when there is a bijection between the set that is considered and the set of the first natural numbers. The cardinality of the empty set is . [39] In both cases, the set is said to be a finite set. 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.
The list of elements of some sets is endless, or infinite . For example, the set of natural numbers is infinite. [30] In fact, all the special sets of numbers mentioned in the section above are infinite. An infinite set has an 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. [40] 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 ); 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. [41]
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. [42] 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. [43] (ZFC is the most widely-studied version of axiomatic set theory.)
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. [44] [45]
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:
The concept of a set emerged in mathematics at the end of the 19th century. [46] The German word for set, Menge, was coined by Bernard Bolzano in his work Paradoxes of the Infinite . [47] [48] [49]
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: [50] [1]
A set is a gathering together into a whole of definite, distinct objects of our perception or our thought—which are called elements of the set.
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): [51]
When mathematicians deal with what they call a manifold, aggregate, Menge, ensemble, or some equivalent name, it is common, especially where the number of terms involved is finite, to regard the object in question (which is in fact a class) as defined by the enumeration of its terms, and as consisting possibly of a single term, which in that case is the class.
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. [11] As a consequence, e.g. {2, 4, 6} and {4, 6, 4, 2} represent the same set. Unlike sets, multisets can be distinguished by the number of occurrences of an element; e.g. [2, 4, 6] and [4, 6, 4, 2] represent different multisets, while [2, 4, 6] and [6, 4, 2] are equal. Tuples can even be distinguished by element order; e.g. (2, 4, 6) and (6, 4, 2) 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:
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.
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. [52] 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. [53]
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.Here: p.85
{{cite journal}}
: CS1 maint: DOI inactive as of November 2024 (link)