In mathematics, a set is a collection of distinct objects, considered as an object in its own right. For example, the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set of size three, written {2,4,6}. The concept of a set is one of the most fundamental in mathematics. Developed at the end of the 19th century, set theory is now a ubiquitous part of mathematics, and can be used as a foundation from which nearly all of mathematics can be derived. In mathematics education, elementary topics such as are taught at a young age, while more advanced concepts are taught as part of a university degree.
The German word Menge, rendered as "set" in English, was coined by Bernard Bolzano in his work The Paradoxes of the Infinite.
Sets are conventionally denoted with capital letters. Sets A and B are equal if and only if they have precisely the same elements.
For technical reasons, Cantor's definition turned out to be inadequate; today, in contexts where more rigor is required, one can use axiomatic set theory, in which the notion of a "set" is taken as a primitive notion and the properties of sets are defined by a collection of . The most basic properties are that a set can have elements, and that two sets are equal (one and the same) if and only if every element of each set is an element of the other; this property is called the extensionality of sets.
The second way is by extension – that is, listing each member of the set. An extensional definition is denoted by enclosing the list of members in :
One often has the choice of specifying a set either intensionally or extensionally. In the examples above, for instance, A = C and B = D.
In an extensional definition, a set member can be listed two or more times, for example, {11, 6, 6}. However, per extensionality, two definitions of sets which differ only in that one of the definitions lists set members multiple times, define, in fact, the same set. Hence, the set {11, 6, 6} is exactly identical to the set {11, 6}. Moreover, the order in which the elements of a set are listed is irrelevant (unlike for a sequence or tuple). We can illustrate these two important points with an example:
For sets with many elements, the enumeration of members can be abbreviated. For instance, the set of the first thousand positive integers may be specified extensionally as
where the ellipsis ("...") indicates that the list continues in the obvious way. Ellipses may also be used where sets have infinitely many members. Thus the set of positive can be written as
The notation with braces may also be used in an intensional specification of a set. In this usage, the braces have the meaning "the set of all ...". So, E = {playing card suits} is the set whose four members are A more general form of this is setbuilder notation, through which, for instance, the set F of the twenty smallest integers that are four less than square number can be denoted
In this notation, the colon (":") means "such that", and the description can be interpreted as " F is the set of all numbers of the form n^{2} − 4, such that n is a whole number in the range from 0 to 19 inclusive." Sometimes the vertical bar ("") is used instead of the colon.
For example, with respect to the sets A = {1,2,3,4}, B = {blue, white, red}, and F = { n^{2} − 4 : n is an integer; and 0 ≤ n ≤ 19} defined above,
If A is a subset of, but not equal to, B, then A is called a proper subset of B, written A ⊊ B ( A is a proper subset of B) or B ⊋ A ( B is a proper superset of A).
The expressions A ⊂ B and B ⊃ A are used differently by different authors; some authors use them to mean the same as A ⊆ B (respectively B ⊇ A), whereas others use them to mean the same as A ⊊ B (respectively B ⊋ A).
Examples:
The empty set is a subset of every set and every set is a subset of itself:
Every set is a subset of the universal set:
An obvious but useful identity, which can often be used to show that two seemingly different sets are equal:
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.
