Skip to main content
Logo image

Section 9.3 Subsets and equality of sets

Often we want to distinguish a collection of certain “special” elements within a larger set of elements.
subset
a set whose elements are all members of another set
\(A \subseteq B\)
set \(A\) is a subset of or is contained in set \(B\)
A Venn diagram demonstrating a subset relationship
Figure 9.3.1. A Venn diagram demonstrating a subset relationship.

Warning 9.3.2.

We also sometimes use the phrase “contained in” to mean an object is an element of a set.

Example 9.3.4. Basic examples involving familiar sets of numbers.

  • Every natural number is an integer, so \(\N \subseteq \Z\text{.}\) To emphasize this, we could write \(\N = \inlinesetdef{m \in \Z}{m \ge 0}\text{.}\)
  • Every integer can be considered to be a rational number, since for every \(m\in\Z\) we can write \(m = \frac{a}{b}\) with \(a=m\) and \(b=1\text{.}\) Thus \(\Z \subseteq \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 \(\Q \subseteq \R\text{.}\)

Example 9.3.5. Candidate-condition notation always defines subsets.

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 9.3.4, we provided a definition for the set \(\N\) in candidate-condition form where the pool of candidates is the set \(\Z\text{.}\) This definition makes it explicit that \(\N \subseteq \Z\text{.}\)

Worked Example 9.3.6.

Prove that \(A \subseteq B\) for
\begin{align*} A \amp = \setdef{3m + 1}{m \in \Z}, \amp B \amp = \setdef{x \in \R}{\sin\left(\frac{\pi(x-1)}{3}\right) = 0}. \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 \Z\text{,}\) we have \(x = 3m+1\) for some \(m \in \Z\text{.}\) Check the condition for being an element of \(B\) by calculating
\begin{equation*} \sin\left(\frac{\pi(x-1)}{3}\right) = \sin\left(\frac{\pi\bbrac{(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 \Z\text{,}\) all elements of \(A\) are elements of \(B\text{.}\)

A look ahead.

We will study abstract notions of relation and the transitive property in Chapter 17.
set equality
write \(A = B\) if both sets consist of precisely the same elements

Remark 9.3.9.

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 \lgcequiv x \in B) \end{equation*}
is true. If the logic of \(x \in A \lgcimplies x \in B\) is easily reversed, then it makes sense to argue \(x \in A \lgcequiv x \in B\) instead of separately arguing \(x \in A \lgcimplies x \in B\) and \(x \in B \lgcimplies x \in A\text{.}\) However, in most cases separate arguments of these logical implications is preferred.

Worked Example 9.3.10.

Let \(A\) and \(B\) be as in Worked Example 9.3.6. Prove that \(A = B\text{.}\)
Solution.

Show \(B \subseteq A\).

Let \(x\) represent an arbitrary element of \(B\text{.}\) This means that
\begin{equation*} \sin\left(\frac{\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 \Z\text{.}\) If we set
\begin{equation*} \frac{\pi(x-1)}{3} = m\pi \end{equation*}
and solve for \(x\text{,}\) we get \(x = 3m+1 \in A\text{.}\)
proper subset
a set contained in but not equal to another set
\(A \subsetneqq B\)
set \(A\) is a proper subset of set \(B\)

Note 9.3.11.

Some people exclude \(\emptyset\) from the definition of proper subset.

Example 9.3.13. Proper subsets of number sets.

We already know that \(\N \subseteq \Z \subseteq \Q \subseteq \R\text{,}\) but we have
  1. \(\N \subsetneqq \Z\text{,}\) since, for example, \(-1 \in \Z\) but \(-1 \notin \N\text{;}\)
  2. \(\Z \subsetneqq \Q\text{,}\) since, for example, \(\frac{1}{2} \in \Q\) but \(\frac{1}{2} \notin \Z\text{;}\) and
  3. \(\Q \subsetneqq \R\text{,}\) since, for example, \(\sqrt{2} \in \R\) but \(\sqrt{2} \notin \Q\text{.}\)

Remark 9.3.14.

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 \lgcimplies x \in A\text{.}\)