Why are permutations defined as bijective?

I am learning about permutations right now. This is the definition in my textbook and one that is also similarly on Wikipedia.

A permutation of a set $$X$$ is a bijection $$p: X \rightarrow X$$ on that set

Every definition of a permutation I have seen claims that permutations on a set X is bijective. I am trying to reason this out formally, but I think I am not doing it properly. For a permutation to be a bijection on a set $$X$$, the function must be one-to-one and onto.

Let us define a set with $$n$$ elements as $$X_n = \{1,2,\dots n\}$$. The permutations of $$X_n$$ total $$n!$$. Each element in $$X_n$$ will have $$1!, 2!, \dots n!$$ permutations. Now it looks pretty clear to me that this is one-to-one and onto, but how do I state this more formally to make the conclusion more obvious to others?

• I think you mean $p : X \rightarrow X$ in your highlight? – Stuartg98 Apr 7 '19 at 16:11
• If you are struggling with this then ask yourself how you define a permutation. For example, what is a permutation on $\{1,2,3,4,5\}$ by your definition? – John Douma Apr 7 '19 at 16:15
• It's not clear to me exactly what your question is, but math.stackexchange.com/questions/1399781/… may be relevant. – Eric Wofsey Apr 7 '19 at 16:27
• @JohnDouma Before reading the answers, I didn't really know. After reading the answers, I would say a permutation is the # of all the ways you can reorder the elements $\{1,2,3,4,5}\$, which would be 5! – Evan Kim Apr 7 '19 at 17:59
• @EricWofsey I will take a look, it looks like an interesting post – Evan Kim Apr 7 '19 at 18:00

With permutations we are counting all the ways to rearrange the elements into a set of $$n$$ elements. Clearly we use every element and the elements of the codomain are the same size, so naturally the function is bijective.