# Disjoint union

In mathematics, the disjoint union of two sets X and Y is a set which contains disjoint (that is, non-intersecting) "copies" of each of X and Y: it is denoted $X \amalg Y$ or, less often, $X \uplus Y$.

There are injection maps in1 and in2 from X and Y to the disjoint union, which are injective functions with disjoint images.

If X and Y are disjoint, then the usual union is also a disjoint union. In general, the disjoint union can be realised in a number of ways, for example as

$X \amalg Y = \{0\} \times X \cup \{1\} \times Y . \,$

The disjoint union has a universal property: if there is a set Z with maps $f:X \rightarrow Z$ and $g:Y \rightarrow Z$, then there is a map $h : X \amalg Y \rightarrow Z$ such that the compositions $\mathrm{in}_1 \cdot h = f$ and $\mathrm{in}_2 \cdot h = g$.

The disjoint union is commutative, in the sense that there is a natural bijection between $X \amalg Y$ and $Y \amalg X$; it is associative again in the sense that there is a natural bijection between $X \amalg (Y \amalg Z)$ and $(X \amalg Y) \amalg Z$.

## General unions

The disjoint union of any finite number of sets may be defined inductively, as

$\coprod_{i=1}^n X_i = X_1 \amalg (X_2 \amalg (X_3 \amalg (\cdots X_n)\cdots))) . \,$

The disjoint union of a general family of sets Xλ as λ ranges over a general index set Λ may be defined as

$\coprod_{\lambda \in \Lambda} X_\lambda = \bigcup_{\lambda \in \Lambda} \{\lambda\} \times X_\lambda . \,$