### Formula for the total number of head-to-head matchups in an n candidate election

We can use the 'table' idea to derive the formula for the total number of head-to-head matchups involving n candidates.

Since this table has N rows and N columns, there are N2 empty cells below.

 Candidate 1 Candidate 2 . . . . . Candidate N Candidate 1 . . . . . Candidate 2 . . . . . : : : : : Candidate N :

But, there are N cells on the main diagonal (candidate 1 vs. candidate 1, candidate 2 vs. candidate 2, etc.) which should be eliminated since they do not represent real matchups. If we take away those N cells (from the original N2 cells, we are left with N2 -N cells (see the table below).

 Candidate 1 Candidate 2 . . . . . Candidate N Candidate 1 XXXXX . . . . . Candidate 2 XXXXX . . . . . : : : . . . . . : Candidate N . . . . . XXXX

However, half of the remaining cells are just duplicates of each other (candidate 1 vs. candidate 2 and candidate 2 vs. candidate 1, etc.). So dividing the N2 -N cells (from above) by two, we get (N2 -N)/2 cells. If we factor out an N, we get an even better way to write this formula: N(N -1)/2 .

Thus, there are N(N -1)/2 total head-to-head matchups in an N candidate election.