Recommended resources
The freely available resources this lesson will direct you to.
Hello! In the last lesson, you described sets by listing their members or stating a membership rule. Now you can combine those sets. The practical question throughout this lesson is: for a particular element, does it belong in the result?
We will compute five operations—union, intersection, difference, complement, and symmetric difference—using finite sets first, then intervals. Keep your earlier rule about number type in mind: a complement, in particular, depends on which numbers are under discussion.
Union and intersection: “either” and “both”
Let the universal set be , and let
The union contains anything in , in , or in both. List each member only once:
The intersection contains only members shared by both sets:
Here, “or” in the definition of union is inclusive: the shared members 2 and 6 still belong to the union. By contrast, an intersection requires two successful membership checks. If there are no shared members, the intersection is , and the sets are called disjoint.
Watch the definitions and the two roster examples in Sets: Union, Intersection, Complement, by Steve Crow. Focus on the decision being made for each number, rather than memorising the final rosters.
Sets: Union, Intersection, Complement
Sets: Union, Intersection, Complement, by Steve Crow, introduces the membership rules and works through union and intersection.
Watch the definitions, then the intersection and the union. Notice why a shared number appears once—not twice—in the union.
A useful way to check your work is to look at the edges of the result. Every member of must be in each original set; every member of either original set must appear in . A number such as 5, which is in neither set, belongs to neither result.
Difference and complement: what gets left out?
The difference , also written , starts with and keeps only its members that are not in . In our example,
The order matters. The first result answers “in but not ”; the second answers “in but not .” Neither contains 2 or 6 because those numbers occur in both sets.
A complement uses the same exclusion idea but starts with the entire universe. The complement of , written or , is . For the universe specified above,
Notice the 5, 7, and 9. They are in neither nor , but they still belong to because they are in and not in . If the universe changed, the complement could change too; you cannot compute it from alone.
Set Difference and Set Complement, from Neso Academy, shows the two operations in Venn diagrams and numerical examples. Pay attention to which set supplies the possible members before anything is removed.
Set Difference and Set Complement
Set Difference and Set Complement, from Neso Academy, distinguishes removing members of one set from another from taking everything outside a set within a specified universe.
Watch set difference for the order of the operands and the shaded region. Then watch set complement and identify why the region outside A is still restricted to the universal set.
When several operations appear together, brackets tell you what to compute first. For instance, with our sets,
This differs from : first combine and , then find what the combined set leaves out. The union and intersection video also walks through a bracketed expression if you want to see that habit in another example.
Sets: Union, Intersection, Complement
Return to Steve Crow’s Sets: Union, Intersection, Complement for a worked expression involving brackets.
In the bracketed example, follow the separate roster made for the union inside the brackets before it is intersected with A.
Symmetric difference: exactly one of the two sets
The symmetric difference, written , keeps members that occur in exactly one of and . It combines the two differences:
For our example, the two differences were and , so
There is another way to get the same result: take the union and remove the intersection,
The image below shows why both calculations select the same two outer regions. Its overlap is unshaded because a member found in both sets does not pass the “exactly one” test.

For a short second explanation, read the symmetric-difference definition and example in Basic Set Operations from Mathematics LibreTexts. The resource writes this operation as ; here, and mean the same thing.
1.2: Basic Set Operations - Mathematics LibreTexts
In Basic Set Operations, Doerr and Levasseur give the symmetric difference in terms of operations you already know. Read it to connect the formula with its Venn diagram.
Under “Operations and their Venn Diagrams,” find “Definition 6: Symmetric Difference” and then “Example 5: Some Symmetric Differences.” Read the definition and examples, stopping before the reference to Figure 6. Focus especially on why a set compared with itself has an empty symmetric difference.
The word symmetric points to a useful check: swapping and leaves the answer unchanged. Swapping them in an ordinary difference usually does not.
The same operations on intervals
A roster is not suitable when the sets contain whole stretches of real numbers. Let the universe now be , and take
The overlap consists of numbers strictly greater than 1 and strictly less than 3:
Together, the intervals cover every real number from through , including both outer endpoints:
For differences, inspect the disputed endpoints carefully. The number 1 is in but not in , while 3 is in but not in . Therefore,
Combining those non-overlapping pieces gives
Finally, the complement of includes every real number outside . Since belongs to , it is excluded from the complement; since 3 does not belong to , it is included:
This is where the previous lesson’s endpoint notation pays off. A bracket or parenthesis is a membership decision, not a decorative detail.
For any set operation, decide membership one element at a time: either set for a union, both for an intersection, first but not second for a difference, in the universe but not the set for a complement, and exactly one for a symmetric difference. On intervals, make those decisions at the endpoints as well as between them.
Next, you will use these membership rules to decide whether proposed set identities are always true—or to find a counterexample when they are not.