Skip to main content
2 of 3
added 24 characters in body
Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152

For generic (not necessarily symmetric) $m\times n$ matrices over a set of $k$ elements, the number of those with pairwise distinct columns and rows is $$\sum_{i=0}^m\sum_{j=0}^n s(m,i)\cdot s(n,j)\cdot k^{i\cdot j},$$ where $s(,)$ are Stirling numbers of first kind with sign.

Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152