In how many different ways can 8 riders be matched up to 8 horses? Explain answer please.

The first horse can be assigned to 8 different riders, the second horse to 7 different riders, the third horse to 6 different riders, ...

no. of ways. = 8x7x6x...x3x2x1 = 8! = 40320