In his paper Breaking Rainbow Takes a Weekend on a Laptop, the author claims the following:
The probability of a random $o_2\times o_2$ matrix is singular over $\mathbb{F}_q$ is $$1-\prod_{i=0}^{o_2-1}\left(1-q^{i-o_2}\right).$$
Can someone help me derive this? The author says to use the following fact:
A matrix is singular whenever the first row is non-zero, and for each consecutive row $i$, the $i+1$-th row is not in the span of the first $i$ rows.
He then says that this happens with probability $q^{i-1-o_2}$ but I don't see how this is true, or how it connects to the terms in the product, despite them looking somewhat similar.
What the passage you've (mis)quoted actually says is:
The probability that the matrix is non-singular is $\ \prod_\limits{i=0}^{o_2-1}\big(1-q^{i-o_2}\big)\ $, and therefore the probability that it's singular is $\ 1-\prod_\limits{i=0}^{o_2-1}\big(1-q^{i-o_2}\big)\ $.
You've also misread what it is that happens with probability $\ q^{i-1-o_2}\ $. This is the probability that the $\ i$-th row is in the span of the first $\ i-1\ $ rows. This is because, given that the first $\ i-1\ $ rows are linearly independent, they span a space of dimension $\ i-1\ $, and all spaces of dimension $\ i-1\ $ over $\ \Bbb{F}_q\ $ contain exactly $\ q^{i-1}\ $ members. The $\ i$-th row is equally likely (and therefore with probability $\ q^{-o_2}\ $) to be any member of $\ \Bbb{F}_q^{\,o_2}\ $, and hence the probability that it will lie in the span of the first $\ i-1\ $ rows is $\ \frac{q^{i-1}}{q^{o_2}}=q^{i-1-o_2}\ $. Therefore the probability that it is not in the span of the first $\ i-1\ $ rows is $\ 1-q^{i-1-o_2}\ $, and the probability that the matrix is non-singular is then the product of those quantities over $\ i\ $ from $\ 1\ $ to $\ o_2\ $.