Good Random Matrices over Finite Fields

The random matrix uniformly distributed over the set of all m-by-n matrices over a finite field plays an important role in many branches of information theory. In this paper a generalization of this random matrix, called k-good random matrices, is studied. It is shown that a k-good random m-by-n matrix with a distribution of minimum support size is uniformly distributed over a maximum-rank-distance (MRD) code of minimum rank distance min{m,n}-k+1, and vice versa. Further examples of k-good random matrices are derived from homogeneous weights on matrix modules. Several applications of k-good random matrices are given, establishing links with some well-known combinatorial problems. Finally, the related combinatorial concept of a k-dense set of m-by-n matrices is studied, identifying such sets as blocking sets with respect to (m-k)-dimensional flats in a certain m-by-n matrix geometry and determining their minimum size in special cases.


Introduction
Let F q be the finite field of order q andG the random matrix uniformly distributed over the set F m×n q of all m × n matrices over F q . It is well known that the linear code ensemble {uG : u ∈ F m q } generated byG as a generator matrix (nontrivial for m < n) is good in the sense of the asymptotic Gilbert-Varshamov (GV) bound [3]. In fact, the ensemble {v ∈ F n q :Gv T = 0} generated byG as a parity-check matrix (nontrivial for m < n) is also good [16]. The application of G is not confined to channel coding. It also turns out to be good for Slepian-Wolf coding [11], lossless joint source-channel coding (lossless JSCC) [33], etc.
The success ofG in information theory exclusively depends on the fundamental property (1) P {uG = v} = q −n ∀u ∈ F m q \ {0}, ∀v ∈ F n q . Actually, any random matrix satisfying (1) has the same performance asG for channel coding, lossless JSCC, etc. We call such random matrices good random matrices. Definition 1.1. A good random matrix is a random matrix satisfying (1). The collection of all good random m × n matrices over F q is denoted by G(m, n, F q ).
In what follows it is usually safe to identify random matrices, i.e. measurable maps Ω → F m×n q defined on some abstract probability space (Ω, A, P ) and relative to the full measure algebra on F m×n q , with their associated probability distributions. In this model G(m, n, F q ) is just the set of functions f : F m×n q → R satisfying f (A) ≥ 0 for all A ∈ F m×n q and A:uA=v f (A) = q −n for all u ∈ F m q \ {0}, v ∈ F n q . In some sense, the random matrixG is trivial, since its distribution has support F m×n q , the set of all m × n matrices. Naturally, one expects to find other good random matrices with distributions of smaller support size. In [34], it was shown that a random m × n matrix uniformly distributed over a Gabidulin code, a special kind of maximum-rank-distance (MRD) code [12,15,31], is a good random matrix with a distribution of support size as small as q max{m,n} . However, this is not the end of the story. Further questions arise. What is the minimum achievable support size (of the distribution) of a good random matrix and what is the relation between good random matrices and MRD codes?
In this paper, we answer the above questions. At first, we prove two fundamental facts-a random matrix is good if and only if its transpose is good, and a random matrix uniformly distributed over an MRD code is good. Using these facts, we show that the minimum support size of a good random m × n matrix is q max{m,n} and that a random m × n matrix with support size q max{m,n} is good if and only if it is uniformly distributed over an (m, n, 1) MRD code. Based on this result and knowledge about MRD codes, we also explain how to construct good random matrices with minimum support size as well as general good random matrices with larger support size. Furthermore, we extend the above results to families of special good random matrices called k-good random matrices (k = 1, 2, 3, . . . ). An ordinary good random matrix is a 1-good random matrix in this sense, and a (k + 1)-good random matrix is necessarily a k-good random matrix. It is shown that there is a one-to-one correspondence (up to probability distribution) between k-good random m × n matrices with minimum support size and (m, n, k) MRD codes.
Additional examples of k-good random matrices are provided by so-called homogeneous weights on F m×n q , which are defined in terms of the action of the ring of m × m (resp. n × n) matrices over F q on F m×n q . Originally these weight functions had been introduced as a suitable generalization of the Hamming weight on the prime fields Z p to rings of integers Z n . Later they were generalized to other finite rings and modules, including the case under consideration.
Next some examples are given to show applications of k-good random matrices and their close relation with some well-studied problems in coding theory and combinatorics.
Finally we investigate the related (but weaker) combinatorial concept of k-dense sets of m × n matrices over F q . When viewed as sets of linear transformations, these k-dense sets induce by restriction to any k-dimensional subspace of F m q the full set of linear transformations from F k q to F n q . We show that k-dense sets of m × n matrices over F q are equivalent to blocking sets with respect to (m − k)-dimensional flats (i.e. point sets having nonempty intersection with every (m − k)-dimensional flat) in a certain matrix geometry, which arises from the module structure of F m×n q relative to the right action by the ring of n × n matrices over F q . Among all k-dense subsets A ⊆ F m×n q those meeting every flat in the same number of points are characterized by the fact that the random m × n matrixÃ uniformly distributed over A is k-good.
The study of blocking sets in classical projective or affine geometries over finite fields is central to finite geometry and has important applications (to the packing problem of coding theory, for example). Quite naturally the focus lies on minimal blocking sets and their properties. We close the section on k-dense sets of matrices by determining the minimum size of k-dense sets (blocking sets with respect to (m − k)-dimensional flats) in certain cases. The example of binary 3 × 2 matricessmall enough to be solved by hand computation, but already requiring a considerable amount of geometric reasoning -is worked out in detail.
The paper is organized as follows. In Section 2, we study the minimum support size of good random matrices and their relation to MRD codes. In Section 3, we introduce and study k-good random matrices. Homogeneous weights and their use for the construction of k-good random matrices are discussed in Section 4. In Section 5, we discuss the application of k-good random matrices to some well-known combinatorial problems. Section 6 contains the material on k-dense sets of matrices, and Section 7 concludes our paper with some suggestions for further work.
In the sequel, if not explicitly indicated otherwise, all matrices and vectors are assumed to have entries in the finite field F q . Vectors are denoted by boldface lowercase letters such as u, v, w, which are regarded as row vectors. Matrices are denoted by boldface capital letters such as A, B, C. By a tilde we mean that a matrix (resp. vector) such asÃ (resp.ṽ) is random, i.e. subject to some probability distribution A → P (Ã = A) on F m×n q (in the case of matrices). 1 Sets of matrices are denoted by script capital letters such as A, B, C. For the set {AB : A ∈ A} (resp. {AB : B ∈ B}) of products of matrices, we use the short-hand AB (resp. AB). The Gaussian binomial coefficient n m q is defined by Finally, we will say that A ∈ F m×n q is of full rank if rank(A) = min{m, n}.

