In mathematics, an unordered pair or pair set is a set of the form {a,b}, i.e. a set having two elements a andb with no particular relation between them, where {a,b} = {b,a}. In contrast, an ordered pair (a,b) has a as its first element and b as its second element, which means (a,b) ≠ (b,a) unless a=b.
While the two elements of an ordered pair (a,b) need not be distinct, many authors require the elements of an unordered pair {a,b} to be distinct. However, unordered pairs whose two elements are not required to be distinct are also sometimes used, especially in the context of graph theory, where they can represent loops in undirected graphs.