Exactly how does the equation n(n-1)/2 determine the number of pairs of a given number of items (n)?
Solution 1:
The formula $n(n-1)/2$ for the number of pairs you can form from an $n$ element set has many derivations, even many on this site.
One is to imagine a room with $n$ people, each of whom shakes hands with everyone else. If you focus on just one person you see that she participates in $n-1$ handshakes. Since there are $n$ people, that would lead to $n(n-1)$ handshakes.
Note here that we are thinking about the multiplication $xy$ as the total for $x$ groups of $y$ things, not as repeated addition. Computationally they are the same, but psychologically they are different.
To finish the problem, we should realize that the total of $n(n-1)$ counts every handshake twice, once for each of the two people involved. So the number of handshakes is $n(n-1)/2$.
Note (continued). We are thinking about $x/y$ as the number of groups of size $y$ it takes to get to a total of $x$, not as repeated subtraction. Computationally they are the same, but psychologically they are different.
Among the other ways to think about this problem (and one which kids find first). Imagine the people entering the room one at a time and introducing themselves. The first person has nothing to do. The second person shakes one hand. The third person shakes with the two already there, and so on. The last person has $n-1$ hands to shake. So the total number of handshakes is $$ 0 + 1 + \cdots + (n-1) . $$ There are many tricks for evaluating that sum to discover that it's $n(n-1)/2$.
Solution 2:
You are almost correct that $4*4/2$ would give us the amount of pairs if we simply chose two numbers from our set of n numbers, and let order matter.
Let $[a,b,c,d]$ be our set of four objects. According to your plan, we pick two of the objects from this set with replacement, meaning that if we choose $a$, then we can choose $a$ again as our second object. This would give us the following pairs. $$ aa,ab,ac,ad\\ ba,bb,bc,bd\\ ca,cb,cc,cd\\ da,db,dc,dd $$ As you can see, we do count each of the numbers that are not in the main diagonal twice, but the numbers on the diagonal are counted only once. Our square here is $4$ by $4$, so there are $4$ numbers on the diagonal and $16-4=12$ numbers that are not. So we divide the second number by two and add it to the first to get the total amount of distinct pairs without order mattering, would in fact be $10$, and for a general $n$ by $n$ square of possibilities, you can see that this number becomes $n(n-1)/2+n$.
However, I think the problem that you are being asked here is how many ways are there to choose two numbers from the set with replacement. Thus we would simply subtract the diagonal from our previous answer to get $n(n-1)/2$.
Hope this helps!