In

coproduct
In category theory
Category theory formalizes mathematical structure and its concepts in terms of a Graph labeling, labeled directed graph called a ''Category (mathematics), category'', whose nodes are called ''objects'', and whose labelled d ...

in the category of sets.
As such, the disjoint union is defined up to an isomorphism, and the above definition is just one realization of the coproduct, among others. When the sets are pairwise disjoint, the usual union is another realization of the coproduct. This justifies the second definition in the lead.
This categorical aspect of the disjoint union explains why $\backslash coprod$ is frequently used, instead of $\backslash bigsqcup,$ to denote ''coproduct''.

mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and their changes (cal ...

, a disjoint union (or discriminated union) of a family $(A\_i\; :\; i\backslash in\; I)$ of sets is a set $A,$ often denoted by $\backslash bigsqcup\_\; A\_i,$ with an injective function
In , an injective function (also known as injection, or one-to-one function) is a that maps elements to distinct elements; that is, implies . In other words, every element of the function's is the of one element of its . The term must no ...

of each $A\_i$ into $A,$ such that the images of these injections form a partition of $A$ (that is, each element of $A$ belongs to exactly one of these images). The disjoint union of a family of pairwise disjoint sets is their union. In terms of category theory
Category theory formalizes mathematical structure
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and ...

, the disjoint union is the coproduct
In category theory
Category theory formalizes mathematical structure and its concepts in terms of a Graph labeling, labeled directed graph called a ''Category (mathematics), category'', whose nodes are called ''objects'', and whose labelled d ...

of the category of sets In the mathematical
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

. The disjoint union is thus defined up to Two mathematical
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...

a bijection.
A standard way for building the disjoint union is to define $A$ as the set of ordered pair
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...

s $(x,\; i)$ such that $x\; \backslash in\; A\_i,$ and the injective functions $A\_i\; \backslash to\; A$ by $x\; \backslash mapsto\; (x,\; i).$
Example

Consider the sets $A\_0\; =\; \backslash $ and $A\_1\; =\; \backslash .$ It is possible to index the set elements according to set origin by forming the associated sets $$\backslash begin\; A^*\_0\; \&\; =\; \backslash \; \backslash \backslash \; A^*\_1\; \&\; =\; \backslash ,\; \backslash \backslash \; \backslash end$$ where the second element in each pair matches the subscript of the origin set (for example, the $0$ in $(5,\; 0)$ matches the subscript in $A\_0,$ etc.). The disjoint union $A\_0\; \backslash sqcup\; A\_1$ can then be calculated as follows: $$A\_0\; \backslash sqcup\; A\_1\; =\; A^*\_0\; \backslash cup\; A^*\_1\; =\; \backslash .$$Set theory definition

Formally, let $\backslash left\backslash $ be afamily of sets In set theory
Set theory is the branch of that studies , which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory, as a branch of , is mostly concerned with those that are ...

indexed by $I.$ The disjoint union of this family is the set
$$\backslash bigsqcup\_\; A\_i\; =\; \backslash bigcup\_\; \backslash left\backslash .$$
The elements of the disjoint union are ordered pairs $(x,\; i).$ Here $i$ serves as an auxiliary index that indicates which $A\_i$ the element $x$ came from.
Each of the sets $A\_i$ is canonically isomorphic to the set
$$A\_i^*\; =\; \backslash left\backslash .$$
Through this isomorphism, one may consider that $A\_i$ is canonically embedded in the disjoint union.
For $i\; \backslash neq\; j,$ the sets $A\_i^*$ and $A\_j^*$ are disjoint even if the sets $A\_i$ and $A\_j$ are not.
In the extreme case where each of the $A\_i$ is equal to some fixed set $A$ for each $i\; \backslash in\; I,$ the disjoint union is the Cartesian product
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

of $A$ and $I$:
$$\backslash bigsqcup\_\; A\_i\; =\; A\; \backslash times\; I.$$
Occasionally, the notation
$$\backslash sum\_\; A\_i$$
is used for the disjoint union of a family of sets, or the notation $A\; +\; B$ for the disjoint union of two sets. This notation is meant to be suggestive of the fact that the cardinality
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

of the disjoint union is the of the cardinalities of the terms in the family. Compare this to the notation for the Cartesian product
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

of a family of sets.
Disjoint unions are also sometimes written $\backslash biguplus\_\; A\_i$ or $\backslash \; \backslash cdot\backslash !\backslash !\backslash !\backslash !\backslash !\backslash bigcup\_\; A\_i.$
In the language of category theory
Category theory formalizes mathematical structure
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and ...

, the disjoint union is the coproduct
In category theory
Category theory formalizes mathematical structure and its concepts in terms of a Graph labeling, labeled directed graph called a ''Category (mathematics), category'', whose nodes are called ''objects'', and whose labelled d ...

in the category of sets In the mathematical
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

. It therefore satisfies the associated universal property
In category theory
Category theory formalizes mathematical structure
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), ...

. This also means that the disjoint union is the categorical dual
In category theory
Category theory formalizes mathematical structure and its concepts in terms of a Graph labeling, labeled directed graph called a ''Category (mathematics), category'', whose nodes are called ''objects'', and whose labelled di ...

of the Cartesian product
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

construction. See coproduct
In category theory
Category theory formalizes mathematical structure and its concepts in terms of a Graph labeling, labeled directed graph called a ''Category (mathematics), category'', whose nodes are called ''objects'', and whose labelled d ...

for more details.
For many purposes, the particular choice of auxiliary index is unimportant, and in a simplifying abuse of notation
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It h ...

, the indexed family can be treated simply as a collection of sets. In this case $A\_i^*$ is referred to as a of $A\_i$ and the notation $\backslash underset\; A$ is sometimes used.
Category theory point of view

Incategory theory
Category theory formalizes mathematical structure
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and ...

the disjoint union is defined as a See also

* * * * * * * *References

* * {{Set theory Operations on sets