A set
A set is a collection of distinct objects, called its elements or members. Sets are named with capital letters, and a set can be written by listing its elements inside curly brackets: A = {2, 4, 6, 8}.
The order of the list does not matter, so {8, 6, 4, 2} is the same set. Nothing is counted twice, so {1, 2, 2} is just {1, 2}. The symbol means "is an element of": , and because 5 is not in A. The number of elements is written n(A), so n(A) = 4.
The set A drawn as a circle, with its four elements 2, 4, 6 and 8 inside it.
The universal set
Every set question is about some collection of things: the students in a class, the outcomes of a dice roll, the whole numbers from 1 to 10. That collection is the universal set, everything under discussion, written or U. In a Venn diagram it is the box around the circles.
Here let be the whole numbers from 1 to 10. Then , and the 6 numbers 1, 3, 5, 7, 9 and 10 sit in the box outside A.
The box is the universal set: 10 numbers, 4 of them in A and 6 outside it.
A second set
Now add B = {1, 2, 3, 4, 5}, a second set inside the same universal set. Two of the elements of A, 2 and 4, are in B as well, so the circles overlap, and 2 and 4 go where they cross.
The two circles cut the box into four regions, and each of the 10 numbers goes in exactly one of them: 6 and 8 in A only, 2 and 4 in both, 1, 3 and 5 in B only, and 7, 9 and 10 in neither.
A = {2, 4, 6, 8} and B = {1, 2, 3, 4, 5} inside the whole numbers 1 to 10. Each number is written in the one region it belongs to.
Intersection
The intersection of A and B, written , is the set of elements in A and in B at the same time. Here {2, 4}, and . On the diagram it is the overlap of the circles.
shaded: the overlap, holding 2 and 4.
Union
The union of A and B, written , is the set of elements in A or in B or in both. Here {1, 2, 3, 4, 5, 6, 8}, and . On the diagram it is everything inside either circle.
In everyday English "or" sometimes leaves out both: "tea or coffee" can mean one and not the other. In set notation "or" always includes both. That is why 2 and 4 are in the union.
n(A) + n(B) = 4 + 5 = 9 is more than 7, because 2 and 4 were counted once in A and again in B. Take the overlap off once: 4 + 5 − 2 = 7.
shaded: everything inside either circle, the 7 numbers 1, 2, 3, 4, 5, 6 and 8.
The complement
The complement of A, written A', is everything in the universal set that is not in A. Here A' = {1, 3, 5, 7, 9, 10}, and n(A') = 10 − 4 = 6. The complement depends on the universal set: if were the whole numbers from 1 to 20, A' would have 16 elements.
A' shaded: the 6 numbers in the box outside the circle.
Naming any region
The symbols combine to name every region. "In A and not in B" is {6, 8}. "In B and not in A" is {1, 3, 5}. "In neither" is everything outside the union, {7, 9, 10}.
Check that the four regions use up the universal set: 2 + 2 + 3 + 3 = 10.
shaded: the numbers in neither set, 7, 9 and 10.
The empty set, and describing a set by a rule
A set with no elements is the empty set, written or {}. With C = {7, 9}, nothing is in both A and C, so . Two sets with an empty intersection are called disjoint, and their circles share no elements.
A long or endless set is described by a rule instead of a list. {x : x is an even whole number} is read "the set of all x such that x is an even whole number", and {x : x > 3} is every number greater than 3.
The usual mistakes
Mixing up and . is "and", the overlap only; is "or", everything in either circle. The union is never smaller than the intersection.
Leaving "both" out of the union. contains the elements in both sets as well as those in just one.
Calling everything under discussion the union. The universal set also contains the elements outside both circles.
Counting the overlap twice. is not n(A) + n(B) unless the sets are disjoint.
Two mailing lists
In the application below, the customers of a shop are the universal set, and the two mailing lists are A and B. The emails sent go to , and the customers who get none are .
Worked example: Two Mailing Lists Merged, So That No Customer Receives the Same Email Twice
Question A shop has 2500 customers on its records. 1240 of them are on the newsletter list A and 860 are on the events list B. 310 customers are on both lists. The shop sends one email to every customer on at least one list, and no customer receives it twice. (a) How many emails does the shop send? (b) Find n((A ∪ B)'), the number of customers who receive no email.
1.In set notation, n(ξ) = 2500, n(A) = 1240, n(B) = 860 and n(A ∩ B) = 310.
The universal set is the 2500 customers, and the 310 on both lists go in the overlap. 2.Fill the Venn diagram from the overlap outwards. Newsletter only: n(A ∩ B') = 1240 − 310 = 930. Events only: n(A' ∩ B) = 860 − 310 = 550.
Take the overlap off each list: 930 on the newsletter list only and 550 on the events list only. 3.(a) The shop sends one email to each customer in A ∪ B: n(A ∪ B) = 1240 + 860 − 310 = 1790 emails.
(a) n(A ∪ B) = 1240 + 860 − 310 = 1790 emails, one for each customer on at least one list. 4.Check with the regions: 930 + 310 + 550 = 1790.
The three regions inside the circles add up to the same 1790. 5.(b) The customers outside both circles are n((A ∪ B)') = 2500 − 1790 = 710.
(b) n((A ∪ B)') = 2500 − 1790 = 710 customers receive no email.
Answer: (a) 1790 emails; (b) 710 customers
Common mistakes
- Sending 1240 + 860 = 2100 emails. The 310 customers on both lists are counted in both totals, so that plan emails each of them twice.
- Answering (b) with 2500 − 1240 − 860 = 400. Taking both lists away removes the 310 customers on both lists twice; the union, 1790, must be taken away once.