1.2: Sets and Set Notation
Sets
A set is a well-defined collection of objects called the set's elements .
Here, "well-defined" means that someone has defined a rule or explicitly given written a set so that there is no misunderstanding as to what elements belong to the set.
- The Verbal Method: Use a sentence to define a set.
- The Roster Method: Begin with a left brace, \( \{ \), list each element of the set only once , and then end with a right brace, \( \} \).
-
The Set-Builder Method:
A combination of the verbal and roster methods using a
dummy variable
such as \(x\). Set-builder notation is written as \( \{ x \mid \, \text{condition on } x \} \) and is read as\[ \begin{array}{ccccc}
\{ & x & \mid & \text{condition on }x & \} \\[6pt]
\uparrow & \uparrow & \uparrow & \uparrow & \uparrow \\[6pt]
\text{The set of} & x & \text{such that} & \text{condition on }x & \left( \text{this closing brace lets us know we are done defining the set} \right) \\[6pt]
\end{array} \nonumber \]
Let \(S\) be the set described verbally as the set of letters that make up the word "smolko".
- Create a description of \( S \) using roster notation.
- Create a desctiption of \( S \) using set-builder notation.
- Solution
-
- A description of \(S\) using roster notation would be \(\left\{ s, m, o, l, k \right\}\). We listed "o" only once, even though it appears twice in "smolko". Also, the order of the elements doesn't matter, so \(\left\{ k, l, m, o, s \right\}\) is also a roster description of \(S\).
- A description of \(S\) using set-builder notation is:\[\{ x \mid x \text{ is a letter in the word "smolko".} \}. \nonumber \]Thus, we would read\[\{ x \mid x \text{ is a letter in the word "smolko".} \}. \nonumber \]as "The set of elements \(x\) such that \(x\) is a letter in the word 'smolko'."
In each of the above cases, we may use the familiar equals sign, \( = \), and write \(S = \left\{ s, m, o, l, k \right\}\) or \(\ S=\{x \mid x \text { is a letter in the word "smolko". }\}\). This way, we do not have to write out the roster or set-builder notation when referring to the set. Instead, we can just call the set \(S\). Now, clearly \(m\) is in \(S\) and \(q\) is not in \(S\); however, how do we mention this symbolically? This is where some symbols from symbolic logic and set theory creep in.
The symbol \( \in \) , read as "belongs to," is used to denote that an element belongs to a set. The symbol \( \notin \) , read as "does not belong to," explicitly states that a given element does not belong to a set.
Thus, for the set from Example \( \PageIndex{ 1 } \), we write \(m \in S\) and \(q \notin S\). Another way to read these is "in" and "not in" for \(\in\) and \(notin\), respectively.
Intersections and Unions of Sets
Suppose \(A\) and \(B\) are two sets.
- The intersection of \(A\) and \(B\): \(A \cap B = \{ x \mid x \in A \text{ and } x \in B \}\)
- The union of \(A\) and \(B\): \(A \cup B = \{ x \mid x \in A \text{ or } x \in B \text{ (or both)} \}\)
Said differently, the intersection of two sets is the overlap of the two sets – the elements that the sets have in common. The union of two sets consists of the totality of the elements in each set collected together. See Figure \( \PageIndex{1} \) below.
Figure \( \PageIndex{1} \): A Venn Diagram of the sets \( A \) (the leftmost ellipse) and \( B \) (the rightmost ellipse). The intersection, \( A \cap B \), is the white region. The union, \( A \cup B \), is the combination of the yellow, white, and blue regions.
Let \(A = \{ 1,2,3 \}\) and \(B = \{2,4,6 \}\).
- Find \( A \cap B \).
- Find \( A \cup B \).
- Solution
-
- The only element that appears simultaneously in both sets is \( 2 \). Therefore, \( A \cap B = \{ 2 \} \).
- The union of these two sets is the collection of all elements from the sets,\[ \{1, 2, 3, 4, 6 \}. \nonumber \]Note that we do not write \( 2 \) twice, despite it appearing in \( A \) and \( B \). With roster notation, you do not write duplicates.