9.3: Subsets and equality of sets
Often we want to distinguish a collection of certain “special” elements within a larger set of elements.
a set whose elements are all members of another set
set \(A\) is a subset of or is contained in set \(B\)
We also sometimes use the phrase “contained in” to mean an object is an element of a set.
To demonstrate \(A\subseteq B\text{,}\) prove \((\forall x)(x \in A \rightarrow x \in B)\text{.}\)
- Every natural number is an integer, so \(\mathbb{N} \subseteq \mathbb{Z}\text{.}\) To emphasize this, we could write \(\mathbb{N} = \{m \in \mathbb{Z} \vert m \ge 0 \}\text{.}\)
- Every integer can be considered to be a rational number, since for every \(m\in\mathbb{Z}\) we can write \(m = \dfrac{a}{b}\) with \(a=m\) and \(b=1\text{.}\) Thus \(\mathbb{Z} \subseteq \mathbb{Q}\text{.}\)
- Every rational number can be considered to be a real number if we identify fractions with their decimal expansions via long division. Thus \(\mathbb{Q} \subseteq \mathbb{R}\text{.}\)
When we define a set by Candidate-condition notation , we first specify a pool of candidate elements, and then a condition or collection of conditions that those candidates must satisfy in order to actually be included in the set. But then every element in the set we are defining must first be from the set of candidate elements, so our defined set must be a subset of the candidate set.
For example, in Example \(\PageIndex{1}\), we provided a definition for the set \(\mathbb{N}\) in candidate-condition form where the pool of candidates is the set \(\mathbb{Z}\text{.}\) This definition makes it explicit that \(\mathbb{N} \subseteq \mathbb{Z}\text{.}\)
Prove that \(A \subseteq B\) for
\begin{align*} A & = \{ 3m + 1 \vert m \in \mathbb{Z}\}, & B & = \left \{x \in \mathbb{R} \bigg \vert \sin\left(\dfrac{\pi(x-1)}{3}\right) = 0 \right \}. \end{align*}
Solution
There are an infinite number of elements of \(A\text{,}\) so we cannot check that all elements of \(A\) are also elements of \(B\) one-by-one. Instead, we let a variable \(x\) represent an arbitrary but unspecified element of \(A\text{.}\) Since all elements of \(A\) have the form \(3m+1\) for some \(m \in \mathbb{Z}\text{,}\) we have \(x = 3m+1\) for some \(m \in \mathbb{Z}\text{.}\) Check the condition for being an element of \(B\) by calculating
\begin{equation*} \sin\left(\dfrac{\pi(x-1)}{3}\right) = \sin\left(\dfrac{\pi((3m+1)-1)}{3}\right) = \sin (m\pi) = 0. \end{equation*}
Therefore, \(x \in B\text{.}\) Since the above calculation works for every \(m \in \mathbb{Z}\text{,}\) all elements of \(A\) are elements of \(B\text{.}\)
- Every set has an empty set as a subset. That is, \(\emptyset \subseteq S\) is always true for a set \(S\text{.}\)
- Every set is a subset of itself. That is, \(S \subseteq S\) is always true for a set \(S\text{.}\)
- The subset relation is transitive . That is, whenever \(A \subseteq B\) and \(B \subseteq C\) are true, then \(A \subseteq C\) is true as well.
A look ahead. We will study abstract notions of relation and the transitive property in Chapter 17 .
write \(A = B\) if both sets consist of precisely the same elements
To demonstrate \(A = B\text{,}\) check that both \(A \subseteq B\) and \(B \subseteq A\text{.}\)
This requires two applications of the Subset Test:
- begin with the assumption \(x \in A\) and proceed to the conclusion \(x \in B\text{;}\)
- begin with the assumption \(x \in B\) and proceed to the conclusion \(x \in A\text{.}\)
One could combine both applications of the Subset Test described in the Test for Set Equality above into one biconditional: \(A = B\) is true if
\begin{equation*} (\forall x)(x \in A \Leftrightarrow x \in B) \end{equation*}
is true. If the logic of \(x \in A \rightarrow x \in B\) is easily reversed, then it makes sense to argue \(x \in A \Leftrightarrow x \in B\) instead of separately arguing \(x \in A \rightarrow x \in B\) and \(x \in B \rightarrow x \in A\text{.}\) However, in most cases separate arguments of these logical implications is preferred.
Let \(A\) and \(B\) be as in Worked Example \(\PageIndex{3}\). Prove that \(A = B\text{.}\)
Solution
Show \(A\subseteq B\). See Worked Example \(\PageIndex{3}\).
Show \(B \subseteq A\). Let \(x\) represent an arbitrary element of \(B\text{.}\) This means that
\begin{equation*} \sin\left(\dfrac{\pi(x-1)}{3}\right) = 0. \end{equation*}
However, we know from trigonometry that \(\sin \theta = 0\) if and only if \(\theta\) is an integer multiple of \(\pi\text{;}\) i.e. \(\theta = m\pi\) for some \(m \in \mathbb{Z}\text{.}\) If we set
\begin{equation*} \dfrac{\pi(x-1)}{3} = m\pi \end{equation*}
and solve for \(x\text{,}\) we get \(x = 3m+1 \in A\text{.}\)
a set contained in but not equal to another set
set \(A\) is a proper subset of set \(B\)
Some people exclude \(\emptyset\) from the definition of proper subset.
Test \(\PageIndex{3}\): For a proper subset
To demonstrate \(A \subsetneqq B\text{,}\) first test \(A \subseteq B\) as usual (Test \(\PageIndex{1}\), but also demonstrate that there exists some \(x \in B\) such that \(x \notin A\text{.}\)
We already know that \(\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}\text{,}\) but we have
- \(\mathbb{N} \subsetneqq \mathbb{Z}\text{,}\) since, for example, \(-1 \in \mathbb{Z}\) but \(-1 \notin \mathbb{N}\text{;}\)
- \(\mathbb{Z} \subsetneqq \mathbb{Q}\text{,}\) since, for example, \(\dfrac{1}{2} \in \mathbb{Q}\) but \(\dfrac{1}{2} \notin \mathbb{Z}\text{;}\) and
- \(\mathbb{Q} \subsetneqq \mathbb{R}\text{,}\) since, for example, \(\sqrt{2} \in \mathbb{R}\) but \(\sqrt{2} \notin \mathbb{Q}\text{.}\)
To show the \(A \neq B\) part of \(A\subsetneqq B\text{,}\) you only need to exhibit one example element of \(B\) which is not in \(A\text{;}\) i.e. you need to find a counterexample for the logical implication \(x \in B \rightarrow x \in A\text{.}\)