n(n-1)/2
The formula n(n-1)/2 is used to calculate the number of unique pairs that can be formed from a set of n items. For example, if you have 4 items, you can form 6 unique pairs: (1,2), (1,3), (1,4), (2,3), (2,4), and (3,4). This concept is often applied in combinatorics, a branch of mathematics that deals with counting and arrangements.
This formula arises from the idea that each item can pair with n-1 other items. However, since the order of pairing does not matter (i.e., (1,2) is the same as (2,1)), we divide by 2 to avoid double counting. Thus, n(n-1)/2 efficiently gives the total number of unique combinations.