There are 28 handshakes altogether.

How to see it

Each of the 8 students shakes hands with every other student once.
If you let n=8n=8n=8, the total number of handshakes when everyone meets everyone once is given by:

Handshakes=n(nāˆ’1)2\text{Handshakes}=\frac{n(n-1)}{2}Handshakes=2n(nāˆ’1)​

Here:

8Ɨ72=562=28\frac{8\times 7}{2}=\frac{56}{2}=2828Ɨ7​=256​=28

You can also think of it as:

  • Student 1 shakes hands with 7 others
  • Student 2 shakes with 6 new people (not counting Student 1 again)
  • Student 3 shakes with 5 new people, and so on

So you add:

7+6+5+4+3+2+1=287+6+5+4+3+2+1=287+6+5+4+3+2+1=28

Answer: 28 handshakes.