The union collects the set elements belonging to either set, including those belonging to both:Thus membership in a union uses logical disjunction (OR). For and , the union is : the shared member occurs only once, because a set records membership without repeated entries.
In this Venn diagram, belong only to , belongs to both sets, belongs only to , and belong to neither. The surrounding universal set is . Numbers are placed by membership; circle areas do not represent cardinalities. Each panel shades the region selected by its operation.
For a database illustration, let collect records matching one condition and collect records matching another. Their union selects records matching at least one condition, with a record satisfying both still appearing once. This interpretation turns an abstract operation into a reusable rule for combining selections. For an authored treatment of union, intersection, set difference, and complement, see Lehman, Leighton and Meyer, Mathematics for Computer Science (2015), Definition 4.1.1, pp. 82–83.
More generally, the union contains exactly the set elements belonging to at least one set :The existential quantification expresses “at least one”. With no indexing members, the union is the empty set. Combining a set with the empty set leaves it unchanged: .
New to topics? Read the docs here!
