Defining the q-analogue of a matroid

This paper defines the q-analogue of a matroid and establishes several properties like duality, restriction and contraction. We discuss possible ways to define a q-matroid, and why they are (not) cryptomorphic. Also, we explain the motivation for studying q-matroids by showing that a rank metric code gives a q-matroid.

This paper establishes the definition and several basic properties of q-matroids. Also, we explain the motivation for studying q-matroids by showing that a rank metric code gives a q-matroid. We give definitions of a q-matroid in terms of its rank function and independent spaces. The dual, restriction and contraction of a q-matroid are defined, as well as truncation, closure, and circuits. Several definitions and results are straightforward translations of facts for ordinary matroids, but some notions are more subtle. We illustrate the theory by some running examples and conclude with a discussion on further research directions involving q-matroids.
Many theorems in this article have a proof that is a straightforward qanalogue of the proof for the case of ordinary matroids. Although this makes them appear very easy, we feel it is needed to include them for completeness and also because it is not a guarantee that q-analogues of proofs exist.
This forms the basis of quantum calculus, and we refer to Kac and Cheung [13] for an introduction to the subject. In combinatorics, one can view the q-analogue as what happens if we generalize from a finite set to a finite dimensional vector space. The "q" in q-analogue does not only refer to quantum, but also to the size of a finite field. In the latter case, [n] q is the number of 1-dimensional vector spaces of a vector space F n q ; but also in general, we can view 1-dimensional subspaces of a finite dimensional space as the q-analogues of the elements of a finite set. In this text we keep in mind finite fields, because of applications, but we will consider finite dimensional vector spaces over both finite and infinite fields.
If we consider q as the size of a finite field, the q-binomial counts the number of subspaces of F n q of dimension k. For infinite fields, we get a polynomial in q that can be considered as the counting polynomial of the Grassmann variety of k-dimensional subspaces of an n-dimensional vector space, see [17]. In most cases, we can go from the q-analogue to the "normal" case by taking the limit for q → 1. This can also be viewed as projective geometry over the field F 1 , as is nicely explained by Cohn [5].
Two notions that were not mentioned above, because they need a bit more caution, are the difference and the complement. When taking the difference A − B of two subsets A and B, we mean "all elements that are in A but not in B". The q-analogue of this would be "all 1-dimensional subspaces that are in A but not in B". The problem is that when A and B are finite dimensional spaces, all these 1-dimensional subspaces together do not form a subspace. Sometimes this is not a problem, as we will see for example in property (I3) later on. We have several options for A − B as a subspace. We can take a subspace C with C ∩ B = 0 and C ⊕ (A ∩ B) = A. However, this space is not uniquely defined. We can also take the orthogonal complement, but this has the disadvantage that A ∩ A ⊥ can be non-trivial. Using the quotient space as a complement will lower the dimension of the ambient space, which makes it perfect for the definition of contraction but not very suitable for other purposes. The solution to this problem is to use all options described above, depending on for which property of A − B we need a q-analogue.

