In set theory, the union (denoted by ∪) of a collection of sets is the set of all distinct elements in the collection.[1] It is one of the fundamental operations through which sets can be combined and related to each other.

Sets cannot have duplicate elements, so the union of the sets {1, 2, 3} and {2, 3, 4} is {1, 2, 3, 4}. Multiple occurrences of identical elements have no effect on the cardinality of a set or its contents.

The number 9 is not contained in the union of the set of prime numbers {2, 3, 5, 7, 11, …} and the set of even numbers {2, 4, 6, 8, 10, …}, because 9 is neither prime nor even.

The operations can be performed in any order, and the parentheses may be omitted without ambiguity (i.e., either of the above can be expressed equivalently as A ∪ B ∪ C). Similarly, union is commutative, so the sets can be written in any order.

One can take the union of several sets simultaneously. For example, the union of three sets A, B, and C contains all elements of A, all elements of B, and all elements of C, and nothing else. Thus, x is an element of A ∪ B ∪ C if and only if x is in at least one of A, B, and C.

In mathematics a finite union means any union carried out on a finite number of sets: it doesn't imply that the union set is a finite set.

The most general notion is the union of an arbitrary collection of sets, sometimes called an infinitary union. If M is a set whose elements are themselves sets, then x is an element of the union of Mif and only if there is at least one element A of M such that x is an element of A. In symbols:

This idea subsumes the preceding sections, in that (for example) A ∪ B ∪ C is the union of the collection {A,B,C}. Also, if M is the empty collection, then the union of M is the empty set. The analogy between finite unions and logical disjunction extends to one between arbitrary unions and existential quantification.

The notation for the general concept can vary considerably. For a finite union of sets one often writes . Various common notations for arbitrary unions include , , and , the last of which refers to the union of the collection where I is an index set and is a set for every . In the case that the index set I is the set of natural numbers, one uses a notation analogous to that of the infinite series. When formatting is difficult, this can also be written "A1 ∪ A2 ∪ A3 ∪ ···". (This last example, a union of countably many sets, is very common in analysis; for an example see the article on σ-algebras.)

Whenever the symbol "∪" is placed before other symbols instead of between them, it is of a larger size.