How would I find the number of permutations in $S_5$ that have exactly $2$ inversions?
By inversion I mean if $i<j$ but $\sigma(i)>\sigma(j)$ i.e the order in which an element appears is switched in the permutation.
I have found the following $6$
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 1 & 2 & 5 & 3 &4 \end{pmatrix}$$
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 1 & 4 & 2 & 3 &5 \end{pmatrix}$$
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 3 & 1 & 2 & 4 &5 \end{pmatrix}$$
simply by pulling the element $5$ back two places and then $4$ back two places and then the same for $3$. This no longer works with $2$ because we have to move it to $5$ and this gives more than two inversions however we can reverse it and move $1$ forward two places and then move $2$ forward two places and likewise for $3$ this gives.
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 2 & 3 & 1 & 4 &5 \end{pmatrix}$$
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 1 & 3 & 4 & 2 &5 \end{pmatrix}$$
$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5\\ 1 & 2 & 4 & 5 &3 \end{pmatrix}$$
this gives us $6$ permutations with only $2$ inversions.
Is this all? Can anyone show me a better way that just trying to figure them out?
Thanks!