maths.freeSet Theory & Logic › Sets › Set (mathematics)

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, other geometric shapes…

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, 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

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

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 ⁠\(x\)⁠ is an element of a set ⁠\(S\)⁠, one says that ⁠\(x\)⁠ belongs to ⁠\(S\)⁠ or is in ⁠\(S\)⁠, and one writes ⁠\(x\in S\)⁠. The statement "⁠\(y\)⁠ is not in ⁠\(S\,\)⁠" is written as ⁠\(y\not\in S\)⁠. For example, if ⁠\(\Z\)⁠ is the set of all integers, then ⁠\(-3\in\Z\)⁠ and ⁠\(1.5 \not\in \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 ⁠\(\varnothing\)⁠, ⁠\(\empty\)⁠, or ⁠\(\{\,\}\)⁠.

A singleton is a set with exactly one element. If ⁠\(x\)⁠ is this element, the singleton is denoted ⁠\(\{x\}\)⁠. The sets ⁠\(\{\empty\}\)⁠ and ⁠\(\empty\)⁠ are different, because the former has one element (namely, ⁠\(\empty\)⁠) and the latter has no elements at all.

A set is finite if there exists a natural number ⁠\(n\)⁠ such that the first ⁠\(n\)⁠ natural numbers can be put in bijection (one-to-one correspondence) with the elements of the set. In this case, one says that ⁠\(n\)⁠ is the number of elements of the set. A set is infinite if such an ⁠\(n\)⁠ does not exist. The empty set is a finite set with ⁠\(0\)⁠ elements.

The natural numbers form an infinite set, commonly denoted ⁠\(\N\)⁠. Other examples of infinite sets include the integers (⁠\(\Z\)⁠), the rational numbers (⁠\(\Q\)⁠), the real numbers (⁠\(\R\)⁠), nonzero real vector spaces, curves, and most other mathematical spaces.

Specifying a set

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 ⁠\(\{4, 2, 1, 3\}\)⁠ and ⁠\(\{\text{blue, white, red}\}\)⁠ denote sets and not tuples because of the enclosing braces.

The notations ⁠\(\{\,\}\)⁠ for the empty set and ⁠\(\{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, \[\{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, \(\{1,2,3,\ldots,10\}\) is a shorthand for ⁠\(\{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 \[\{\ldots, -3, -2, -1, 0, 1, 2, 3, \ldots\}\] or \[\{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 ⁠\(P(x)\)⁠ is a logical formula depending on a variable ⁠\(x\)⁠, which evaluates to true or false depending on the value of ⁠\(x\)⁠, then \[\{x \mid P(x)\}\] or \[\{x : P(x)\}\] denotes the set of all ⁠\(x\)⁠ for which ⁠\(P(x)\)⁠ is true. For example, a set ⁠\(F\)⁠ can be specified as follows: \[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 "⁠\(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 ⁠\(\color{red}{S \text{ is a set} }\)⁠ or ⁠\(\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 ⁠\(U\)⁠ that must contain all elements of the specified set, and write the notation as \[\{x\mid x\in U \text{ and ...}\}\] or \[\{x\in U\mid \text{ ...}\}.\]

One may also define ⁠\(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 ⁠\(U\)⁠. This amounts to saying that ⁠\(x\in U\)⁠ is implicit in set-builder notation. In this case, ⁠\(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 \[\{x\mid x\not\in \Q\}\] is an abbreviation of \[\{x\in \R \mid x\not\in \Q\},\] which defines the irrational numbers.

Subsets

A subset of a set ⁠\(B\)⁠ is a set ⁠\(A\)⁠ such that every element of ⁠\(A\)⁠ is also an element of ⁠\(B\)⁠. The following are different ways of expressing the same thing:

  • ⁠\(A\)⁠ is a subset of ⁠\(B\)⁠,
  • ⁠\(\forall x\; (x\in A \implies x\in B)\)⁠,
  • ⁠\(A\)⁠ is contained in ⁠\(B\)⁠,
  • ⁠\(A\subseteq B\)⁠,
  • ⁠\(B\)⁠ is a superset of ⁠\(A\)⁠,
  • ⁠\(B\)⁠ contains ⁠\(A\)⁠,
  • ⁠\(B\supseteq A\)⁠.

The relationship between sets established by ⊆ is called inclusion or containment.

A set ⁠\(A\)⁠ is a proper subset of a set ⁠\(B\)⁠ if ⁠\(A \subseteq B\)⁠ and ⁠\(A\neq B\)⁠; to denote this, one writes ⁠\(A\subsetneq B\)⁠, or ⁠\(A\subsetneqq B\)⁠. Likewise, one may write ⁠\(B\supsetneq A\)⁠ or ⁠\(B\supsetneqq A\)⁠.

The notation ⁠\(A\subset B\)⁠ often means ⁠\(A\subseteq B\)⁠, but some authors use ⁠\(A\subset B\)⁠ to mean ⁠\(A\subsetneq B\)⁠. To avoid ambiguity, one can write ⁠\(A\subseteq B\)⁠ or ⁠\(A\subsetneq B\)⁠, depending on what is intended.

Examples

  • The set of all humans is a proper subset of the set of all mammals.
  • ⁠\(\{ 1, 3 \} \subset \{ 1, 2, 3, 4 \}\)⁠
  • ⁠\(\{ 1, 2, 3, 4 \} \subseteq \{ 1, 2, 3, 4 \}\)⁠

Properties of containment

  • Two sets are equal if and only if they contain each other: ⁠\(A = B\)⁠ is equivalent to (⁠\(A \subseteq B\)⁠ and ⁠\(B \subseteq A\)⁠).
  • The empty set is a subset of every set: ⁠\(\forall A, \varnothing \subseteq A\)⁠ .

Basic operations

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 two sets ⁠\(A\)⁠ and ⁠\(B\)⁠ is a set denoted ⁠\(A \cap B\)⁠ whose elements are those elements that belong to both ⁠\(A\)⁠ and ⁠\(B\)⁠. That is, \[A \cap B=\{x\mid x\in A \land x\in B\},\] where ⁠\(\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 ⁠\(\mathcal S\)⁠ is a nonempty set of sets, its intersection, denoted \(\bigcap_{A\in \mathcal S} A,\) is the set whose elements are those elements that belong to all sets in ⁠\(\mathcal S\)⁠. That is, \[\bigcap_{A\in \mathcal S} A =\{x\mid (\forall A\in \mathcal S)\; x\in A\}.\] Example: If \(\mathcal S = \{X,Y\}\), then \(\bigcap_{A\in \mathcal S} A = X \cap Y\).

Union

The union of two sets ⁠\(A\)⁠ and ⁠\(B\)⁠ is a set denoted ⁠\(A \cup B\)⁠ whose elements are those elements that belong to ⁠\(A\)⁠ or ⁠\(B\)⁠ or both. That is, \[A \cup B=\{x\mid x\in A \lor x\in B\},\] where ⁠\(\lor\)⁠ denotes the logical or.

Union is associative and commutative.

If ⁠\(\mathcal S\)⁠ is a set of sets, its union, denoted \(\bigcup S = \bigcup_{A\in \mathcal S} A,\) is the set whose elements are those elements that belong to at least one set in ⁠\(\mathcal S\)⁠. That is, \[\bigcup_{A\in \mathcal S} A =\{x\mid (\exists A\in \mathcal S)\; x\in A\}.\] Example: If \(\mathcal S = \{X,Y\}\), then \(\bigcup_{A\in \mathcal S} A = X \cup Y\).

Set difference

The set difference of two sets ⁠\(A\)⁠ and ⁠\(B\)⁠, is a set, denoted ⁠\(A \setminus B\)⁠ or ⁠\(A - B\)⁠, whose elements are those elements that belong to ⁠\(A\)⁠, but not to ⁠\(B\)⁠. That is, \[A \setminus B=\{x\mid x\in A \land x\not\in B\},\] where ⁠\(\land\)⁠ denotes the logical and.

When ⁠\(B\subseteq A\)⁠ the difference ⁠\(A \setminus B\)⁠ is also called the complement of ⁠\(B\)⁠ in ⁠\(A\)⁠. When all sets that are considered are subsets of a fixed universal set ⁠\(U\)⁠, the complement ⁠\(U \setminus A\)⁠ is often called the absolute complement of ⁠\(A\)⁠.

The symmetric difference of two sets ⁠\(A\)⁠ and ⁠\(B\)⁠, denoted ⁠\(A\,\Delta\,B\)⁠, is the set of those elements that belong to ⁠\(A\)⁠ or ⁠\(B\)⁠ but not to both: \[A\,\Delta\,B = (A \setminus B) \cup (B \setminus A).\]

Algebra of subsets

The set of all subsets of a set ⁠\(U\)⁠ is called the powerset of ⁠\(U\)⁠, often denoted ⁠\(\mathcal P(U)\)⁠. The powerset is an algebraic structure whose main operations are union, intersection, set difference, symmetric difference and absolute complement (complement in ⁠\(U\)⁠).

The powerset is a Boolean ring that has symmetric difference as addition, intersection as multiplication, the empty set as additive identity, ⁠\(U\)⁠ as multiplicative identity, and the subset itself as the additive inverse.

The powerset is also a Boolean algebra for which the join ⁠\(\lor\)⁠ is the union ⁠\(\cup\)⁠, the meet ⁠\(\land\)⁠ is the intersection ⁠\(\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.

Ugbu a ị Enweghị kalkulata na-ewepụ nke a, ma ọ bụ na ọ nwere ike ijikwa ya. Jiri otu n'okpuru, mọọbụ pịa nke gị.

Kwụsị ọrụ gị

Akwụkwọ ndebanye n'efu na-egbakwunye ntọala n'ụdị ọmụmụ ihe ọbụla, ndepụta nke ihe ị ga-eme, nsogbu ị ga-ewepụ n'otu ebe, na onye nkụzi ị ga-ajụ banyere ihuakwụkwọ a. Akwụkwọ ndepụta ihe bụ nke ọbụla mepere maka onye ọbụla, ọbụla ma ọ bụ na ọ bụghị.

Akaụntụ Nbanye

Aịkọn ndị ahụ ejirila ebe a

Tinye ọbụla simbụl maka nkọwa zuru ezu, inyogo, na ihe ọbụla ọbụla na-egosi.

Ajụjụ ndị mmadụ jụrụ

Are some infinities bigger than others?

Yes. The integers and the rationals can be listed; the real numbers cannot (Cantor's diagonal argument), so there are strictly more reals than integers.

What is the difference between a relation and a function?

A relation pairs inputs with outputs freely; a function is a relation in which every input gets exactly one output.

Oge nke ihuakwụkwọ a bụ nke a gbanwere site na Wikipedia (CC BY-SA 4.0). E kọwaara ya na ebe a; nsogbu bụ nke anyị.

Oge Set Theory & Logic