Sets – upper primary mathematics
SETS
A set is a collection of distinct objects, called elements of the set
A set can be defined by describing the contents, or by listing the elements of the set, enclosed in curly brackets.
Example 1
Some examples of sets defined by describing the contents:
- The set of all even numbers between 1 to 10 = {2, 4, 6, 8}
- Prime numbers below 20 will be {2, 3, 5, 7, 11, 13, 17}
A set simply specifies the contents; order is not important. The set represented by {1, 2, 3} is equivalent to the set {3, 1, 2}.
NOTATION
Usually, a variable isused to represent a set, to make it easier to refer to that set later.
The symbol ∈ means “is an element of”.
A set that contains no elements, { }, is called the empty set and is notated ∅
Example 2
Let A = {1, 2, 3, 4}
To notate that 2 is element of the set, we write 2 ∈ A
Sometimes a collection might not contain all the elements of a set. For example, {2, 4} is a set of even number although they are not the only even numbers. While {2, 4}is a set, we can also say it is a subset of the larger set of all even numbers.
SUBSET
A subset of a set A is another set that contains only elements from the set A, but may not contain all the elements of A.
If B is a subset of A, we write B ⊆ A
A proper subset is a subset that is not identical to the original set—it contains fewer elements.
If B is a proper subset of A, we write B ⊂ A
The number of subsets in a set are given by 2n (where n is the number of elements in that set)
Example 3
Consider these three sets:
A = the set of all even numbers
B = {2, 4, 6}
C = {2, 3, 4, 6}
Here B ⊂ A since every element of B is also an even number, so is an element of A.
More formally, we could say B ⊂ A since if x ∈ B, then x ∈ A.
It is also true that B ⊂ C.
C is not a subset of A, since C contains an element, 3, that is not contained in A
The total number of subsets that be obtained from set B are 23 = 8 since set B contains 3 elements, i.e. { }, {2}, {4}, {6}, {2,4}, {2,6}, {4,6}, and {2, 4, 6}
Union, Intersection, and Complement
UNION, INTERSECTION, AND COMPLEMENT
The union of two sets contains all the elements contained in either set (or both sets). The union is notated A ⋃ B. More formally, x ∊ A ⋃ B if x ∈ A or x ∈ B (or both)
The intersection of two sets contains only the elements that are in both sets. The intersection is notated A ⋂ B. More formally, x ∈ A ⋂ B if x ∈ A and x ∈ B.
The complement of a set A contains everything that is not in the set A. The complement is notated A’, or Ac, or sometimes ~A.
Example 4
Consider the sets:
A = {red, green, blue}
B = {red, yellow, orange}
C = {red, orange, yellow, green, blue, purple}
Find the following:
- Find A ⋃B
- Find A ⋂B
- Find Ac⋂C
Answers
- The union contains all the elements in either set: A ⋃B = {red, green, blue, yellow, and orange} Notice we only list red once.
- The intersection contains all the elements in both sets: A ⋂B = {red}
- Here we’re looking for all the elements that are notin set A and are also in C. Ac ⋂ C = {orange, yellow, purple}
Example 5
Using the sets from the example 4, find A ⋃ C and Bc ⋂ A
Answer
AUC = {red, green, blue, orange, yellow, purple}
Bc⋂A = {green, blue, purple}
Universal set
A universal set is a set that contains all the elements we are interested in. This would have to be defined by the context.
A complement is relative to the universal set, so Ac contains all the elements in the universal set that are not in A.
Example 6
- If we were discussing searching for books, the universal set might be all the books in the library.
- If we were grouping your Facebook friends, the universal set would be all your Facebook friends.
- If you were working with sets of numbers, the universal set might be all whole numbers, all integers, or all real numbers
Example 7
Suppose the universal set is U = all whole numbers from 1 to 9. If A = {1, 2, 4}, then Ac = {3, 5, 6, 7, 8, 9}.
As we saw earlier with the expression Ac ⋂ C, set operations can be grouped together.
Grouping symbols can be used like they are with arithmetic – to force an order of operations.
Example 8
Suppose H = {cat, dog, rabbit, mouse},
F = {dog, cow, duck, pig, rabbit},
and W = {duck, rabbit, deer, frog, mouse}
- Find (H ⋂F) ⋃ W
- Find H ⋂ (F⋃ W)
- Find (H ⋂F)c ⋂ W
Solutions
- We start with the intersection: H ⋂F = {dog, rabbit}. Now we union that result with W: (H ⋂ F) ⋃ W = {dog, duck, rabbit, deer, frog, mouse}
- We start with the union: F⋃ W = {dog, cow, rabbit, duck, pig, deer, frog, mouse}. Now we intersect that result with H: H ⋂ (F ⋃ W) = {dog, rabbit, mouse}
- We start with the intersection: H ⋂F = {dog, rabbit}. Now we want to find the elements of W that are not in H ⋂ (H ⋂ F)c ⋂ W = {duck, deer, frog, mouse}
VENN DIAGRAM
A Venn diagram represents each set by a circle, usually drawn inside of a containing box representing the universal set. Overlapping areas indicate elements common to both sets.
Basic Venn diagrams can illustrate the interaction of two or three sets.
Example 9
Create Venn diagrams to illustrate A ⋃ B, A ⋂ B, and Ac ⋂ B
(i) A ⋃ B contains all elements in either
(ii)A ⋂B contains only those elements in both sets—in the overlap of the circles.
Ac will contain all elements not in the set A. Ac ⋂ B will contain the elements in set B that are not in set A.
Example 10 Create Venn diagrams to illustrate: A⋂B⋂C
Cardinality
The number of elements in a set is the cardinality of that set.
The cardinality of the set A is often notated as |A| or n(A)
Example 11
Let A = {1, 2, 3, 4, 5, 6} and B = {2, 4, 6, 8}.
What is the cardinality of B? A ⋃ B, A ⋂ B?
Answers
The cardinality of B is 4, since there are 4 elements in the set.
The cardinality of A ⋃ B is 7, since A ⋃ B = {1, 2, 3, 4, 5, 6, 8}, which contains 7 elements.
The cardinality of A ⋂ B is 3, since A ⋂ B = {2, 4, 6}, which contains 3 elements.