Sample $n^2$ integers $a\_{11},\dots,a\_{nn}$ in $\{-d,\dots,-1,0,1\dots,d\}$ uniformly. 


What is the probability that the resulting matrix $[a\_{ij}]$ has rank $r$?


Is there a nice parametrization of such matrices that helps us generate such a rank $r$ matrix quickly deterministically?


In general what is a good strategy?



On Sampling rank $r$ matrices
The case $r=n$ is considered in this [paper](http://www.math.ubc.ca/~gerg/papers/downloads/AAIMHNIE.pdf) by Martin and Wong. They prove that for every $n \geq 2$ and every $\epsilon >0$, the probability that a random $n \times n$ matrix with entries from $\{-k, \dots, 0, \dots, k\}$ is singular is $\ll \frac{1}{k^{2-\epsilon}}$. See Lemma $1$. The discussion following Lemma $1$ shows that this is tight for $n=2$, but not for $n >2$. By a deep theorem of Katznelson, the true probability decays as $\frac{\log (k)}{k^n}$, which is not far from $\frac{1}{k^n}$ (the probability that a random matrix contains a row of zeros). 


