n - the number of people Everyone shook hands with everybody else, so we must know how many ways there are to choose 2 people from the group of n people. Using combination: [tex]\binom{n}{2}=\frac{n!}{2!(n-2)!}=\frac{(n-2)! \times (n-1) \times n}{2(n-2)!}=\frac{(n-1)n}{2}[/tex]