Sets

Table of Contents

1. Sets

A set is a well-defined collection of objects. These objects are known as the elements or members of a set, and they can be anything, including numbers, letters, people, cities, or even other sets.

By convention, sets are denoted using capital letters. For example, the set with the first five prime numbers is written as \(A = {2, 3, 5, 7, 11}\). If \(x\) is an element of \(A\), then we write \(x \in A\), otherwise if it is not an element of \(A\), we write \(x \not\in A\).

Two sets are said to be equal if they have the same elements, regardless of the order and repetition of the elements. For example, \({1, 2, 3} = {3, 2, 1} = {1, 1, 2, 3}\).

1.1. Cardinality

We can also talk about the cardinality of a set, which is its size. If \(A = {1, 2, 3, 4}\), then its cardinality, denoted \(|A|\), is \(4\). There is a unique set whose cardinality is zero, called the empty set, and it is denoted \(\varnothing\).

1.2. Subsets

If every element in \(A\) is also an element in \(B\), then we say that \(A\) is a subset of \(B\), written \(A \subseteq B\). Equivalently, we can also say that \(B\) is a superset of \(A\), written \(B \supseteq A\). A proper subset is a subset \(A\) that is strictly contained within a set \(B\): in other words, there is at least one element in \(B\) that is excluded from \(A\). This is written \(A \subset B\).

1.3. Intersections and Unions

The intersection of a set \(A\) with a set \(B\), written as \(A \cap B\), is the set containing all the elements that are in both \(A\) and \(B\). Two sets are said to be disjoint if \(A \cap B = \varnothing\).

The union of a set \(A\) with a set \(B\), written as \(A \cup B\), is the set containing all the elements which are either in \(A\) or in \(B\), or in both.

1.4. Complements

If \(A\) and \(B\) are two sets, then the relative complement of \(A\) in \(B\), or the set difference between \(B\) and \(A\), written as \(B - A\) or \(B \setminus A\), is the set of the elements in \(B\) that are not in \(A\). For example, if \(\mathbb{R}\) is the set of real numbers, and \(\mathbb{Q}\) is the set of rational numbers, then \(\mathbb{R} \setminus \mathbb{Q}\) is equivalent to the set of irrational numbers.

1.5. Important Sets

In mathematics, some sets are so common that they are denoted by special symbols. These include:

  1. \(\mathbb{N}\) is the set of all natural numbers.
  2. \(\mathbb{Z}\) is the set of all integers.
  3. \(\mathbb{Q}\) is the set of all rational numbers.
  4. \(\mathbb{R}\) is the set of all real numbers.
  5. \(\mathbb{C}\) is the set of all complex numbers.
Last modified: 2026-01-20 16:54