Rank function
Although it is not strictly necessary to know about matroids before defining their q-analogue, the subject probably makes a lot more sense with ordinary matroids in mind. A great resource on matroids is Oxley [16]. Another one, that we will follow for in our search for cryptomorphic definitions of a qmatroid and the proofs of their equivalence, is Gordon and McNulty [9]. Definition 2.1. A q-matroid M is a pair (E, r) in which E is a finite dimensional vector space over a field F and r an integer-valued function defined on the subspaces of E, called the rank, such that for all subspaces A, B of E:  Note that this definition is a straightforward q-analogue of the definition of a matroid in terms of its rank. In the same way, we define the following. Definition 2.2. Let M = (E, r) be a q-matroid and let A be a subspace of E. If r(A) = dim A, we call A an independent space. If not, A is called dependent. If A is independent and r(A) = r(E), we call A a basis. The rank of M is denoted by r(M) and is equal to r(E). A 1-dimensional subspace that is dependent, is called a loop.
These definitions might cause some confusion at first: we assign a rank to a subspace that has little to do with its dimension, and we call a complete subspace (in)dependent. However, we stick to these notions because they are a direct q-analogue of what happens in ordinary matroids. Before we go to an example, we prove a Lemma that will be used repeatedly.
Proof. First note that for any q-matroid r(0) = 0 and r(x) is either 0 or 1, by (r1). Now apply property (r3) to A and x: Example 2.4. Let E be a finite dimensional vector space of dimension n. Let 0 ≤ k ≤ n be an integer. Define a function r on the subspaces of E as follows: To show that (E, r) is a q-matroid, we have to show that r satisfies the properties (r1),(r2),(r3). First of all, r is an integer valued function. It is clear from the definition of r that (r1) and (r2) hold. For (r3), let A, B be subspaces of E. We distinguish three cases, depending on the dimensions of A and B.
If r(A) = dim A and r(B) = dim B, then the definition of r implies that r(A ∩ B) = dim A ∩ B. By the modularity of dimension and (r2) it follows that If r(A) = r(B) = k, this implies that also r(A + B) = k. Since r(A ∩ B) ≤ k by definition, we have that Finally, let r(A) = dim A and r(B) = k. Since dim B ≥ k, we also have that We conclude that (E, r) is indeed a q-matroid. We call it the uniform qmatroid and denote it by U k,n . Its independent spaces are all subspaces of dimension at most k, and its bases are all subspaces of dimension k.
The following two Propositions can be viewed as a variation of (r3). We will use them in later proofs.
Proposition 2.5. Let r be the rank function of a q-matroid (E, r) and let Proof. We prove this by induction on So the x i are generated by linearly independent vectors. Note that k is finite, since dim(A + B) is finite and k ≤ dim(A + B).
If k = 0, then B ⊆ A so clearly r(A + B) = r(A). Now assume that r(A+x 1 +· · ·+x t ) = r(A) for all t < k. We have to show that r(A + x 1 + · · ·+ x k ) = r(A). By (r2) we have that r(A) ≤ r(A + x 1 + · · · + x k ). By (r3) we have that which is equal to and thus r(A + x 1 + · · · + x k ) ≤ r(A). We conclude that equality holds, and since A + x 1 + · · · + x k = A + B, this proves the statement.
Proposition 2.6. Let r be the rank function of a q-matroid (E, r), let A be a subspace of E and let x, y be 1-dimensional subspaces of E. Suppose r(A + x) = r(A + y) = r(A). Then r(A + x + y) = r(A).
Proof. Applying (r3) to A + x and A + y gives the following equivalent statements: On the other hand, by (r2) we have that r(A) ≤ r(A + x + y), so equality must hold.
We end this section with a remark about the difference between matroids and q-matroids. Let (F n q , r) be a q-matroid defined over a finite field. Let X be the set of 1-dimensional subspaces of E and define a function on the subsets of X as follows: that is, we take the rank in the q-matroid of the span of A. Then it is not difficult to show that (X, ρ) is a matroid. However, this matroid behaves a lot different from the q-matroid that we started with. For example, it has q n −1 q−1 elements and rank n, which means its rank is very low in comparison to its cardinality. Also, if we take the usual duality, we do not get the dual q-matroid (that we define later) because the complement of a subspace in X is not a subspace. Similar remarks hold for restriction and contraction, as well as for the link with rank metric codes. In short, by changing to the matroid (X, ρ), we lose a lot of the structure of the q-matroid (F n q , r).

