Concepts: set operations, complement and De Morgan laws
Sets24 min readLesson 4 of 7
4.1 Union and intersection
The union of A and B collects every element that lies in A, in B or in both. An element that appears in both sets is written once, not twice. The intersection of A and B keeps only the elements that lie in both.
Read the two operations with the words or and and. Union matches or in the loose mathematical sense of at least one, while intersection matches and. So A union B = {x : x in A or x in B} and A intersection B = {x : x in A and x in B}.
For A = {2, 4, 6, 8} and B = {6, 8, 10, 12}, the union is {2, 4, 6, 8, 10, 12} and the intersection is {6, 8}. If B is already a subset of A, then A union B equals A and A intersection B equals B. These two shortcut lines appear as one mark questions, so write them as rules, not as special cases.
4.2 Properties worth writing in a proof
Both operations are commutative, so the order of the two sets does not matter. Both are associative, so a chain of unions can be bracketed anywhere. The empty set acts as the identity for union, since adding nothing changes nothing, and the universal set acts as the identity for intersection, since cutting with the full frame leaves the set alone.
The distributive laws connect the two operations. Intersection distributes over union, and union distributes over intersection. A quick way to remember the direction is that the operation outside the bracket spreads over both terms inside, exactly like multiplication over addition in arithmetic.
Two absorption laws are also in the syllabus: A union (A intersection B) = A and A intersection (A union B) = A. If you draw the Venn diagram for either one, the overlapping region adds nothing new.
4.3 Difference and disjoint sets
The difference A - B keeps the elements that lie in A but not in B, and the order matters. For A = {1, 2, 3, 4, 5, 6} and B = {2, 4, 6, 8}, A - B is {1, 3, 5} while B - A is {8}. These two results are usually different, and a question that asks for both is checking exactly that.
A set difference also has a membership rule of its own: keep an element when it clears the first set's test and fails the second's. Inside the Venn diagram the rule points at the shaded part of A alone, outside the overlap.
When the intersection of two sets is empty, they are called disjoint. The sets {2, 4, 6, 8} and {1, 3, 5, 7} are disjoint because no element is common. Disjoint circles do not touch in the Venn diagram. Sets of even and odd integers are the standard example, and the standard non-example is two sets whose only common element is the number 4.
4.4 Complement
The complement of A, written A prime, contains the elements of the universal set that do not lie in A. It is the same as U - A, but the notation changes how questions are phrased. For U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and A = {1, 3, 5, 7, 9}, the complement is {2, 4, 6, 8, 10}.
Complementation has four working laws. The complement of a complement returns the original set. A set together with its complement covers the whole universal set, so their union is U. A set together with its complement has no common element, so their intersection is phi. Also the empty set and the universal set are complements of each other.
Whenever a complement question appears, write U first. Without the universal set the complement has no fixed answer, and most lost marks on this topic come from skipping that step.
Slideshow, slide 1 of 4. Use the left and right arrow keys to change slides and the space bar to play or pause.

Venn diagram with the shaded region showing A union B inside the universal set
4.5 De Morgan's laws
De Morgan's laws explain what happens when a complement crosses a union or an intersection. The complement of a union becomes the intersection of the two complements, and the complement of an intersection becomes the union of the two complements.
Both laws are easy to check with a small universal set. Take U = {1, 2, 3, 4, 5, 6}, A = {2, 3} and B = {3, 4, 5}. Then A union B is {2, 3, 4, 5} and its complement is {1, 6}. Separately, A prime is {1, 4, 5, 6} and B prime is {1, 2, 6}, and their intersection is {1, 6}. The two answers match, which is the verification the exercise asks for.
In a proof, chase an element. To show (A union B) prime is contained in A prime intersection B prime, take x in the left set. Then x is not in A union B, so x is in neither A nor B, so x lies in both complements. The reverse inclusion runs the same steps backwards.
4.6 Working through a mixed question
A typical exam question chains three operations. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {1, 2, 3, 4}, B = {2, 4, 6, 8} and C = {3, 4, 5, 6}, and ask for (A union C) prime.
First compute A union C = {1, 2, 3, 4, 5, 6}. Then take the complement inside U: the remaining elements are {7, 8, 9}. Now check the same result through De Morgan: A prime is {5, 6, 7, 8, 9} and C prime is {1, 2, 7, 8, 9}, and their intersection is {7, 8, 9}. Both routes agree.
The order of operations matters. Brackets are always done first, then complement applies to the finished set inside them. Writing the intermediate sets on separate lines keeps the marks even when the final arithmetic goes wrong.
Warning
A - B and B - A are different sets. So are (A union B) prime and A prime union B prime. Pause and check which one the question asked for before you write the final line.



