# Sets - Subsets

A **subset** is a set of elements that are also in another set. Recall that a set is a collection of distinct elements. For example, \(\{\text{cat}, \text{dog}, \text{fish}, \text{bird}\}\) is a set containing a few animals, \(\{2,4,6,8,10\}\) is a set of even numbers, and \(\{a, b, c, d\}\) is a set of letters.

For a given set \(B\), the set \(A\) is a subset of \(B\) if every element that is in \(A\) is also in \(B\). This is denoted by \( A \subseteq B \).

Here is a set \(A\) that contains all of the integers in the range 0 to 10: \(A = \{0,1,2,3,4,5,6,7,8,9,10\}\). Create a subset of \(A\), called \(B\), such that \(B\) contains all of the odd numbers of \(A\).

Select all of the odd numbers in \(A\) and add them to \(B\):

\[B = \{1,3,5,7,9\}.\]

\(B\) is a subset of \(A\) because all of the elements that are in \(B\) are also in \(A\). \(_\square\)

\(A = B\) if and only if \( A \subseteq B \) and \( B \subseteq A \).

## Proper Subsets

\(A\) is a proper subset of \(B\) if \(A\) is a subset of \(B\) and \(A\) is not equal to \(B\). This is denoted by \( A \subset B \). The empty set \(\emptyset\) is a proper subset of every non-empty set.

Subset versus proper subset:Take the following sets: \(A = \{a,b,c,d,e\}\), \(B = \{a,b,c,d,e\}\), and \(C = \{a,d,e\}\).

- \( A \subseteq B \) because every element in \(A\) is also in \(B\).
- \( B \subseteq A \) because every element in \(B\) is also in \(A\).
- \( C \subseteq A \) and \( C \subseteq B \) because every element in \(C\) is also in \(A\) and \(B\).
- \( C \subset A \) and \( C \subset B \) because all elements in \(C\) are in \(A\) and \(B\), but \(C\) is not equal to \(A\) or \(B\).

If \(A\) is not a subset of \(B\), then \(A \not\subset B\).

The following is a set describing the food available at a cafeteria. Which of the choices is a subset of the menu that contains only fruit?

\(\text{Menu} = \{\text{pizza}, \text{carrots}, \text{cheese}, \text{bananas}, \text{apples}, \text{steak}, \text{oranges}\}\)

## Calculating the Number of subsets in a Set

## What are all of the subsets of \( \{ 1, 2, 3 \} \)?

The subsets are \( \emptyset \) (the empty set), \( \{1\}, \{2\}, \{3\}, \{1,2\}, \{1,3\}, \{2,3\},\{1,2,3\} \). There are 8 of them. \( _\square \)

Note: You can use the rule of product to show that for a finite set \(A\), there are \( 2^{ |A| } \) subsets.

## If set \(A\) is the set containing the first 10 prime numbers, how many subsets does \( A \) have?

Since set \( A \) contains 10 distinct elements, we see that \( | A | = 10 \). Using the rule of product, we see that the number of subsets of \( A \) are \( 2^{|A|} = 2^{10} = 1024\). Thus, there are 1024 subsets of set \( A \). \(_\square\)