Independent spaces
Now that we have defined a q-matroid in terms of its rank function, a logical question is to ask if we could also define it in terms of its independent spaces, bases, etcetera. Unfortunately, the answer to this question is not as easy as just taking the q-analogues of cryptomorphic definitions of an ordinary matroid. The goal of this section is to establish the next cryptomorphic definition of a q-matroid.
(I2) If J ∈ I and I ⊆ J, then I ∈ I.
(I3) If I, J ∈ I with dim I < dim J, then there is some 1-dimensional subspace x ⊆ J, x ⊆ I with I + x ∈ I.
(I4) Let A, B ⊆ E and let I, J be maximal independent subspaces of A and B, respectively. Then there is a maximal independent subspace of A+B that is contained in I + J.
and r is the function defined by r I (A) = max{dim I : I ∈ I, I ⊆ A} for all A ⊆ E, then (E, r I ) is a q-matroid and its family of independent spaces is equal to I. Conversely, if I r is the family of independent spaces of a q-matroid (E, r), then I r satisfies the conditions (I1),(I2),(I3),(I4) and r = r Ir .
The first three properties are a direct q-analogue of the axioms we use when we define an ordinary matroid in terms of its independent sets. The property (I4) however is really needed, as the next example and counter example show.
Example 3.2. Let E = F 4 2 and let I be the set of all subspaces of dimension at most 2 that do not contain the 1-dimensional space 0001 . Now I is not empty, so it satisfies (I1). If a space does not contain 0001 , then all its subspaces also do not contain 0001 , hence (I2) holds. For (I3), the interesting case is to check for dim I = 1 and dim J = 2, with I ⊆ J. From all the three 1-dimensional spaces x in J, there can only be one such that I + x contains 0001 , hence we have proved (I3). We will see in the next section that I is indeed the family of independent subspaces of a q-matroid. In order to understand why we need the extra axiom (I4), let us investigate a bit what goes wrong in the counter example.
Lemma 3.4. Let x and y be loops of a q-matroid. Then the space x + y has rank 0.
Or in other words: loops come in subspaces. This Lemma might look trivial, but it is exactly what goes wrong in Example 3.3. Take the loops 1000 and 0001 : their sum has rank 1. The difference with ordinary matroids is that for sets, A ∪ B contains only elements that were already in either A or B.
In the q-analogue this is not true: the space A + B contains 1-dimensional subspaces that are in neither A nor B. Therefore, it is "more difficult" to bound r(A + B), making it also more difficult for property (r3) to hold.
Remark 3.5. Let I be the family of independent spaces of a q-matroid with ground space E. Embed I in a space E ′ with dim E ′ > dim E, resulting in a family I ′ . Then I ′ is not the family of independent spaces of a q-matroid over E ′ . This is because all 1-dimensional spaces that are in E ′ but not in E are loops, but they do not form a subspace: this contradicts Lemma 3.4. It follows that a set of axioms for I that is invariant under embedding can never be a full set of axioms that defines a q-matroid.
Again, if we look back at Example 3.3, we see that this counter example was created by embedding a uniform matroid in a space of bigger dimension. So in order to completely determine a q-matroid in terms of its independent spaces, we need an extra axiom that regulates how the spaces in I interact with the other subspaces of the q-matroid. This is what the axiom (I4) does. We will now prove in three steps that (I4) holds for every q-matroid. Proposition 3.6. Let (E, r) be a q-matroid. Let A ⊆ E and let I be a maximal independent subspace of A. Let x ⊆ E be a 1-dimensional space. Then there is a maximal independent subspace of A + x that is contained in Proof. If x ⊆ A, the result is clear. If r(A) = r(A + x) then I is a maximal independent set in A + x and I ⊆ I + x, so we are also done. Therefore assume that x is not contained in A and r(A) = r(A + x). By Lemma 2.3 this means r(A + x) = r(A) + 1. If A is independent, then A + x = I + x also has to be independent, so the statement is proven. Assume that A is not independent. Then there are A ′ , y ⊆ A such that A = A ′ + y and I ⊆ A ′ , hence r(A) = r(A ′ ). Now we use Proposition 2.6 on A ′ , x, and y. We have that r(A ′ +x+y) = r(A+x) = r(A) by assumption, so r(A ′ ), r(A ′ +x) and r(A ′ +y) can not all be equal since this would contradict Proposition 2.6. Because r(A ′ ) = r(A) and r(A ′ +y) = r(A), it needs to be that r(A ′ + x) = r(A). In fact, r(A ′ + x) > r(A). If A ′ is independent, then A ′ = I and we have that A ′ + x = I + x is independent as well. This proves the statement. If A ′ is not independent, we repeat the procedure above: find A ′′ and y ′ such that A ′ = A ′′ + y ′ and I ⊆ A ′′ , and apply Proposition 2.6. We keep doing this until we arrive at r(I + x) > r(A), which means I + x is independent.
This result has the following consequence. First of all, the result holds for all maximal independent subspaces I ⊆ A. Suppose that r(A + x) = r(A) + 1. For all 1-dimensional subspaces z ⊆ A+x, z ⊆ A, we have that A+x = A+z. Hence, for all these z, we have that I + z is independent. Also, all these z have to be independent themselves, by (I2). So if enlarging a space raises its rank, it means all added 1-dimensional subspaces are independent and all combinations of I + z have to be independent as wel.
Proposition 3.7. Let (E, r) be a q-matroid. Let A ⊆ E and let I be a maximal independent subspace of A. Let B ⊆ E. Then there is a maximal independent subspace of A + B that is contained in I + B.
Proof. The proof goes by induction on dim B. If dim B = 0 then the statement is trivially true. If dim B = 1 the statement is true by Proposition 3.6 above. Assume dim B > 1 and the statement is true for all subspaces with dimension less then dim B. Let B ′ be a subspace of B of codimension 1. By the induction hypothesis there is a maximal independent subspace J of A + B ′ that is contained in Proposition 3.8. Let (E, r) be a q-matroid. Let A, B ⊆ E and let I, J be maximal independent subspaces of A and B, respectively. Then there is a maximal independent subspace of A + B that is contained in I + J.
Proof. By Proposition 3.7 there is a maximal independent subspace of A + B that is contained in I+B. This subspace is also maximal independent in I+B, by (r2) and On the other hand, if we apply the same Proposition 3.7 to B and I, we find a maximal independent subspace K of B + I that is contained in J + I. Again, K is also maximal independent in J + I, by (r2) and J + I ⊆ B + I. So r(I + B) = r(I + J). This implies that r(A + B) = r(I + J), hence the subspace K ⊆ I + J is maximal independent in A + B, as was to be shown.
Before finally proving Theorem 3.1, we prove a variation of the properties (I1),(I2),(I3). We denote by 0 the 0-dimensional subspace that contains only the zero vector.
• Part 1. Let M = (E, r) be a q-matroid and define the family I to be those subspaces I of E for which r(I) = dim I. We will show I satisfies (I1'),(I2),(I3'),(I4). By (r1), r(0) = 0, so r(0) = dim 0 and 0 ∈ I, hence (I1'). (I4) was proven in Proposition 3.8. For (I2), let J ∈ I and I ⊆ J. We use (r3) with A = I and B a subspace of J such that A ∩ B = 0 and A + B = J, to show dim I = r(I). The following is independent of the choice of B. Since dim J = r(J), we have By (r1), we have Combining and using (r3) gives so we must have equality everywhere. This means, with (r1), that r(B) = dim(B) and r(I) = dim I. Therefore I ∈ I and (I2) holds. We will prove (I3') by contradiction. Let I, J ∈ I with dim I < dim J and let x a 1-dimensional subspace x ⊆ J, x ⊆ I. Suppose that (I3) fails, so I + x / ∈ I. Then we have r(I) = dim I but r(I + x) = dim(I + x) = dim I + 1. By (r1) and (r2) we have that The second inequality can not be an equality, so the first inequality has to be an equality: r(I +x) = r(I). Now this reasoning holds for every 1-dimensional subspace x ⊆ J, x ⊆ I so by Proposition 2.5 we have that r(I) = r(I + J). But J ∈ I and we have that which contradicts (r2) because J ⊆ I + J. So (I3) has to hold. • Part 2. Let I be a family of subspaces of E that satisfies (I1),(I2),(I3),(I4). Define r(A) to be the dimension of the largest independent space contained in A. We show r satisfies (r1),(r2),(r3). Since the rank is a dimension, it is a non-negative integer. From the definition of r we have r(A) ≤ dim A and from (I1') we have 0 ≤ r(A). This proves (r1). If A ⊆ B ⊆ E, then every independent subspace of A is an independent subspace of B, so and thus (r2). The difficultly in this part is to prove (r3). Let A, B ⊆ E and let I A∩B be a maximal independent space in A ∩ B. Use (I3) as many times as possible to extend I A∩B to a maximal independent space I A ⊆ A, and the same to get a maximal independent space I B ⊆ B. By Proposition 3.8 there is a maximal independent space Combining all this, we have and this is exactly (r3).

Rank metric codes
Now that we have established some basic facts about q-matroids, we are ready to discuss the motivation of studying them. We show that every rank metric code gives rise to a q-matroid. For more on rank metric codes, see Gabidulin [8]. We consider codes over L, where L is a finite Galois field extension of a field K. This is a generalization of the case where K = F q and L = F q m of Gabidulin's [8] to arbitrary characteristic as considered by Augot, Loidreau and Robert [2,1]. Much of the material here about rank metric codes is taken from [11,12]. See also [14].
Let K be a field and let L be a finite Galois extension of K. A rank metric code is an L-linear subspace of L n . To all codewords we associate a matrix as follows. Choose a basis B = {α 1 , . . . , α m } of L as a vector space over K. . This definition follows from the rank distance, that is defined by d R (x, y) = rk(x − y). The rank distance is in fact a metric on the collection of all m × n matrices, see [2,8].
Note that this definition is the rank metric case of the support weights, or weights of subcodes, of codes over the Hamming metric.
Definition 4.2. For a K-linear subspace J of K n we define: From this definition it is clear that C(J) is a K-linear subspace of C, but in fact it is also an L-linear subspace. Proof. The following statements are equivalent: Hence C(J) = {c ∈ C : c · y = 0 for all y ∈ J}. From this description it follows directly that C(J) is an L-linear subspace of C.
Definition 4.4. Let C be an L-linear code of length n. Let J be a K-linear subspace of K n of dimension t with generator matrix Y . Define the map π J : L n → L t by π J (x) = xY T , and C J = π J (C).
Lemma 4.5. Let C be an L-linear code of length n. Let J be a K-linear subspace of K n of dimension t with generator matrix Y . Then π J is an Llinear map and C J is an L-linear code of length t and its dimension does not depend on the chosen generator matrix. Furthermore we have an exact sequence of vector spaces: and A and B T are invertible. Hence G ′ (Y ′ ) T and GY T have the same rank. Therefore the dimension of C J does not depend on the chosen generator matrix for J. The map C(J) → C is injective and the map π J : C → C J is surjective, both by definition. Furthermore the kernel of π J : C → C J is equal to {c ∈ C : c · y = 0 for all y ∈ J}, which is equal to C(J) by Lemma 4.3.
Hence the given sequence is exact.  Proof. This is a direct consequence of Proposition 4.5.
We now know enough about rank metric codes to show that there is a qmatroid associated to them. Proof. First of all, it is clear that r is an integer valued function defined on the subspaces of E. We need to show that r satisfies the properties (r1),(r2),(r3). Let I, J ⊆ E. We will make heavy use of Corollary 4.7, saying r(J) = k−l(J).
This follows from the definition of r(J) = dim C J and the fact that C J is a subspace of K t with t = dim J. We have shown that the function r satisfies (r1),(r2),(r3), so we conclude that (E, r) is indeed a q-matroid.
Corollary 4.9. The rank of the q-matroid M(C) associated to a rank metric code C is dim C.
Proof. We have that r(M(C)) = r(E) = dim C − l(E) and also E ⊥ = 0, so C(E) = 0 and r(M(C)) = dim C. Conversely, let c ∈ (C ⊗ L ′ )(I). Then c · x = 0 for all x ∈ I. Let g 1 , . . . , g k be a basis of C over L. Then g 1 , . . . , g k is also a basis of C ⊗ L ′ over L ′ . There exist λ 1 , . . . , λ k ∈ L ′ such that c = k i=1 λ i g i . Let α 1 , . . . , α m be a basis of L ′ over L. Then for every i there exist λ i1 , . . . , λ im ∈ L such that and α 1 , . . . , α m is a basis of L ′ over L. So k i=1 λ ij g i · x = 0 for all j and all x ∈ I. Hence k i=1 λ ij g i ∈ C(I) for all j. Therefore c ∈ (C(I)) ⊗ L ′ , and (C ⊗ L ′ )(I) ⊆ (C(I)) ⊗ L ′ . We conclude that l(I), the dimension of C(I) over L is also the dimension of (C ⊗ L ′ )(I) over L ′ . Hence the rank functions of the q-matroids M(C) and M((C ⊗ L ′ )) are the same.
Example 4.11. Let L = F 8 and K = F 2 . Let a ∈ F 8 with a 3 = 1 + a. Let C be the rank metric code over L with generator matrix We can find the matroid associated to C by finding its bases. They are independent, so their rank equals their dimension, which is 2. These are the subspaces J of Using the theory of rank metric codes, we can learn more about the function l(J). The next Proposition is the q-analogue of the well-known fact that the minimum distance is the minimal number of dependent columns in a parity check matrix of the code.
Proof. The first inequality is a direct consequence of Proposition 4.13. Let t > n − d R and let c ∈ C(J). Then J is contained in the orthoplement of Rsupp(c), so t ≤ n − wt R (c). It follows that wt R (c) ≤ n − t < d R , so c is the zero word and therefore l(J) = 0.
Example 4.15. Let m ≥ n and let C be an L-linear code of length n, dimension k and minimum distance d R = n − k + 1. Such a code is called an MRD (maximum rank distance) code. Gabidulin [8] constructed such codes over finite fields for all n, k and q. The construction was generalized to characteristic 0 and rational function fields by Augot, Loidreau and Robert [2,1]. The dual of an MRD code is again an MRD code and its minimum distance is therefore d ⊥ R = k + 1. If we apply Lemma 4.14, we find that the function l(J) is completely determined in terms of the dimension t of J: This means that also r(J) is completely determined: As we have seen in Example 2.4, this is the rank function of the uniform q-matroid U k,n .

Truncation
We present the notion of truncation of a q-matroid, so that we can use it in our proofs concerning axioms for bases. From now on we denote by I(M) the independent spaces of the q-matroid M, and if a q-matroid is defined by I, we denote it by (M, I). Because the dimension of an independent space is at most r(M), this means that we simply remove all maximal independent spaces from I(M) to get I(τ (M)).
We have the following straightforward description of the rank function of the truncated matroid:

Bases
Remark 3.5 about the axioms for independent spaces, holds for bases as well: if a set of axioms is invariant under embedding the family of bases B in a space of higher dimension, then it can not completely determine a q-matroid. This is why we need a fourth axiom.  Before proving the theorem, we first prove a slight variation of the axioms.  Finally, for (B4) it is enough to notice that by (I3) every independent space is contained in a basis. So a maximal independent subspace of A ⊆ E is the same as a maximal intersection between a member of B and A. Then (B4) is just a re-formulation of (I4) in terms of bases instead of independent spaces. To verify (I2), we need to show that if I ′ ⊆ I for some I ∈ I, then I ′ ∈ I. By the construction of I, we know I ⊆ B for some B ∈ B. But then I ′ ⊆ I ⊆ B and so I ′ ∈ I and (I2). Now we prove (I3). Let I 1 , I 2 ∈ I with dim I 1 < dim I 2 . We may assume without loss of generality that I 2 is a basis, by truncating the matroid sufficiently many times by Theorem 5.2. Now I 1 is contained in a basis B 1 and I 2 = B 2 is a basis. There exists a codimension 1 subspaces A of B 1 that contains I 1 , since dim I 1 < dim I 2 . Furthermore, we can choose A such that B 1 ∩ I 2 ⊆ A. Hence by (B3) there is a one dimensional subspace y of I 2 such that A + y is a basis and dim A + y = dim I 2 . Now y is not contained in A, since dim A = dim I 2 − 1. Therefore I 1 + y ⊆ A + y and A + y is independent. So I 1 + y independent and y is not contained in I 1 .
Finally, for (I4) we have the same reasoning as in part 1: (I4) is a reformulation of (B4) in terms of independent spaces instead of bases. We need to show that this definition is well-defined, so that the the dual of a q-matroid is again a q-matroid.
Proof. Let A, B ⊆ E. We start with proving (r2), so assume A ⊆ B. Then B ⊥ ⊆ A ⊥ . This means we can find independent vectors x 1 , . . . , x k such that By repeating Lemma 2.3 multiple times, we find that We have the following equivalent statements: Then it follows that and we have proved (r2). For (r1), notice that r * (0) = 0 − r(M) + r(E) = 0 and by (r2) it follows that 0 ≤ r * (A) for all A ⊆ E. The other inequality of (r1) is proved via We show (r3) using the modularity of dimension and semimodularity of r: Now r * satisfies (r1),(r2),(r3), so we conclude that the dual q-matroid is indeed a q-matroid.
In the definition of duality we use the orthogonal complement of a subspace, with respect to the standard inner product in E. We could, however, have chosen any nondegenerate bilinear form on E to define duality. Choosing another inner product (bilinear form) will result in isomorphic duals.
An easy consequence of the definition of duality is the following: as was to be shown.
We can also characterize the bases of the dual q-matroid. This is a straightforward consequence of the theorem above: Example 7.7. Consider the uniform q-matroid U r,n from Example 2.4. We know that its bases are all subspaces of dimension r. This means the bases of the dual are all subspaces of dimension n − r. Thus, the dual of U r,n is U n−r,n .
We have discussed in Section 4 that rank metric codes give rise to q-matroids. We show that the q-matroid associated to the dual code is the same as the dual of the q-matroid associated to the code. Proof. We will show that both matroids have the same set of bases. Let C be k dimensional rank metric code over L and let G be a generator matrix of C. A basis of M(C) * is of the form B ⊥ where B is a basis of M(C). Pick such a basis B of M(C), then r(B) = r(M) = dim B = k. After a K-linear coordinate change of K n we may assume without loss of generality that B has generator matrix Y = (I k |O). (See Berger [3] for more details on rank metric equivalence.) Let G = (G 1 |G 2 ), where G 1 consists of the first k columns of G and G 2 consists of the last n−k columns of G. Then GY T = G 1 is a generator matrix of C B . Now dim L (C B ) = k, since B is a basis. So C B = L k . Hence, after a base change of C we may assume without loss of generality that C has generator matrix G ′ = (I k |P ). Therefore H = (−P T |I n−k ) is a parity check matrix of C and a generator matrix of C ⊥ . Now Z = (O|I n−k ) is a generator matrix of B ⊥ and HZ T = I n−k is a generator matrix of (C ⊥ ) B ⊥ . So (C ⊥ ) B ⊥ = L n−k and B ⊥ is a basis of M(C ⊥ ). Therefore B(M(C) * ) ⊆ B(M(C ⊥ )). The other inclusion follows from using duality and replacing C by C ⊥ , leading to the following equivalent statements: Example 7.10. Let L = F 8 and K = F 2 . Let a ∈ F 8 with a 3 = 1 + a. Let C ⊥ be the rank metric code that is the dual of the code defined in Example 4.11. It is generated by H = a 2 a 1 0 0 0 0 1 .
We have seen that M(C) is the q-matroid we defined in Example 3.2. Its bases are the 2-dimensional subspaces of E = F 4 2 that do not contain 0001 . This means the bases of M(C) * are the 2-dimensional subspaces of E that do not have 0001 in their complement. We check that these spaces are indeed the bases of M(C ⊥ ). As argued in Example 4.11, we need to show that there are no nonzero codewords of C ⊥ such that Rsupp(c) ⊆ B, where B is a basis of M(C) (which is the orthogonal complement of a basis of M(C) * ). But Rsupp(c) for a nonzero word of C ⊥ has either dimension 3, because a 2 , a and 1 are algebraically independent in F 8 , or it is a multiple of 0001 . In both cases we can not have that Rsupp(c) ⊆ B. So we find that the bases of M(C ⊥ ) are the same as the bases of M(C) * , hence the two q-matroids are the same.
We conclude this section with a definition we will need later.
Definition 7.11. A 1-dimensional subspace that is not in the orthogonal complement of a basis is called an isthmus. Before proving that restriction is well defined, a remark on deletion. For ordinary matroids, deletion of an element e is the same as restriction to the complement of e. For q-matroids, we could say that restriction to H is the same as deletion of the 1-dimensional subspace e orthogonal to H. However, since H might contain e, the term "deletion of e" is a bit misleading. Therefore we prefer to talk about restriction. (r2),(r3).
Before we give examples, we describe the independent spaces of restriction and contraction. Example 8.6. Let U k,n be the uniform q-matroid of Example 2.4 and let e be a 1-dimensional subspace of E. Then the restriction U k,n | e ⊥ has as independent spaces all subspaces of dimension at most k that are contained in e ⊥ . So U k,n | e ⊥ = U k,n−1 for any e. The contraction U k,n /e has as independent subspaces all subspaces of dimension at most k containing e, mapped to E/e. This gives all subspaces in E/e of dimension at most k − 1. So U k,n /e = U k−1,n−1 for any e. Then we can not contract e, since it is a loop. But we can restrict to e ⊥ . The independent spaces that are contained in e ⊥ can not contain e, because e is not in e ⊥ . This means all subspaces of e ⊥ of dimension 2 or less are independent in the restriction, hence M| e ⊥ is the uniform matroid U 2,3 .
From now on, we will always assume that we never restrict to a hyperplane that does not contain a bases, nor contract loops. So if we talk about M| e ⊥ we will assume e is not an isthmus and if we talk about M/e we assume e is not a loop. The following observations are necessary to prove that restriction and contraction are dual operations: Remark 8.8. Since e ⊥ and E/e are both vector spaces over the same field of the same dimension r(M) − 1, they are isomorphic. We construct an explicit isomorphism as follows. Recall that that all subspaces of E/e can be obtained by π(A) with A ⊆ E and e ⊆ A. This gives an isomorphism between the subspaces of E that contain e and the subspaces of E/e. On the other hand, for a subspace A that contains e we can take the orthogonal complement of e inside A by restricting the inner product of E to A. The result is in e ⊥ .
Definition 8.9. We denote bij ϕ : E/e → e ⊥ the isomorphism taking π(A) to the orthogonal complement of e in A. On e ⊥ we have a canonical inner product, which is the restriction of the inner product of E. We denote it by x, y e ⊥ . Using ϕ, we can use it to define an inner product (bilinear form) x, y E/e on E/e given by x, y E/e = ϕ(x), ϕ(y) e ⊥ . 9 Towards more cryptomorphisms An important strength of ordinary matroids is that they have so may cryptomorphic definitions. For q-matroids we already saw a definition in terms of the rank function, independent spaces, and bases. We saw that taking the q-analogue of two cryptomorphic definitions of a matroid can result in statements that are not cryptomorphic. In this section we lay some ground work for more cryptomorphisms.

Circuits
Definition 9.1. Let M = (E, I) be a q-matroid and let C ⊆ E. Then C is a circuit of M if C is a dependent subspace of E and every proper subspace of C is independent.
Example 9.2. Let U k,n be the uniform q-matroid of Example 2.4. Its circuits are all the subspaces of E of dimension k + 1. The circuits of a q-matroid satisfy the following properties.
Theorem 9.4. Let M = (E, I) be a q-matroid and C its family of circuits. Then C satisfies: Proof. Since 0 is independent by (I1'), it is not a circuit and thus (C1) holds.
(C2) follows from the definition of a circuit.
To show (C3), let C 1 , C 2 ∈ C with nontrivial intersection. The space C 1 + C 2 is dependent, since it contains C 1 and C 2 , so it has to contain at least one circuit. We have to prove that for a 1-dimensional x ⊆ C 1 ∩ C 2 we have such a circuit that trivially intersects x. Consider a codimension 1 subspace D of C 1 + C 2 that does not contain x. Then dim D = dim(C 1 + C 2 ) − 1. Assume that D is independent. Now we know that C 1 − C 2 can not be empty, because then C 1 ⊆ C 2 which violates (C2). Similarly, C 2 − C 1 is nonempty. Let X ⊆ C 1 of codimension 1 with C 1 ∩ C 2 ⊆ X. Such an X exists because C 1 − C 2 is nonempty. X is independent, because it is a proper subspace of a circuit. Use (I3) multiple times to extend X to a maximal independent space in C 1 + C 2 , call it Y . Now Y contains C 1 ∩ C 2 , but it does not contain all of C 1 or C 2 by construction.
We now have two independent spaces in C 1 + C 2 : D and Y . But dim Y < dim D contradicts the maximality of Y . So D has to be dependent and we can find a circuit C 3 ⊆ D with x ⊆ C 3 . This proves (C3).
We can already say that these three properties (C1),(C2),(C3) will not be enough to determine a q-matroid, for the same reasons as mentioned in Remark 3.5. If we take the family of circuits of a q-matroid and embed them in a space of higher dimension, then the properties (C1),(C2),(C3) still hold, but Lemma 3.4 fails. So cl is a function from the subspaces of E to the subspaces of E. If a subspace is equal to its closure, we call it a flat.

Closure
Note that the closure is in fact a subspace, by Proposition 2.6 and (r3).
Example 9.6. Let U r,n be the uniform q-matroid of Example 2.4. All subspaces of dimension at most k − 1 are flats, since adding a 1-dimensional subspace will increase the rank. The closure of a basis is the whole space E -in fact, this is true for any q-matroid.
Example 9.7. Let M be the q-matroid of Example 3.2. To find the closure of a 1-dimensional space, we can always add the loop 0001 .
The closure satisfies the following properties.
Theorem 9.8. Let M = (E, r) be a q-matroid and cl its closure. Then cl satisfies for all A, B ⊆ E and 1-dimensional subspaces x, y ⊆ E: It is not known if these properties (cl1),(cl2),(cl3),(cl4) are enough to completely determine a q-matroid.

Further research directions
We have established the definitions and several basic properties of q-matroids. However, this is just the beginning of the research: in potential, all that is known about matroids could have a q-analogue. In this section we make a modest (and somewhat personal) wish-list on where to go next with the research in q-matroids.
In a late stadium, we learned about the work of Crapo [6] on a very closely related topic. Defining an ordinary matroid by its rank function can be viewed as assigning a rank to every element of a Boolean lattice, in such a way that the following properties hold:  Here h(A) is the hight of A in the Boolean lattice, that is, the size of the subset. Join and meet in the Boolean lattice correspond to union and intersection. In this work, we assign a rank with the same properties to every element in a (finite) subspace lattice. The hight of an element in the subspace lattice is its dimension, and the equivalents of join and meet are sum and intersection. The work of Crapo generalises this idea: it turns out that for every complemented modular lattice, one can give the elements a rank function that satisfies the above properties. So, this work on q-matroids can be viewed as a special case of the work of Crapo. Where Crapo's motivation and point of view are much more combinatorial, our work relies heavily on linear algebra and therefore might not be easily generalised. We strongly believe that a combination of the two approaches can greatly benefit the study of q-matroids.
There are many more ways to define matroids that probably have a qanalogue. For example in terms of circuits, flats, hyperplanes, or the closure function. First steps in this direction were taken in Section 9. Another property of matroids that could have a q-analogue is that of connectivity and the direct sum. Special properties of matroids for which we want to decide there is a q-analogue include Pappus, Desargues and Vamos.
The motivation to study q-matroids comes from rank metric codes. There is a link between the weight enumerator of a linear code (in the Hamming metric) and the Tutte polynomial of the associated matroid. It can be established via the function l(J). Can we do the same for q-matroids and rank metric codes?
To answer this question, we must first find the right definition of the Tutte polynomial. Originally, it was defined in terms of internal and external activity of bases of a matroid. It seems not so easy to do the same for q-matroids.
A better place to start would be the rank generating polynomial: First notice that in order to get a finite sum, we need E to be a vector space over a finite field -or maybe we need a different definition to begin with. In the case of a finite field the formula above has a straightforward qanalogue: just replace |A| with dim A. For normal matroids, this polynomial is equivalent to the Tutte polynomial. Greene [10] was the first to prove the link between the Tutte polynomial and the weight enumerator. He used that both behave the same under deletion and contraction. How would that work in q-matroids? This is by no means straightforward. In ordinary matroids, we have that |B Another question regarding the Tutte polynomial, that looks easier to solve, is how it behaves under duality.
For linear error-correcting codes and matroids, the notions of puncturing and shortening of codes generalize to deletion and contraction in matroids. For rank metric codes, the operations of puncturing and shortening are studied in [14]. Linking the notions of restriction and contraction of q-matroids and puncturing and shortening in rank metric codes should help to find a q-analogue for the proof of Greene [10] of the link between the Tutte polynomial and the weight enumerator.
We can consider q-matroids that arise from rank metric codes as representable, analogous to the case for normal matroids. Are all q-matroids representable? A big difference between normal matroids and q-matroids is that all uniform q-matroids are representable by MRD codes, as we have seen in Example 4.15, and MRD codes are known tho exist for all parameters over finite fields [8], in characteristic zero [2], as well as over rational function fields [1].
A very important reason why matroids are studies extensively, is that they are generalizations of many objects in discrete mathematics. It is interesting to see if this holds for q-matroids as well. It is known [7] that Steiner systems give matroids, so called perfect matroid designs: these are matroids where all flats of the same rank have the same size. Do q-ary Steiner systems, the q-analogue of Steiner systems, also give us a special kind of q-matroids? Currently, there is only one q-ary Steiner system known [4]. Perfect matroid designs have been used to construct new Steiner systems. If a q-analogue of a perfect matroid design exists, it provides a new tool in the search for q-ary Steiner systems.
Matroids generalize graphs and graphs are an important class of matroids. For q-matroids, it is not clear if they generalize a q-analogue of a graph. We would expect that if such analogy exists, it follows directly from the notion of circuits of q-matroids. There are some results about q-Kneser graphs, see for example [15], which are the q-analogues of Kneser graphs. But these q-Kneser graphs are still "ordinary" graphs, so it is unlikely that they play the role to q-matroids as graphs do for matroids.
To summarize, we think that one should study q-matroids for the same reasons one should study matroids. There are a lot of problems and questions regarding q-matroids waiting for interested researchers.