Shaking hands in a group involves pairings of two people in all possible ways
Say we have N people in the room. So to shake hands we have to pair each one of these N with each one of the rest of people in the room.
So we have N⋅(N−1) possible pairings.
However, in this number we have actually counted each pairing twice; when, say person−1 shakes hands with person−2, and when person−2 shakes hands with person1. It is only one handshake.
Thus, the correct number is half of that N⋅(N−1)2
=20(20−1)2=10×19=190