Let \(A\) and \(B\) be sets. The intersection of \(A\) and \(B\) (denoted by \(A \cap B\)) is the set of all elements that are in both \(A\) and \(B\text{.}\) That is, \(A \cap B = \{x:x \in A \textrm{ and } x \in B\}\text{.}\)
Solving a system of simultaneous equations such as \(x + y = 7\) and \(x - y = 3\) can be viewed as an intersection. Let \(A = \{(x,y): x + y = 7, x,y \in \mathbb{R}\}\) and \(B = \{(x,y): x - y = 3, x,y\in \mathbb{R}\}\text{.}\) These two sets are lines in the plane and their intersection, \(A \cap B = \{(5, 2)\}\text{,}\) is the solution to the system.
Let \(A\) and \(B\) be sets. The union of \(A\) and \(B\) (denoted by \(A \cup B\)) is the set of all elements that are in \(A\) or in \(B\) or in both A and B. That is, \(A\cup B= \{x:x \in A\textrm{ or } x\in B\}\text{.}\)
It is important to note in the set-builder notation for \(A\cup B\text{,}\) the word βorβ is used in the inclusive sense; it includes the case where \(x\) is in both \(A\) and \(B\text{.}\)
Frequently, when doing mathematics, we need to establish a universe or set of elements under discussion. For example, the set \(A = \{x : 81x^4 -16 = 0 \}\) contains different elements depending on what kinds of numbers we allow ourselves to use in solving the equation \(81 x^4 -16 = 0\text{.}\) This set of numbers would be our universe. For example, if the universe is the integers, then \(A\) is empty. If our universe is the rational numbers, then \(A\) is \(\{2/3, -2/3\}\) and if the universe is the complex numbers, then \(A\) is \(\{2/3, -2/3, 2i/3, - 2i/3\}\text{.}\)
The universe, or universal set, is the set of all elements under discussion for possible membership in a set. We normally reserve the letter \(U\) for a universe in general discussions.
Subsection1.2.2Set Operations and their Venn Diagrams
When working with sets, as in other branches of mathematics, it is often quite useful to be able to draw a picture or diagram of the situation under consideration. A diagram of a set is called a Venn diagram. The universal set \(U\) is represented by the interior of a rectangle and the sets by disks inside the rectangle.
A two set Venn Diagram for union consisting of two overlapping circles with the part of the plane that is contained in either of the circles shaded to represent the union.
In a Venn diagram, the region representing \(A \cap B\) does not appear empty; however, in some instances it will represent the empty set. The same is true for any other region in a Venn diagram.
Let \(A\) and \(B\) be sets. The complement of \(A\) relative to \(B\) (notation \(B - A\)) is the set of elements that are in \(B\) and not in \(A\text{.}\) That is, \(B-A=\{x: x\in B \textrm{ and } x\notin A\}\text{.}\) If \(U\) is the universal set, then \(U-A\) is denoted by \(A^c\) and is called simply the complement of \(A\text{.}\)\(A^c=\{x\in U : x\notin A\}\text{.}\)
A two set Venn Diagram for intersection consisting of two overlapping circles with the part of the plane that is contained in the circle labeled A but not in the circle labeled B shaded to represent the set difference A minus B.
A one set Venn Diagram for the complement of a set A consisting of a circle with the part of the plane that is not contained in the circle shaded to represent the set complement.
Let \(A\) and \(B\) be sets. The symmetric difference of \(A\) and \(B\) (denoted by \(A\oplus B\)) is the set of all elements that are in \(A\) and \(B\) but not in both. That is, \(A \oplus B = (A \cup B) - (A \cap B)\text{.}\)
To work with sets in Sage, a set is an expression of the form Set(list). By wrapping a list with Set( ), the order of elements appearing in the list and their duplication are ignored. For example, L1 and L2 are two different lists, but notice how as sets they are considered equal:
The standard set operations are all methods and/or functions that can act on Sage sets. You need to evaluate the following cell to use the subsequent cell.
Symmetric difference and set complement are defined as βmethodsβ in Sage. Here is how to compute the symmetric difference of \(A\) with \(B\text{,}\) followed by their differences.
Let \(A = \{0, 2, 3\}\text{,}\)\(B = \{2, 3\}\text{,}\)\(C = \{1, 5, 9\}\text{,}\) and let the universal set be \(U = \{0, 1, 2, . . . , 9\}\text{.}\) Determine:
Let \(A\text{,}\)\(B\text{,}\) and \(C\) be as in Exercise 1, let \(D = \{3, 2\}\text{,}\) and let \(E = \{2, 3, 2\}\text{.}\) Determine which of the following are true. Give reasons for your decisions.
Suppose that \(U\) is an infinite universal set, and \(A\) and \(B\) are infinite subsets of \(U\text{.}\) Answer the following questions with a brief explanation.
Given that \(U\) = all students at a university, \(D\) = day students, \(M\) = mathematics majors, and \(G\) = graduate students. Draw Venn diagrams illustrating this situation and shade in the following sets:
Let the sets \(D\text{,}\)\(M\text{,}\)\(G\text{,}\) and \(U\) be as in exercise 7. Let \(\lvert U \rvert = 16,000\text{,}\)\(\lvert D \rvert = 9,000\text{,}\)\(|M|=
300\text{,}\) and \(\lvert G \rvert = 1,000\text{.}\) Also assume that the number of day students who are mathematics majors is 250, 50 of whom are graduate students, that there are 95 graduate mathematics majors, and that the total number of day graduate students is 700. Determine the number of students who are: