【Example 8】In the expansion of an $n$-order determinant, how many terms contain the main diagonal element as a factor?
We already know that each term in the expansion of an $n$-order determinant represents a permutation. The so-called main diagonal elements refer to $a_{11}, a_{22}, \cdots, a_{m n}$. Therefore, if a term is required to contain a factor of the main diagonal element, it is equivalent to requiring at least one equation $i=j_{i}$, which is equivalent to having at least one "pair". Thus, we know that in the expansion of an $n$-order determinant, there are
$$
n!\left(1-\frac{1}{2!}+\frac{1}{3!}-\frac{1}{4!}+\cdots+(-1)^{n-1} \frac{1}{n!}\right)
$$

terms that contain a factor of the main diagonal element.