Distribution of matrix rank over finite fields For a finite field $F$, let $\mathcal{R}_k(N,M)$ be the number of matrices of shape $N\times M$ with entries in $F$ and rank exactly $k$.
Is there anything known about the numbers $\mathcal{R}_k(N,M)$, either exactly 
or asymptotically?
 A: Well, you can write down the recursion
$$
   \mathcal R_k(n,m) = \mathcal R_k(n-1,m) \cdot q^k + \mathcal R_{k-1}(n-1,m) \cdot (q^m - q^{k-1})
$$
since the last row of an $n\times m$ rank-$k$ matrix is either in the span of the first $n-1$ rows if they form a rank-$k$ matrix, or else independent from them if they form a rank-$(k-1)$ matrix. When $k=0$, $\mathcal R_k(n,m)=1$, and when $k > \min\{n,m\}$, $\mathcal R_k(n,m)=0$. 
Messing around with this recursion and Mathematica I get
$$
    \mathcal R_k(n,m) = \left[n \atop k\right]_q \left[m \atop k\right]_q [k]_q!\,q^{\binom k2} (q-1)^k = \frac{[n]_q! \, [m]_q!}{[n-k]_q!\,[m-k]_q!\,[k]_q!}q^{\binom k2} (q-1)^k
$$
in terms of $q$-binomial coefficients and $q$-factorials. Probably this can be proven from the recursion, and probably there's a combinatorial argument for it.
A: There is a computation that makes use of the following fact: the number of $k$-dimensional subspaces of $\mathbb F_q^n$ is ${n \brack k}_q$, the $q$-binomial coefficient.
To choose an $N\times M$ matrix with rank $k$ is to choose a linear map $\mathbb F_q^M\to \mathbb F_q^N$ whose image is a $k$-dimensional subspace $V\subseteq \mathbb F_q^N$. We begin with choosing $V$ first. There are ${N \brack k}_q$ choices.
Having decided $V$, it remains to pick a surjection $\mathbb F_q^M\to V\cong \mathbb F_q^k$. This is the same as choosing a full-rank $k\times M$ matrices, and there are
$$(q^M-1)(q^M-q)\dots(q^M-q^{k-1})$$
many of them. (We choose one row at a time, subject to the condition that rows are independent.)
As a result, there are ${N \brack k}_q (q^M-1)(q^M-q)\dots(q^M-q^{k-1})$ matrices of size $N\times M$ and rank $k$.
A: The $n \to \infty$ limiting probability that an $n \times n$ matrix over $\mathbb{F}_q$ has nullity equal to $j\geq 0$ is given by the expression:
$\frac{1}{\gamma_j(q)}\prod_{i=j+1}^{\infty} 1-\frac{1}{q^i}$ where $\gamma_j(q) = |GL_n(\mathbb{F}_q)|$.
See page 21 of the following document:
Geoffrey Critzer, Combinatorics of Vector Spaces over Finite Fields, Master's thesis, Emporia State University, 2018.