Good Random Matrices and MRD Codes
For any random matrixÃ, we define the support ofÃ by It is clear that the support size of a good random m × n matrix is greater than or equal to q n . On the other hand, in [34], we constructed a good random matrix with support size q max{m,n} , which gives an upper bound on the minimum support size of good random matrices. Combining these two facts then gives When m ≤ n, the two bounds coincide and hence give the exact minimum support size. When m > n, however, it is not clear what the minimum support size is. 1 The exact nature of the random variablesÃ,ṽ does not matter in our work, so that they can be safely identified with their distributions (respectively, joint distributions in the case of several random variables). 2 Here we tacitly assume that an empty product is 1.
To answer this question, we need the following fundamental theorem about good random matrices.

Theorem 2.1. A random matrix is good if and only if its transpose is good.
The following lemma will be needed for the proof.
On the other hand, we note that Combining these two identities gives where v ∈ F m q (which preserves the uniform distribution of uṽ T ), then gives that Proof of Th. 2.1. LetÃ be a random m × n matrix over F q . If it is good, then for any u ∈ F m q \ {0} and v ∈ F n q \ {0}, the product uÃv T = u(vÃ T ) T is uniformly distributed over F q . Lemma 2.2 shows that vÃ T is uniformly distributed over F m q . In other words,Ã T is good. Conversely, ifÃ T is good, thenÃ = (Ã T ) T is good.
From Th. 2.1 it is clear that the minimum support size of good random m × n matrices is q max{m,n} . Furthermore, we find a close relation between good random matrices with minimum support size and MRD codes.
Let A be a subset of F m×n q of size |A| ≥ 2. The rank distance d(A) of A is the minimum rank of X − Y over all distinct X, Y ∈ A. The Singleton bound tells us that the size of A satisfies the following inequality [12,15,31]: A set of matrices achieving this upper bound is called a maximum-rank-distance (MRD) code.

Definition 2.3.
Suppose m, n, k are positive integers with k ≤ min{m, n}. An (m, n, k) MRD code over F q is a set A of q k max{m,n} matrices in F m×n q such that d(A) = min{m, n} − k + 1.
The next lemma gives an equivalent condition for MRD codes. It is a consequence of [12,Th. 5.4]. For the convenience of our readers we give a direct proof below.
Proof. (Necessity) It suffices to show that B(X − Y) = 0 implies X = Y for any X, Y ∈ A. Note that rank(B) = k, so that The case m ≥ n ≥ k is done similarly.
The next two theorems establish the relation between good random matrices and MRD codes.

Theorem 2.5.
A random matrix uniformly distributed over an (m, n, k) MRD code is good.
We must show that |{A ∈ A : uA = v}| = q (k−1)n . We choose a full-rank matrix B ∈ F k×m q with first row equal to u. By Lemma 2.4 the number of A ∈ A satisfying uA = v equals the number of matrices in F k×n q with first row equal to v, i.e. q (k−1)n as asserted.
Theorem 2.6. The minimum support size of a good random m × n matrix is q max{m,n} . A random m × n matrix with support size q max{m,n} is good if and only if it is uniformly distributed over an (m, n, 1) MRD code.
Proof. The first statement is an easy consequence of Theorems 2.1 and 2.5. Let us prove the second statement.
At first, it follows from Th. 2.5 that a random matrix uniformly distributed over an (m, n, 1) MRD code is a good random matrix with support size q max{m,n} . Conversely, for a good random m × n matrixÃ with | supp(Ã)| = q max{m,n} and m ≤ n, we have | supp(Ã)| = q n and u(supp(Ã)) = F n q for every u ∈ F m q \{0}, which implies that supp(Ã) is an (m, n, 1) MRD code (Lemma 2.4) and the probability distribution is uniform. As for the case of m > n, transpose the random matrix and apply Th. 2.1.

