Unordered Set Pair Formal Definition

98 Views Asked by At

I am stuck in what would be the best way to define a pair of unordered items. Say I have a set of items $D$. Now, I want to have a set of a pair of items.

I currently defined that as $S=\left\{ \{i,j\} : i, j\in D \right\}$. Now, note that for any set ${i,j}$ the items where $i=j$ could also be included. Therefore, I will have a total of $\frac{n(n+1)}{2}$ pairs.

For example, if $D=\{1,2\}$, I want $S=\{\{1,1\},\{1,2\},\{2,2\}\}$.

Is the definition okey? What is the best formal definition?