Note: Some information from section 1.5 is repeated here for a refresher; however, there is new material in this section as well and the exercises are different. (See the Table of Contents.) A set is a collection of objects. The objects in a set are called its elements or members. The elements in a set can be any types of objects, including sets! The members of a set do not even have to be of the same type. For example, although it may not have any meaningful application, a set can consist of numbers and names. We usually use capital letters such as \(A\), \(B\), \(C\), \(S\), and \(T\) to represent sets, and denote their generic elements by their corresponding lowercase letters \(a\), \(b\), \(c\), \(s\), and \(t\), respectively. To indicate that \(b\) is an element of the set \(B\), we adopt the notation \(b\in B\), which means “ \(b\) belongs to \(B\)” or “ \(b\) is an element of \(B\). We designate these notations for some special sets of numbers: \[\begin \mathbb &=& \mbox, \\ \mathbb &=& \mbox, \\ \mathbb &=& \mbox, \\ \mathbb &=& \mbox. \end\] All these are infinite sets, because they all contain infinitely many elements. In contrast, finite sets contain finitely many elements.
We can use the roster notation to describe a set if we can list all its elements explicitly, as in \[A = \mbox = \.\] For sets with more elements, show the first few entries to display a pattern, and use an ellipsis to indicate “and so on.” For example, \[\<1,2,3,\ldots,20\>\] represents the set of the first 20 positive integers. The repeating pattern can be extended indefinitely, as in \[\begin \mathbb &=& \ <1,2,3,\ldots\>\\ \mathbb &=& \ <\ldots,-2,-1,0,1,2,\ldots\>\end.\] The set of even integers can be described as \(\<\ldots,-4,-2,0,2,4,\ldots\>\).
We can use a set-builder notation to describe a set. For example, the set of natural numbers is defined as \[\mathbb = \
Example \(\PageIndex<1>\label\) Write these two sets \[\
There is a slightly different format for the set-builder notation. Before the vertical bar, we describe the form the elements assume, and after the vertical bar, we indicate from where we are going to pick these elements: \[\<\,\mbox
Example \(\PageIndex<2>\label\) The set \[\ < 2n \mid n\in\mathbb\>\] describes the set of even numbers. We can also write the set as \(2\mathbb\).2>
Note If the membership is not specified, such as: \( \
An interval is a set of real numbers, all of which lie between two real numbers. Should the endpoints be included or excluded depends on whether the interval is open, closed, or half-open. We adopt the following interval notation to describe them: \[\displaylines < (a,b) = \
Example \(\PageIndex<3>\label\) Write the intervals \((2,3)\), \([2,3]\), and \((2,3]\) in the descriptive form. Solution According to the definition of an interval, we find \[\begin &=& \
Example \(\PageIndex<5>\label\) Be sure you are using the right types of numbers. Compare these two sets \[\begin S &=& \
Let \(S\) be a set of numbers; we define \[\begin
Some mathematicians also adopt these notations: \[\begin
An empty set is a set that does not contain any elements. \[\
Example \(\PageIndex<7>\label\) Determine which of these statements are true. \[\begin \
Two sets \(A\) and \(B\) are said to be equal if they contain the same collection of elements. More rigorously, we define \[A = B \Leftrightarrow \forall x \, (x \in A \Leftrightarrow x \in B).\] Since the elements of a set can themselves be sets, exercise caution and use proper notation when you compare the contents of two sets. Note: We will also use subsets for another definition for equality ofsets in the next section.
Example \(\PageIndex<9>\label\) Explain why \(\big\\big\> \neq \\). Solution The set \(\big\\big\>\) consists of two elements: the integer \(0\) and the set \(\\). The set \(\\) also consists of two elements, both of them integers; namely, 0 and 1. You may find the following analogy helpful. Imagine a set being a box. You open a box to look at its contents. The box itself can be compared to the curly braces \(\\). What it holds is exactly what we call the elements of the set it represents. The contents of the two sets \(\big\\big\>\) and \(\\) are depicted in the boxes shown in the Figure below (well, not yet - the correct figure will be inserted at a later time - see if you can use your imagination for now). (200,80) (0,0)(130,0) 2 ( 0, 0)( 0,50) 2 (1,0) 50 ( 0, 0)(50, 0) 2 (0,1) 50 ( 0,50)(50, 0) 2 (1,1) 20 (20,70) (1,0) 50 (50, 0) (1,1) 20 (70,20) (0,1) 50 (20,50) (0,1) 20 ( 0, 0, 20,20) (20,20, 70,20) (20,20, 20,50) (15,30)(25, 0) 2 (10,30) (10,15) 0 (35,30) (10,15) 1 (25,25) ( 0, 0)( 0,20) 2 (1,0) 20 ( 0, 0)(20, 0) 2 (0,1) 20 ( 0,20)(20, 0) 2 (0,0, 8,8) ( 8,28) (1,0) 20 (20, 0) (0,0, 8,8) (28, 8) (0,1) 20 ( 8,20) (0,1) 8 ( 0, 0, 8, 8) ( 8, 8, 28, 8) ( 8, 8, 8,20) When you open the first box, you find two items. One of them is the number 0; the other is another box that contains the number 1. The second box also contains two items that are both numbers. What you find in these two boxes is not the same. Hence, the sets they represent are different.9>
hands-on exercise \(\PageIndex<10>\label\) Name some differences between the sets \(\big\\big\>\) and \(\big\,\\big\>\).10>
Hence, they are not equal. Notice that \[\mathbb \neq \big\<\<\ldots,-3,-2,-1\>, \, \<1,2,3,\ldots\>\big\>\] either, because the set on the right is a set of three sets, while the set on the left is a set of integers. One has three elements; the other has infinitely many elements.
To reduce confusion, instead of saying a set of sets, we could say a collection of sets or a family of sets. For example, \[\big\<\<1,3,5,\ldots,\>, \<2,4,6,\ldots\,\>\big\>\] is a family of two sets, one of which is the set of positive odd integers; the other is the set of positive even integers.
A set is said to be finite if it has a finite number of elements. The number of elements in a finite set \(A\) is called its cardinality, and is denoted by \(|A|\). Hence, \(|A|\) is always nonnegative. If \(A\) is an infinite set, some authors would write \(|A|=\infty\); however, we will use more specific designations for the cardinality of infinite sets. More will be revealed in the next chapter about the cardinality of infinite sets.
While it is trivial that \(|\| = 4\), and \(|\| = 2\), it may not be obvious that \[\big|\big\\big\>\big| = 2,\] and \[\big|\big\<\<\ldots,-3,-2,-1\>,0,\<1,2,3,\ldots\,\>\big\>| = 3.\] What matters is the number of entries in a set, which can be compared to how many items you can find when you open a box. Here is another example: \[|\
Determine these cardinalities:
Recall that your answers should be nonnegative.
Explain why it is incorrect to say \(|\emptyset|=\emptyset\). In fact, it is nonsense to say \(|\emptyset|=\emptyset\). Explain. What should be the value of \(|\emptyset|\)?
We close this section with an important remark about sets. It follows from the definition of equality of sets that we do not count repeated elements as separate elements. For example, suppose a small student club has three officers:
chair: | Mary, |
vice chair: | John, |
secretary: | John; |
and let \(A\) represent the set of its officers, and \(B\) the set of positions in its executive board, then \(|A|=2\) and \(|B|=3\), because \[A = \< \mbox, \mbox \>,\] and \[B = \< \mbox, \mbox, \mbox\>.\]
Find the errors in the following statement: \[|\| = \ <\,|-2|,|2|\>= \ = 2,\] and correct them.
Solution
This statement contains several errors. The first mistake is assuming that we can distribute the “absolute value” symbols \(|\quad|\) over the contents of a set: \[|\| \mathbbeq \<\,|-2|,|2|\>.\] After all, the two vertical bars do not mean absolute value in this case. Instead, it means the cardinality of the set \(\\). Hence, \(|\|=2\).
The second equality \(\ <\,|-2|,|2|\>= \\) is correct. After taking absolute values, both entries become 2. However, we do not write \(\ <|-2|,|2|\>= \\), because a set should not contain repetition. Therefore, it is correct to say \(\ <\,|-2|,|2|\>= \\).
The last equality \(\=2\) is wrong. We cannot compare a set to a number. Imagine the set \(\\) as a box containing only one object, and that object is the number 2. In contrast, 2 on the right-hand side is left in the open air without any containment. It is clear that \(\ \neq 2\).
The entire statement contains multiple mistakes; some of them are syntactical errors while some are conceptual. Nevertheless, we do have \(|\|=2\). Although the final answer is correct, the argument used to obtain it is not.
In some situations, we do want to count repeated elements as separate elements, as in \(S=\\). We call such a collection a multiset instead of an ordinary set. In this case, \(|S|=8\).
Write each of these sets by listing its elements explicitly (that is, using the roster method).
Solution
Write each of the following sets in the form \(\
Solution
Solution
Remark. We cannot write (b) as \(\mathbb^3\) and (c) as \(\mathbb^2\), because \(\mathbb^3\) and \(\mathbb^2\) mean something else. If we drop 0 from (e), then \(\<4,8,12,\ldots\>=4\mathbb\). However, the inclusion of 0 makes it harder to describe (d) in the form of \(4S\).
Determine whether the following sets are empty, finite sets, or infinite sets:
Write each of these sets in the interval notation.
Solution
Is \([-\infty,\infty]\) a legitimate or correct notation? Explain.
Determine which of the following statements are true, and which are false.
Solution
(a) true (b) true (c) false (d) false (e) true (f) true
Evaluate the following expressions.
Determine which of the following statements are true, and which are false.
(a) \(2\in(2,7)\)
(b) \(\sqrt\in(1,3)\)
(c) \(\big(\sqrt\,\big)^2\in\mathbb\)
(d) \(-5\in\mathbb\) Solution
(a) false (b) true (c) true (d) false
Give examples of sets \(A\), \(B\) and \(C\) such that:
Determine whether the following statements are correct or incorrect syntactically. For those that are syntactically correct, determine their truth values; for those that are syntactically incorrect, suggest ways to fix them.
(a) It is incorrect to write (3,7]=3 (b) No, because both and ∅ are sets, so we should use an equal sign to compare them. The notation ≡ only applies to logical statements. The correct way to say it is “=∅.”
Determine whether the following statements are correct or incorrect syntactically. For those that are syntactically correct, determine their truth values; for those that are syntactically incorrect, suggest ways to fix them.
This page titled 4.1: An Introduction to Sets is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong (OpenSUNY) .