How many numbers can be formed using the digits from 1 to 4, where all the digits are different?
We distinguish numbers with 1, 2, 3, or 4 digits. If there is only one digit, we have 4 possibilities. If there are two, we have 4 possibilities for the first digit and 3 for the second since the digits must be different, so 12 possibilities in total. Similarly, if there are three digits, we have $4 \times 3 \times 2$ possibilities, and 4! if there are four.

Finally, there are $4+12+24+24=64$ numbers.

Proposition 1.10. There are $n$! ways to order $n$ different elements.

Proof. We first choose the object that will be in position 1, then the one that will be in position 2, and so on... When we choose the one that will be in position 1, we have $n$ objects: thus, we have $n$ choices. In position 2, we have $n-1$ objects left, so $n-1$ choices, and so on until position $n$ where we have only one object left, thus only one choice. Therefore, the number of possibilities is $n \times(n-1) \times(n-2) \times \ldots \times 2 \times 1=n$!

Proposition 1.11 (Arrangements). There are $\frac{n!}{(n-k)!}$ ways to choose $k$ ordered elements from $n$.

Proof. We have $n$ objects and we choose them one by one until we have $k$. Similarly to the previous proof: we have $n$ choices for the first object, $n-1$ for the second, and when we want to choose the $k^{th}$, there are $n-k+1$ objects left, so $n-k+1$ choices. Thus, the number of possibilities is $n \times(n-1) \times(n-2) \times \ldots \times(n-k+1)=\frac{n!}{(n-k)!}$.