Originally Posted by

**sashikanth** Thank you for your reply. I was thinking of this approach but I'll tell you why I abandoned it. Firstly a clarification: when 'a' is an integer modulo p, does that mean that 'a' can not be greater than p-1?

There is no "greater", "bigger" or the like in finite fields. When you talk about "an integer modulo p" you must think in a representative of some residue class modulo p. You can choose your representatives from the integer $\displaystyle \{0,1,\ldots,p-1\}$ , but you infinite possible choices for them: for example, with p = 5, the next are full representative sets modulo 5: $\displaystyle \{0,1,2,3,4\}\,,\,\,\{10,11,12,13,14\}\,,\,\,\{25, 41, 122, -57, -1\}\,,\,\,$ etc.

If this is true, then consider this train of thought. The first row has $\displaystyle p^2 - 1 $ ways of being formed, 1 being subtracted because the option of both 'a' and 'b' being zero. Now if the two rows are to be LI, then the 2nd row should NOT be a scalar multiple of the first row. Therefore the number of options for the 2nd row are $\displaystyle p^2 - p $ options so the answer should be $\displaystyle (p^2 - 1)(p^2 - p) $ matrices.

Exactly...way to go! That's all you need. As a nice exercise calculate the number of regular matrices n x n modulo p, for any natural number n.

This is what I thought of. Let p=3. Consider a=1 and b=2 as the 1st row of the given matrix. Now one of the rows that we eliminated in the 2nd row was 2x{1,2} = {2,4} i.e b=4 and d=4. But since b and d are integer modulo p, they can not take value of 4. Hence we have, in our calculation, eliminated an additional value. So shouldn't our answer be wrong?