Remark 1.
For a good random m × n matrixÃ with minimum support size, if supp(Ã) contains the zero matrix, then it follows from Th. 2.6 that This is an important property. For comparison, recall that for the random matrix G defined at the beginning of this paper, we only have It is known that (m, n, k) MRD codes exist for all positive integers m, n, k with k ≤ min{m, n}. The standard construction is based on the representation of F qlinear endomorphisms of F q m by q-polynomials of q-degree less than m (polynomials of the form m−1 i=0 a i X q i with a i ∈ F q m ) and is analogous to that of the classical Reed-Solomon codes: Take the set L k of all F q -linear transformations L : those represented by q-polynomials of q-degree less than k) and form the corresponding set A k of q km matrices over F q representing the linear transformations in L k with respect to some fixed basis of F q m over F q . The set A k forms an (m, m, k) MRD code. "Rectangular" (m, n, k) MRD codes with m ≥ n can then be obtained by deleting the last m − n columns, say, of each matrix in A k (This follows from Lemma 2.4.) The construction of MRD codes just described has been found independently in [12,15,31]. In [12] they were called Singleton systems. Following recent practice we refer to them as Gabidulin codes.
For the full-rank case d(A) = min{m, n} we now restate the construction in the language of matrix fields, so as to provide some new insights. Without loss of generality, we suppose again m ≥ n.
At first, choose a subring F m (containing 1) of the ring of all invertible m × m matrices that is a finite field of order q m . For example, suppose that α is a primitive element of F q m and all elements in F q m are identified with a row vector with respect to the basis {1, α, ("companion matrix" of the minimum polynomial of α over F q ), the set F m = {0, I, K, K 2 , . . . , K q m −2 } forms such a field. The subfield F m is clearly an (m, m, 1) MRD code. It is unique up to similarity transformations, i.e every other subfield of order q m has the form P −1 F m P for an appropriate invertible m × m matrix P.
Next, choose an arbitrary m × n full-rank matrix A. Then the linear subspace F m A of F m×n q is an (m, n, 1) MRD code. We note that to each F m A there corresponds an orbit of F × m on the set Ω(m, n, F q ) of all m × n full-rank matrices, where F × m denotes the multiplicative subgroup of nonzero elements of F m and the action is given by (F, X) → FX for F ∈ F × m and X ∈ Ω(m, n, F q ). Therefore, for given F m , the number of such generated MRD codes is equal to the number of orbits, i.e., (6) |Ω(m, n, Remark 2. MRD codes over F q with parameters (m, 2, 1) (or, mutatis mutandis, (2, n, 1)) are closely related to the concept of an orthomorphism and that of a complete mapping of the abelian group (F m q , +). A map f : F m q → F m q is said to be an orthomorphism of (F m q , +) if both f and x → f (x) − x are bijections of F m q , and a complete mapping if f and x → f (x) + x are bijections; see [14,29] for further information.
An (m, 2, 1) MRD code A over F q with m ≥ 2 can be represented in the form A = (x|f (x)); x ∈ F m q with a unique function f : F m q → F m q . The MRD code property requires further that f is a bijection and f (x) − f (y) = α(x − y) for all x, y ∈ F m q with x = y and all α ∈ F q ; in other words, the maps x → f (x) + αx must be bijections of F m q for all α ∈ F q . In the special case q = 2 MRD codes with parameters (m, 2, 1), orthomorphisms of F m 2 and complete mappings of F m 2 are thus equivalent. This observation implies in particular that there exist binary (m, 2, 1) MRD codes which are neither linear nor equal to a coset of a linear code (on account of the known existence of nonlinear complete mappings of F m 2 for m = 4; see [35]). Th. 2.6 together with the above comments gives the construction of good random matrices with minimum support size. For the construction of a general good random matrix, we need the following simple property. Theorem 2.7. LetÃ be a good random m × n matrix andB an arbitrary random m×n matrix. LetP be a random invertible m×m matrix andQ a random invertible n × n matrix. IfÃ is independent of (P,Q,B), thenPÃQ +B is good.
The proof is left to the reader. In Th. 2.7, if supp(Ã) is a subspace of F m×n q andP andQ are simply identity matrices, then where π supp(Ã) denotes the canonical projection from F m×n q onto F m×n q / supp(Ã). Therefore, based on good random matrices with minimum support size, it is possible to construct a good random matrix whose support size is a multiple of q max{m,n} .

k-Good Random Matrices
In Section 2 we showed a one-to-one correspondence between good random m× n matrices with minimum support size and (m, n, 1) MRD codes. From the viewpoint of aesthetics, the current "picture" of good random matrices, MRD codes and their relations is not satisfactory, since there is yet no appropriate place for a general (m, n, k) MRD code with k > 1. In this section we study properties of random matrices uniformly distributed over general (m, n, k) MRD codes and round off the picture.
Definition 3.1. Let k, m, n be positive integers with k ≤ min{m, n}. A random m × n matrixÃ is said to be k-good if for every full-rank matrix M ∈ F k×m q , the product MÃ is uniformly distributed over F k×n q . The collection of all k-good random m × n matrices is denoted by G k (m, n, F q ).
Thus a random m × n matrixÃ is k-good if for any choice of k linearly independent vectors u 1 , . . . , u k ∈ F m q and any choice of k arbitrary vectors v 1 , .
In the language of linear transformations, Def. 3.1 requires that for every k- Here Hom(V, W ) denotes the space of all linear transformations from V to W .
In the sequel, when speaking of a k-good random m × n matrix, we shall tacitly assume that k ≤ min{m, n}. By definition, it is clear that Our goal is now to generalize the one-to-one correspondence of Th. 2.6 to kgood random m × n matrices and (m, n, k) MRD codes. To this end, we shall first establish a generalization of Th. 2.1.

Theorem 3.2. A random m × n matrix is k-good if and only if its transpose is k-good.
Analogous to the proof of Th. 2.1, we need a generalization of Lemma 2.2. But before that, we need some preparatory counting lemmas.  Then By assumption we have dim(f (F m q )) = m and dim(g(F n q )) = l. Our goal is to count the number of mappings f such that dim(g(f (F m q ))) = k. Since so that the number of all possible mappings f is We are now ready to state and prove the generalization of Lemma 2.2, which will be used in the proof of Th. 3.2.
On the other hand, the sum can be rewritten as Combining the above identities gives min{m,n−m+k} Solving these equations with the identities In particular, P {Ñ = 0} = q −mn . ReplacingÑ withÑ − N then shows that shows that NÃ T is uniformly distributed over F k×m q . In other words,

Proof of
The next theorem, a generalization of Th. 2.6, gives the one-to-one correspondence between k-good random matrices of minimum support size and (m, n, k) MRD codes.
Theorem 3.6. The minimum support size of a k-good random m × n matrix is q k max{m,n} . A random m × n matrix with support size q k max{m,n} is k-good if and only if it is uniformly distributed over an (m, n, k) MRD code.
Proof. Owing to Th. 3.2, it suffices to establish the theorem for m ≤ n. It is clear that the support size of a k-good random m × n matrix must not be smaller than q kn = q k max{m,n} . Lemma 2.4 shows that a random m × n matrix uniformly distributed over an (m, n, k) MRD code achieves this lower bound. On the other hand, for a k-good random m × n matrixÃ with | supp(Ã)| = q k max{m,n} , we have | supp(Ã)| = q kn and M(supp(Ã)) = F k×n q for every full-rank matrix M ∈ F k×m q , which implies that supp(Ã) is an (m, n, k) MRD code (Lemma 2.4) and the probability distribution is uniform.
A corollary follows immediately.
There is also a generalization of Th. 2.7 for constructing a general k-good random matrix.
Theorem 3.7. Let k, m, n, s, t be positive integers such that k ≤ s ≤ m and k ≤ t ≤ n. LetÃ be a k-good random m × n matrix andB an arbitrary random s × t matrix. LetP be a random full-rank s × m matrix andQ a random full-rank n × t matrix. IfÃ is independent of (P,Q,B), thenPÃQ +B is a k-good random s × t matrix.
The theorem readily follows from the observation that, under the given conditions, for any full-rank matrices M ∈ F k×s q , P ∈ F s×m q , Q ∈ F n×t q the product MPÃQ is uniformly distributed over F k×t q . The details are left to the reader.

Homogeneous Weights on Matrix Spaces
Further examples of k-good random matrices are provided by the so-called left and right homogeneous weights on F m×n q , suitable scaled to turn it into a probability distribution. Denoting by R t the ring of t × t matrices over F q , the set F m×n q can be regarded as an R m -R n bimodule, i.e. it is both a left R m -module and a right R n -module (relative to the natural actions) and has the property that AXB = (AX)B = A(XB) is independent of the choice of parenthesis. The left homogeneous weight w ℓ : F m×n q → R is uniquely defined by the following axioms: 3 By R × m we denote the group of units of Rm, i.e. the general linear group of degree m over Fq.
This represents the more general definition of a homogeneous weight in [17], adapted to the case of modules over finite rings considered in [23]. According to [23,Prop. 7] the function w ℓ is explicitly given by .
The left submodules of F m×n q are in one-to-one correspondence with the subspaces of F n q by the map sending a left submodule U to the subspace of F n q generated by the row spaces of all matrices in U; see [23, Lemma 1] for example. In the case m ≥ n all left submodules of F m×n q are cyclic, so that the equation in (H3) holds for all left submodules U of F m×n q and w ℓ is a left homogeneous weight on F m×n q in the stronger sense defined in [23]. If m < n then F m×n q contains non-cyclic left submodules (those which correspond to subspaces of F n q of dimension > m) and the equation in (H3) does not remain true for these.
The right homogeneous weight w r : F m×n q → R is defined in the analogous way using the right R n -module structure of F m×n q . The preceding remarks hold mutatis mutandis for w r . From (7) it is clear that w ℓ = w r in the "rectangular" case m = n (while of course w ℓ = w r for m = n).
Obviously w ℓ (and similarly w r ) can be scaled by a constant γ > 0 to turn it into a probability distribution on where the last step follows from the q-analogue of a well-known identity for binomial coefficients (the case q = 1). 4 Our particular interest in homogeneous weights in this paper is due to the following result:  The weight w ℓ is a probability distribution on F 2×3 2 and satisfies (H1), (H2). However, since |U| −1 X∈U w ℓ (X) = 1 56 for all submodules U = {0} and U = F 2×3 2 , the weight w ℓ cannot yield a 1-good random 2 × 3 matrix over F 2 .
On the other hand, the weight w r defines, by Th. 4.2, a 1-good random matrix A ∈ F 2×3 2 . This means that every coset of a right submodule U of F 2×3 2 of size |U| = 8 (which is one of the modules U 1 , U 2 , U 3 corresponding to column spaces generated by ( 1 0 ), ( 0 1 ), ( 1 1 ), respectively) has total weight 1/8. For the submodules U i this is obvious, since they contain the all-zero 2 × 3 matrix and 7 matrices of rank 1 and weight 1/56. For the remaining cosets U i + A with A / ∈ U i it implies that each such coset contains 2 matrices of rank 1 and 6 matrices of rank 2.
Then we consider the case of binary 3 × 2 matrices. By Th. 4.2 (or direct application of Th. 3.2) the weight w ℓ : F 3×2 2 → R, which is the transpose of w r : F 2×3 2 → R, defines a 1-good random matrix on F 3×2 2 . Since 1-goodness refers to the right module structure of F 3×2 2 , this provides additional insight into the combinatorics of the rank function; namely, one may infer the following rank distributions of the cosets of right submodules U of F 3×2 2 of size |U| = 16. Each such submodule contains 1 matrix of rank 0, 9 matrices of rank 1 and 6 matrices of rank 2. Each of the three cosets U + A with A / ∈ U contains 4 matrices of rank 1 and 12 matrices of rank 2.

Applications of k-Good Random Matrices
As shown at the beginning of this paper, 1-good random matrices are of fundamental importance in information theory. Quite naturally one may wonder whether there are any applications of k-good random matrices with k > 1. In this section we present such applications and their relations to some well-known combinatorial problems. Some of the proofs are easy and hence left to the reader.
The following result is a direct consequence of Def. 3.1 and the fact that distinct nonzero vectors in a binary vector space are linearly independent. Proposition 1. LetÃ be a 2-good random matrix over F 2 . The random mapping F : F m 2 \ {0} → F n 2 given by u → uÃ satisfies the pairwise-independence condition: , and u 1 = u 2 . Pairwise-independence of codewords is a prerequisite in the direct-part proof of the coding theorem for lossless JSCC (also including the case of channel coding), so Prop. 1 indeed provides an alternative random coding scheme for optimal lossless JSCC (cf. [33, Sec. III-C]). Definition 5.1 (see [9]). A set of vectors in F n q is said to be intersecting if there is at least one position i such that all their i-th components are nonzero. A linear code is said to be k-wise intersecting if any k linearly independent codewords intersect.

Proposition 2. LetÃ be a k-good random m × n matrix. Define the random set
Asymptotically, as m, n go to infinity with m/n = r, so that whenever C is k-wise intersecting with high probability that converges to 1 as n → ∞.

Sketch of Proof. Note that the expectation
linearly independent and not intersecting is slightly overestimated by are not intersecting . The latter can be easily computed by the property of a k-good random matrix. The proof is completed by applying Markov's inequality.
Proposition 2 shows that a k-good random matrix can achieve the asymptotic (random coding) lower bound (10) of maximum rate of linear k-wise intersecting codes. Recall that linear k-wise intersecting codes has a close relation to many problems in combinatorics, such as separating systems [6,30], qualitative independence [9], frameproof codes [10], etc.
In general, many problems about sequences can be formulated as follows: and every S ∈ F. The maximum number of elements in an F-subset of F n q is denoted by N (F, n).
be a sequence of M n random vectors in F n q such that eachṽ i is uniformly distributed over F n q and any k random vectors v i1 ,ṽ i2 , . . . ,ṽ i k , 1 ≤ i 1 < i 2 < · · · < i k ≤ M n , are independent. Then for any given family F of subsets of F k q , if we can extract fromC(M n , k) a random F-set of sizeM n such that lim n→∞M n M n = 1 almost surely. 5 Thus W ((v i ) k i=1 ) ⊆ F k q is the set of columns of the matrix with rows v 1 , . . . , v k (in that order).
Next we apply the analogous reasoning with k ′ = 2 and the set family F ′ having (u, v) ∈ F 2 q ; u = v as its single member (a family of subsets of F 2 q ). Here the random set of "undesirable pairs" is Using the second inequality lim sup n→∞ n −1 log q M n < 1 from (11), we obtain similarly P {|Ũ ′ | ≥ αM n /4} ≤ n −2 for all n ≥ n 1 (α). Now we remove fromC(M n , k) all components which appear in at least one undesirable k-tuple or pair. The resulting sequence has distinct components and constitutes a random Taking α = l −1 with l = 1, 2, . . ., we finally obtain Proposition 3 tells us that the asymptotic lower bound (11) for N (F, n) can be achieved by a family of special sequences of random vectors, which may be called k-independent sequences (of random vectors). The next two propositions provide some ways for generating a k-or (k + 1)-independent sequence based on a k-good random matrix.
By assumption the k × m matrix with rows u i1 , . . . , u i k has full rank, and the result follows immediately from Def. 3.1.
Finding a set of M vectors in F m q such that any k of them are linearly independent is equivalent to finding an m × M parity-check matrix of a q-ary linear [M, K, d] code with K ≥ M − m and d ≥ k + 1. It is thus an instance of the packing problem of algebraic coding theory; see [21,22,28]. 6 Also note that Prop. 4 includes Prop. 1 as a special case.

Proposition 5. LetÃ be a k-good random m × n matrix andṽ a random vector independent ofÃ and uniformly distributed over
Proof. This can be seen as an "affine analogue" of Prop. 4, and is proved as follows: 7 where the last equality follows from the k-goodness ofÃ and the linear independence of {u ij − u i1 } k+1 j=2 .
Proposition 5 provides an alternative way for generating a k-independent sequence. For example, to generate a 2-independent sequence, we may use a 1-good random matrix and simply choose U = F m q , which has been well known in the random coding approach (see, e.g., [33] and the references therein). Similarly, for a 3-independent sequence over F 2 , we may use a 2-good random matrix over F 2 and let U = F m 2 . The next corollary states this fact. Corollary 2. LetÃ be a 2-good random matrix over F 2 andṽ a random vector independent ofÃ and uniformly distributed over F n 2 . The random mapping F : F m 2 → F n 2 given by u → uÃ +ṽ satisfies for distinct u 1 , u 2 , u 3 ∈ F m 2 and arbitrary v 1 , v 2 , v 3 ∈ F n 2 . Similar to Prop. 1, the corollary depends in an essential way on the fact that no three points in an affine space of order 2 are collinear.

Dense Sets of Matrices
In this section we investigate a fundamental property of sets of m × n matrices over F q , which is shared by the support of every k-good random m × n matrix over F q . Definition 3.1 implies that for any full-rank matrix M ∈ F k×m q and any matrix K ∈ F k×n q , there exists a matrix A ∈ suppÃ such that MA = K. This motivates the following Definition 6.1. Let k, m, n be positive integers with k ≤ min{m, n}. A set A ⊆ F m×n q is said to be k-dense if MA = F k×n q for every full-rank matrix M ∈ F k×m q . As in the case of "good" we use the terms 1-dense and dense interchangeably.
In the sequel, we tacitly assume that k ≤ min{m, n}. In the language of linear transformations Def. 6.1 requires that for every k-dimensional subspace U ⊆ F m q the restriction map A → Hom(U, F n q ), f → f | U is surjective. The definition also has a nice geometric interpretation, which we now proceed to discuss. Definition 6.2. The left affine space of m × n matrices over F q , denoted by AG ℓ (m, n, F q ), is the lattice of cosets (including the empty set) of left R m -submodules of F m×n q . A coset A + U is called an r-dimensional flat (r-flat) if U ∼ = F m×r q as an R m -module. Equivalently, the subspace of F n q generated by the row spaces of all matrices in U has dimension r; cf. the remarks in Section 4. 8 As usual, flats of dimension 0, 1, 2, n − 1 are called points, lines, planes, and hyperplanes, respectively. The whole geometry (i.e. the flat F m×n q ) has dimension n.
Right affine spaces of rectangular matrices are defined in an analogous manner and denoted by AG r (m, n, F q ). Since A → A T defines an isomorphism between AG ℓ (m, n, F q ) and AG r (n, m, q), it is sufficient to consider only left (or only right) affine spaces of rectangular matrices. For notational convenience we have started our discussion with left affine spaces. Right affine spaces, being the appropriate framework for dense sets as defined above, will be used after the following remark. 8 Note also that the Rm-modules F m×r q , r = 1, 2, . . . , form a set of representatives for the isomorphism classes of finitely generated Rm-modules (a special case of a general theorem about simple Artinian rings [27, Ch. 1]).

Remark 3.
Other descriptions of AG ℓ (m, n, F q ) have appeared in the literature. Consider the geometry H (m+n−1,m−1) q whose points are the (m− 1)-flats of PG(m+ n − 1, q) skew to a fixed (n − 1)-flat W , and whose lines are the m-flats of PG(m + n − 1, q) meeting W in a point. The map which sends A ∈ F m×n q to the row space of (I m , A) is easily seen to define an isomorphism from AG ℓ (m, n, F q ) onto H (m+n−1,m−1) q . The geometry AG ℓ (m, n, F q ) is related to the space of rectangular m × n-matrices over F q (see [32,Ch. 3]), but it is not the same. 9 The special case m = 2, in which H is an example of a so-called semipartial geometry, is discussed in [8, 2.2.7].
Another description is by means of a so-called linear representation in the ordinary affine space AG(n, F q m ) over the extension field F q m : Identify the point set of AG ℓ (m, n, F q ) with that of AG(n, F q m ) by viewing the columns of A ∈ F m×n q as coordinate vectors with respect to a fixed basis of F q m over F q . It is then readily verified that the lines of AG ℓ (m, n, F q ) correspond exactly to those lines of AG(n, F q m ), whose associated 1-dimensional subspace ("direction") is spanned by a vector in F n q . In other words, a line L of AG(n, F q m ) belongs to AG ℓ (m, n, F q ) if and only if L meets the hyperplane PG(n − 1, F q m ) at infinity in a point of the subgeometry PG(n − 1, F q ). 10 Again the special case m = 2 is mentioned in [8, 2.3.2].
The following lemma provides the geometric interpretation of k-dense sets of matrices and the link with k-good random matrices. The condition in (ii) is equivalent to A being a k-design of index λ in the sense of [12]. 11 Since F m×n q is the union of q kn flats parallel to a given (m − k)-flat, the constant λ in (ii) must be equal to |A|q −kn .
Proof. Obviously a necessary and sufficient condition for A ⊆ F m×n q to be k-dense is that A contains a set of coset representatives for every annihilator subspace of full rank. We have A ∈ U if and only if the column space of X is contained in the orthogonal complement (an (m − k)-dimensional space) of the row space of M. Hence these annihilator subspaces are exactly the (m − k)-flats of AG r (m, n, F q ) through 0, and Part (i) is proved.
As in the case of k-good matrices, we are interested in the minimum size of a k-dense subset of F m×n q . We denote this size by µ k (m, n, F q ). With the aid of our 9 In the Geometry of Matrices lines are defined as cosets of Fq-subspaces generated by rank-one matrices. 10 Thus the line set of AG ℓ (m, n, Fq) is the union of q n −1 q−1 parallel classes of lines of AG(n, F q m ). 11 For this one has to identify matrices in F m×n q with bilinear forms F m q × F n q → Fq.
previous results it will be easy to determine the numbers µ k (m, n, F q ) for m ≤ n.
The case m > n is considerably more difficult and includes, for example, the problem of determining the minimum size of a blocking set with respect to (m−k)-flats in the ordinary affine space AG(m, F q ) ∼ = AG r (m, 1, F q ), which (despite a lot of research by finite geometers) remains unsolved in general. Here we will restrict ourselves to easy-to-derive bounds and then work out completely the smallest nontrivial case.
We start with the case m ≤ n. The (nontrivial) minimum blocking sets of Th. 6.4 have no analogue in the geometries PG(m, F q ) or AG(m, F q ): For 1 ≤ k ≤ m the only point sets in PG(m, F q ) or AG(m, F q ) meeting every (m − k)-flat in the same number of points are ∅ and the whole point set. This is due to the fact that the corresponding incidence structures are nontrivial 2-designs and hence their incidence matrices have full rank; cf. [13, p. 20] or the proof of Fisher's Inequality in [18,Ch. 10.2].
Th. 6.5 does not require that m ≤ n. In the case m > n it says, mutatis mutandis, that subsets A ⊆ F m×n q meeting every (m − k)-flat of AG r (m, n, F q ) in a constant number λ of points exist only if λ is a multiple of q k(m−n) , the smallest such sets being again the (m, n, k) MRD codes (the case λ = q k(m−n) ).

Remark 4.
If A ⊆ F m×n q is both k-dense and an F q -subspace of F m×n q , then A meets every (m − k)-flat of AG r (m, n, F q ) in the same number of points and gives rise to a k-good random m×n-matrixÃ in the sense of Lemma 6.3. (This follows by consideration of the F q -linear maps A → F k×n q , A → MA, with M ∈ F k×n q of full rank, which are surjective.) Moreover, Th. 6.5 (or Th. 3.2) applies, showing that the property "k-dense F q -subspace" is preserved under A → A T and the minimum dimension of a k-dense F q -subspace of F m×n q is k max{m, n}.
From now on we assume m > n. First we collect some general information about the numbers µ k (m, n, F q ) in this case. Theorem 6.6. (i) µ 1 (m, 1, q) = 1 + m(q − 1) for all m ≥ 2.
(ii) For 1 ≤ k ≤ n < m we have the bounds q kn < µ k (m, n, F q ) < q km .
Proof. (i) A dense subset of F m×1 q is the same as a blocking set with respect to hyperplanes in the ordinary affine space AG(m, F q ). The minimum size of such a blocking set is known to be 1+m(q −1) and is realized (among other configurations) by the union of m independent lines through a fixed point of AG(m, F q ); see the original sources [7,24] or [2,Cor. 2.3], [5,Th. 6.1].
(ii) For the lower bound note that a set A ⊆ F m×n For the upper bound in (ii) choose A as a linear (m, n, k) MRD code. Then |A| = q km , and by Th. 6.5 the set A meets every (m − k)-flat of AG r (m, n, F q ) in q k(m−n) points. Hence any subset A ′ ⊆ A of size at least q km − q k(m−n) + 1 is still k-dense, and consequently µ k (m, n, F q ) ≤ q km − q k(m−n) + 1 < q km .
The bounds in Th. 6.6(ii) are rather weak and serve only to refute the obvious guesses "µ k (m, n, F q ) = q kn " or "µ k (m, n, F q ) = q km ". Refining these bounds will be left for subsequent work. Instead we will now work out completely the binary case (m, n) = (3, 2) (the smallest case left open by Th. 6.6).
Before giving the result we will collect a few combinatorial facts about the geometry AG r (3, 2, F 2 ). Perhaps the most important property is that the substructure consisting of all lines and planes through a fixed point is isomorphic to PG(2, Let us now consider a plane of AG r (3, 2, F 2 ), which is isomorphic to AG r (2, 2, F 2 ). In F 2×2 2 there are 9 matrices of rank 1 (accounting for the nonzero points on the 3 lines through 0) and 6 matrices of rank 2, which together with 0 form two (linear) MRD codes: Every further MRD code is a coset of either A or A ′ . The 12 lines of AG r (2, 2, F 2 ) and the 8 MRD codes impose on F 2×2 2 the structure of the affine plane of order 4. 12 Clearly the MRD codes are exactly the blocking sets (with respect to lines) of AG r (2, 2, F 2 ) of minimum size 4. For slightly larger blocking sets we have the following result, which is needed in the proof of our next theorem. Proof. (i) Consider S as a set of points in AG(2, F 4 ). If S meets every line of AG(2, F 4 ) in at most 2 points, then S is an oval and has intersection pattern 2, 2, 1, 0 with each parallel class of lines of AG(2, F 4 ). In particular S is not a blocking set in AG r (2, 2, F 2 ). Likewise, if S meets some line of AG r (2, 2, F 2 ) in at least 3 points, it cannot be a blocking set (since it cannot block all lines in the corresponding parallel class). Hence S meets some line L outside AG r (2, 2, F 2 ) (i.e. an MRD code) in at least 3 points. But then S must also contain the 4-th point on L, which is the point of concurrency of 3 lines in AG r (2, 2, F 2 ). Thus S contains L and is disjoint from some line (MRD code) parallel to L.
(ii) This follows from the fact that the minimum size of a blocking set in AG(2, F 4 ) is 7.
(iii) Since the point set can be partitioned into 4 MRD codes (in two different ways), this is clear for |S| = 7, and for |S| = 8 it can fail only if S meets every MRD code in 2 points. However a set S with this property must contain a line of AG(2, F 4 ) and, by symmetry, also be disjoint from some line. Hence it cannot be a blocking set in AG r (2, 2, F 2 ). 13 The following property of AG r (3, 2, F 2 ) will also be needed. Proof. This is evident, since the plane spanned by the lines xz and yz contains x, y, and z. Now we are ready to state and prove our theorem concerning the numbers µ k (3, 2, F 2 ). Theorem 6.9. (i) µ 1 (3, 2, F 2 ) = 6; (ii) µ 2 (3, 2, F 2 ) = 22.
Proof. (i) Let A be a dense set of points, i.e. A meets every plane of AG(3, 2, F 2 ). In Th. 6.6(ii) we have seen that |A| ≥ 5. If |A| = 5 then exactly one plane in every parallel class contains 2 points of A and the three other planes contain exactly 1 point of A. Thus 7 planes meet A in 2 points and 21 planes meet A in 1 point. On the other hand, every pair of distinct points of A is contained in at least one plane. Since there are 10 such pairs, we have a contradiction. Hence necessarily |A| ≥ 6. In order to finish the proof, we exhibit a dense set A with |A| = 6: (ii) First we exhibit a blocking set with respect to lines of size 22. We identify F 3×2 2 with F 2 8 by viewing the columns of A ∈ F 3×2 2 as coordinate vectors relative to 13 If there is no 4-line, then every point of S is on three 2-lines and two 3-lines, which gives 8 · 2/3 as the number of 3-lines, a contradiction. 1, α, α 2 , where α 3 +α+1 = 0. The lines of AG(2, F 8 ) fall into three parallel classes of lines belonging to AG ℓ (3, 2, F 2 ) and represented by F 8 (1, 0), F 8 (0, 1), F 8 (1, 1), and six parallel classes defining MRD codes in F 3×2 2 and represented by M i = F 8 (1, α i ), 1 ≤ i ≤ 6. We now set and show that A is a blocking set with respect to lines in AG r (3, 2, F 2 ). Any point (a, b) / ∈ M i , where i ∈ {1, 2, 4} is fixed, is collinear in AG r (3, 2, F 2 ) with exactly 3 points of M i (the points (x, y) ∈ M i satisfying x = a, y = b, or x + y = a + b). In particular this applies to the nonzero points on one of the MRD codes M i , when considered relative to the other two MRD codes. Now consider a line L of AG r (3, 2, F 2 ) containing 2 points of A. We claim that L contains a third point of A, and hence that L meets A in exactly 3 points (since it is transversal to each M i ).
With this property at hand it is now easy to show that A is a blocking set with respect to lines in AG r (3, 2, F 2 ). Indeed, A meets 7 lines in 1 point (the lines through 0), 21 lines in 3 points (the lines connecting two points in different MRD codes M i and M j ), and hence 4 · 21 = 84 lines in 1 point (the remaining lines through a point in one of the MRD codes). This accounts for 7 + 21 + 84 = 112 lines, i.e. all the lines of AG r (3, 2, F 2 ), proving the assertion.
Next we show that any blocking set A with respect to lines in AG r (3, 2, F 2 ) has size at least 22. To this end we consider the plane sections of A with respect to some parallel class H 1 , H 2 , H 3 , H 4 of planes of AG r (3, 2, F 2 ). The indexing will be chosen in such a way that i → |A ∩ H i | is nondecreasing.
Since A ∩ H i must be a blocking set in H i , we have |A ∩ H i | ≥ 4. If |A ∩ H i | ∈ {4, 5, 6} then there exists, by Lemma 6.7, an MRD code M ⊂ H i disjoint from A. If some section A ∩ H i has size 6, we have |A| ≥ 22 and are done. This leaves as obstructions the intersection patterns (4,4,4,8), (4,4,5,8), (4,5,5,7) with the planes H i . However, in such a case there exist, again by Lemma 6.7, MRD codes M i ⊆ A ∩ H i for i = 1, 2, 3 and a set M 4 = {x 1 , x 2 , x 3 } of three pairwise noncollinear points with M 4 ∩ A = ∅ in the plane H 4 . Each of the 4 lines through a point x i which are not contained in H 4 must be incident with at least one point of A, and these 4 (or more) points must be transversal to M i for i = 1, 2, 3. 14 Moreover, the point sets arising in this way from x 1 , x 2 , x 3 must be pairwise disjoint. In all three cases this cannot be accomplished, showing that |A| ≤ 21 is impossible.

Conclusion
Good random matrices are of particular interest and importance. In this paper, we determined the minimum support size of a k-good random matrix and established the relation between k-good random matrices with minimum support size and MRD codes. We showed that homogeneous weights on matrix rings give rise to k-good random matrices, and we explored the connections between k-good random matrices, k-dense sets of matrices and the geometry of certain matrix spaces.
However, our understanding of k-good random matrices is still limited. Consider for example the following problem about the collection G k (m, n, F q ) of all k-good random m × n matrices over F q , which clearly forms a convex polytope in q mndimensional Euclidean space.
Problem. Determine the structure of G k (m, n, F q ) in more detail.
A basic question is that about the vertices of this polytope. It is clear from Th. 3.6 that every (m, n, k) MRD code over F q gives rise to a vertex of G k (m, n, F q ) (the uniform distribution over this code). But there are other vertices, as the following binary example with (m, n) = (2, 3) shows.
The geometry AG r (2, 3, F 2 ) has 3 parallel classes of lines represented by the subspaces (lines through 0) (14) L 1 = a 1 a 2 a 3 0 0 0 , L 2 = 0 0 0 a 1 a 2 a 3 , L 3 = a 1 a 2 a 3 a 1 a 2 a 3 , where it is understood that (a 1 , a 2 , a 3 ) runs through all of F 3 2 . Let us choose 3 nonzero points A i ∈ L i , i = 1, 2, 3, which are linearly dependent over F 2 (for example the points obtained by setting a 1 = 1, a 2 = a 3 = 0) and a 4-dimensional F 2 -subspace A of F 2×3 2 satisfying A ∩ L i = {0, A i } (continuing the example, we can take A as the set of all matrices A = (a ij ) ∈ F 2×3 2 satisfying a 12 + a 13 + a 23 = a 12 + a 22 + a 23 = 0). The set A meets every line of AG r (2, 3, F 2 ) in 2 points and hence determines a 1-good random 2 × 3 matrixÃ (by assigning probability 1 16 to every element of A). But A does not contain a (2, 3, 1) MRD code, since such a code would intersect some coset of the subspace {0, A 1 , A 2 , A 3 } of A in at least 2 points and hence contain 2 points A, A + A i of some line A + L i . ConsequentlyÃ cannot be written as a convex combination of MRD codes.
The determination of all vertices of G k (m, n, F q ) seems to be a challenging problem, even for moderately sized values of m, n, q.
We end this paper with another "generic" research problem.
Problem. Investigate the geometries AG r (m, n, F q ) from the viewpoint of Galois geometry. In particular determine either exactly (for small values of m, n, q) or approximately (i.e. by bounds) the minimum size of blocking sets (maximum size of arcs) in AG r (m, n, F q ).
For what has been done in the classical case (i.e. n = 1), see [21,22] and various chapters of [4] for an overview.