Set (mathematics)
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, geometric shapes, variables, or other sets. A set may be finite or infinite. There is a unique set with no elements, called the empty set; a set with a single element is a singleton.
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 has been the axiom system most commonly used.
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 potentialmeaning that it is the result of an endless processand 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. 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 that Cantor created for us."
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. 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. 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.If is an element of a set, one says that belongs to or is in, and this is written as. The statement " is not in " is written as, which can also be read as "y is not in S". 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. This property, called extensionality, can be written in formula as
This implies that there is only one set with no element, the empty set that is denoted, or A singleton is a set with exactly one element. If is this element, the singleton is denoted. An element of a set can be itself a set. For example, the singleton is a set that has the empty set as its only element. Since these two sets do not have the same elements, and are different sets.
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 integer numbers, rational numbers, real numbers, real vector spaces, curves and most sorts of mathematical 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. For example, one sees that and denote sets and not tuples because of the enclosing braces.The notations for the empty set and 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,
When there is a clear pattern for generating all set elements, one can use an ellipsis to abbreviate the notation; for example, is a shorthand for. Ellipses in roster notation can also be used to describe 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. More precisely, if is a logical formula depending on a variable, which evaluates to true or false depending on the value of, thenor
denotes the set of all for which is true. For example, a set can be specified as follows:
In this notation, the vertical bar "|" is read as "such that", and the whole formula can be read as " is the set of all such that 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 bar of the notation represents an element of. This amounts to saying 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.
Subsets
A subset of a set is a set such that every element of is also an element of.The following are different ways of expressing the same thing:
- is a subset of,
- ,
- is contained in,
- ,
- is a superset of,contains,
- .
A set is a proper subset of a set if and ; to denote this, one writes, or.
Likewise, one may write or.
The notation often means, but some authors use to mean.
To avoid ambiguity, one can write or, depending on what is intended.
Examples
- The set of all humans is a proper subset of the set of all mammals.
- .
Properties of containment
- Two sets are equal if and only if they contain each other: A = B is equivalent to.
- The empty set is a subset of every set:.
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.The main basic operations on sets are the following ones.
Intersection
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.
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,
Example: If, then.
Union
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.
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,
Example: If, then.
Set difference
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 or but not to both:
Algebra of subsets
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.The powerset is a Boolean ring that has symmetric difference as addition, intersection as multiplication, the empty set as additive identity, as multiplicative identity, and the subset itself as the 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 for 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
A function from a set the domainto a set the codomainis a rule that assigns to each element of a unique element of. For example, the square function maps every real number to. Functions can be formally defined in terms of sets by means of their graph, which are subsets of the Cartesian product 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 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
External operations
In, 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
The Cartesian product of two sets has already been 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 suppose that the two sets are different. In particular,
Since this definition involves a pair of indices, 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.
Set exponentiation
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.
Power set
The power set of a set is the set that has all subsets of as elements, including the empty set and itself. It is often denoted. For example,There is a natural one-to-one correspondence 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 set exponentiation:
In this notation, is often abbreviated as, which gives
In particular, if has elements, then has 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 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.
Internal disjoint union
Given an indexed family of sets, there is a natural mapwhich consists in "forgetting" the indices.
This maps is always surjective; it is bijective if and only if the are pairwise disjoint, that is, all intersections of two sets of the family are empty. In this case, and 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
Informally, the cardinality of a set, often denoted, is the number of its members. 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. 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 and have the same cardinality if there exists a one-to-one correspondence between them. This is denoted, 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 and the set of all real numbers have the same cardinality, a bijection being provided by the function.
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 has a cardinality smaller than or equal to the cardinality of another set if there is an injection from to. This is denoted.
Schröder–Bernstein theorem implies that and imply. Also, one has, if and only if there is a surjection from to. For every two sets and, one has either or. So, inequality of cardinalities is a total order.
The cardinality of the set of the natural numbers, denoted, is the smallest infinite cardinality. This means that if is a set of natural numbers, then either is finite or
Sets with cardinality less than or equal to are called countable sets; these are either finite sets or countably infinite sets ; some authors use "countable" to mean "countably infinite". Sets with cardinality strictly greater than are called uncountable sets.
Cantor's diagonal argument shows that, for every set, its power set has a greater cardinality:
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.Since, as seen above, the real line has the same cardinality of an open interval, every subset of that contains a nonempty open interval also has the cardinality.
One has
meaning that the cardinality of the real numbers equals the cardinality of the power set of the natural numbers. In particular,
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 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 and. 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, 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
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 be a partial ordered set. A chain in is a subset that is totally ordered under the induced order. Zorn's lemma states that, if every chain in has an upper bound in, then has a maximal element, that is, an element that is not smaller than another element of.
In most uses of Zorn's lemma, 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 are linearly independent subsets of the vector space. The union of a chain of elements of 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 idealthat is, an ideal that is not the whole ringof a ring is contained in a maximal ideal. Here, 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 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, and, for every, the set of the -tuples of natural numbers, with the lexicographic order.
Well-orders allow a generalization of mathematical induction, which is called transfinite induction. Given a property depending on a natural number, mathematical induction is the fact that for proving that is always true, it suffices to prove that for every,
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:
- is true, where denotes the least element of the well-ordered set
- where denotes the successor of, that is the least element that is greater than
- when is not a successor.