there are n! permutations of a set with n elements.

to see this, note we can freely choose which element is in "the first place" (n choices).

having done this, we can only choose from the n-1 elements remaining for the "second place" (n -1 choices).

after we have chosen which 2 elements go in the first two places, we have n-2 elements remaining to choose to "put in the third place".

so, in all, we have n(n-1)(n-2)....(3)(2) = n! ways to do this.

explicitly, here are the 24 = 4! = 4*3*2 ways to permute 4 elements:

1234

1243

1324

1342

1423

1432

2134

2143

2314

2341

2413

2431

3124

3142

3214

3241

3412

3421

4123

4132

4213

4231

4312

4321

note how i sub-divided these into 4 blocks. each block represents one of the 4 choices for the first position. the first 2 entries in each block represent the lowest number remaining of the remaining 3 as my second choice, and the second 2 entries in each block are the "next lowest choice for the second entry", and the final pair is the last of the (4-1 = 3) choices for the second element in the list.

i further listed the ordering of the final two positions in each pair of each block with i < j first, and i > j second (where "i" is what goes in "3rd place" and "j" is what goes in "4th place"). note that by the time we have chosen 3 positions, the 4th position is already determined (it's the only element left). i could do this for all permutations of 5 elements, but it would be too long to post here (there are 120 such permutations). the list would begin like so:

12345

12354

12435

12453

12534

12543

13245

13254... and so on