The total number of head-to-head matchups among N candidates

For an election involving N candidates, there are a total of N(N-1) / 2 possible head-to-head matchups.

Examples:

With 3 candidates, there are 3(2) / 2 = 6 / 2 = 3 total head-tohead matchups (A vs. B, A vs. C, B vs. C).

With 4 candidates there are 4(3) / 2 = 12 / 2 = 6 total head-tohead matchups (A vs. B, A vs. C, A vs. D, B vs. C, B vs. D, C vs. D).

With 5 candidates there are 5(4) / 2 = 20 / 2 = 10 total head-to-head matchups. (You name them!)