Maths WorkshopMaths problems with full solutions
Exercise 1620Combinatorics › Counting principlesOlympiadAdded 3 Nov 2026

Counting with matrices

#matrices#counting#trace

Statement

Count the n×nn\times n 00-11 matrices with exactly one 11 in each row and each column. How many are symmetric?

Hint

Such matrices correspond to permutations. Symmetry means the permutation is an involution.

Show solutionHide solution

Solution

Total. Each matrix corresponds to a permutation: n!n!.

Symmetric. Symmetric permutation matrices correspond to involutions (permutations with cycle lengths 11 or 22). The number of involutions InI_n satisfies In=In−1+(n−1)In−2I_n=I_{n-1}+(n-1)I_{n-2} (element nn fixed or in a transposition).

Conclusion. n!n! total; the symmetric count is InI_n (involution numbers).