Work out set difference instantly with clear inputs, formula shown and shareable results.
The set difference A \\ B keeps the elements of A that are not in B. Unlike union and intersection it is not symmetric, so A \\ B and B \\ A are generally different sets.
Set difference
A \\ B = { x : x ∈ A and x ∉ B }
A \\ B = {1, 3, 5} while B \\ A = {8}.
The complement is the difference from a universal set, so it is a special case where A is everything under consideration.