About the rank of a small square matrix An interesting question which hit me just now: Suppose we have a square matrix, for instance, a 3 by 3 one. Each of its entry is a randomly assigned integer from 0 to 9, then whats' the probability that it becomes a singular matrix? Or, in general cases, what if the matrix is n by n? Does this probability increase or decrease as n goes up ?
 A: Erick Wong and I wrote a paper about just this problem. If the entries are random integers between $-k$ and $k$, the order of magnitude of the probability that the matrix is singular is at most $k^{-2+\epsilon}$ for any $\epsilon>0$.
A: Are you familiar with the theorem that states: In the set of all nxn (in this case n=3) matrices, the set of all singular matrices has Lebesgue measure zero?
If you restrict the space to only entries from 0 to 9, the space itself has Lebesgue measure zero, and thus, if you were to equip this space with probability measure so that you induce a finite distribution over the set of all matrices (since we're randomizing, let's say it's uniform), then there is a non-zero probability you will generate a singular matrix.
Now, while the 0 to 9 case for a 3x3 is actually quite cumbersome—to do it you'd have to find out combinatorially how many possible singular matrices there are and divide that number by the total number of matrices you could generate—it's still easy to observe for a simpler case that as you increase the dimensions of the matrix, but keep the number of entries the same, the probability of generating a singular matrix actually increases.
Consider the following construction: You are generating a 2 x 2 matrix with only entries 0 and 1. This is equivalent to randomly drawing 2 vectors from the set
\begin{align}
\{(0,0), (0,1), (1,0), (1,1)\}
\end{align}
The probability of randomly generating a singular matrix is equivalent to the probability of randomly drawing the same vector twice. You should verify that this probably is $\tfrac{1}{4}$. Now, we'll extend the matrix to size 3 x 3, but still only draw from vectors with entries 0 and 1. The vectors we can draw from is now the set
\begin{align}
\{(0,0,0), (1,0,0), (0,1,0), (0,0,1), (1,1,0), (1,0,1), (0,1,1), (1,1,1)\}
\end{align}
The probability of some combination of vectors that result in a singular matrix is the same thing as the complement of drawing three different vectors. You should verify that this probability is in fact $\tfrac{22}{64} > \tfrac{1}{4}$.
The question is: Does this hold for the example you mentioned? Find out how many pairwise-linearly independent vectors of length 3 you can generate with only entries from the set $\{1,...,9\}$ and simply calculate the probability of drawing different vectors for all three draws. This is precisely the probability of generating a singular matrix in this space.
