1 Introduction

The study of q-matroids, introduced by Crapo [6], has recently attracted renewed attention because of its link to network coding. After the reintroduction of the object by Jurrius and Pellikaan [15] and independently that of (qr)-polymatroids by Shiromoto [19], several other papers have studied these objects, often in relation to rank metric codes. See for example [5, 7,8,9,10, 14, 17].

Roughly speaking, a q-analogue in combinatorics is a generalisation from sets to finite-dimensional vector spaces. So a q-matroid is a finite-dimensional vector space with a rank function defined on its subspaces, satisfying certain properties. One can also view this generalisation from the point of view of the underlying lattice: where matroids have the Boolean lattice (of sets and subsets) as their underlying structure, q-matroids are defined over the subspace lattice. The work of finding a q-analogue often comes down to writing a statement about sets in such a lattice-theoretic way that the q-analogue is a direct rephrasing for the subspace lattice. However, this is often not a trivial task, for two reasons. First, there might be several equivalent ways to define something over the Boolean lattice, where the q-analogues of these statements are not equivalent. Secondly, some statements on the Boolean lattice do not have a q-analogue: the subspace lattice is, contrarily to the Boolean lattice, not distributive.

In this paper we consider the direct sum of two q-matroids. An option to do this is to extend to the realm of sum-matroids [17], but we are looking for a construction that gives a q-matroid. This is one of the cases as mentioned above where the q-analogue is a lot harder than the relatively simple procedure of taking the direct sum of two classical matroids. The latter is defined [16, 4.2.13] as follows. Let \(E_1\) and \(E_2\) be disjoint sets and let \(E=E_1\cup E_2\). Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be two matroids. Then the direct sum \(M_1\oplus M_2\) is a matroid with ground set E. For its rank function, note that we can write any \(A\subseteq E\) as a disjoint union \(A=A_1\sqcup A_2\) with \(A_1\subseteq E_1\) and \(A_2\subseteq E_2\). The rank function of the direct sum \(M_1\oplus M_2\) is now given by \(r(A)=r_1(A_1)+r_2(A_2)\).

If we try to mimic this procedure in the q-analogue, we run into trouble quite fast. Let \(E_1\) and \(E_2\) be disjoint subspaces and let \(E=E_1\oplus E_2\). If we consider a subspace \(A\subseteq E\), it might be that we cannot write it as a direct sum \(A_1\oplus A_2\), with \(A_1\subseteq E_1\) and \(A_2\subseteq E_2\). In fact, most of the subspaces of E cannot be written in this way. Our goal is to define a rank function for these subspaces.

A naive try is to define a rank function in the q-analogue for all spaces \(A\subseteq E\) that can be written as \(A_1\oplus A_2\), and hope that the axioms for the rank function take care of the rest of the spaces. However, as we show with an example in Sect. 3, this procedure does not give us a unique direct sum. As a by-product of this example, we find the smallest non-representable q-matroid.

Our solution for the direct sum of q-matroids is the following. We will first define the notion of matroid union for q-matroids in Sect. 5. Then we show in Sect. 6 that the direct sum of a q-matroid and a loop can be defined. Finally, we define the direct sum of two q-matroids by first adding loops to get two q-matroids on the same ground space and then taking their matroid union.

To motivate this definition we show that this construction has several desirable properties. First of all, it generalises our naive attempt in Sect. 3. Also, taking the dual of a direct sum is isomorphic to first taking duals and then taking the direct sum. Lastly, restriction and contraction to \(E_1\) and \(E_2\) give back one of the original q-matroids.

We finish this paper by briefly considering what it would mean for a q-matroid to be connected (Sect. 7). As one might assume from the difficulty of the direct sum, this is also not an easy endeavour. We outline the problems that appear when trying to make a q-analogue of some of the several equivalent definitions of connectedness in classical matroids.

At the end of this paper (Appendix 1) we give a catalogue of small q-matroids. In the paper, we will often refer to examples from this catalogue. Since the study of q-matroids is a relatively new one, we hope this catalogue to be useful for others learning about q-matroids.

2 Preliminaries

Following the notation of [5] we denote by n a fixed positive integer and by E a fixed n-dimensional vector space over an arbitrary field \(\mathbb {F}.\) The notation \(\mathcal {L}(E)\) indicates the lattice of subspaces of E. For any \(A,B\in \mathcal {L}(E)\) with \(A\subseteq B\) we denote by [AB] the interval between A and B, that is, the lattice of all subspaces X with \(A\subseteq X\subseteq B\). For \(A\subseteq E\) we use the notation \(\mathcal {L}(A)\) to denote the interval \([\{0\},A]\). For more background on lattices, see for example Birkhoff [1].

We use the following definition of a q-matroid.

Definition 1

A q-matroid M is a pair (Er) where r is an integer-valued function defined on the subspaces of E with the following properties:

  1. (R1)

    For every subspace \(A\in \mathcal {L}(E)\), \(0\le r(A) \le \dim A\).

  2. (R2)

    For all subspaces \(A\subseteq B \in \mathcal {L}(E)\), \(r(A)\le r(B)\).

  3. (R3)

    For all \(A,B\in \mathcal {L}(E)\), \(r(A+ B)+r(A\cap B)\le r(A)+r(B)\).

The function r is called the rank function of the q-matroid.

Sometimes, we will need to deal with the rank functions of more than one q-matroid at a time, say \(M,M'\), with ground spaces E, \(E'\), respectively. In order to distinguish them (and emphasise the q-matroid in which we are computing the rank), we will write r(MA) for the rank in M of a subspace \(A\subseteq E\) and \(r(M';A')\) for the rank in \(M'\) of a subspace \(A'\subseteq E'\). For a q-matroid M with ground space E, we use r(M) as notation for r(ME).

We will use the axioms of the rank functions repeatedly in our proofs, as well as the following lemma that follows by induction from the axiom (R2’) in [5, Theorem 31].

Lemma 2

(Local semimodularity) If \(A\subseteq B\subseteq E\) then \(r(B)-r(A)\le \dim B-\dim A\).

A way to visualise a q-matroid is by taking the Hasse diagram of the underlying subspace lattice and colour all the covers: red if the rank goes up and green if the rank stays the same. This is done in Appendix 1. More properties of this bi-colouring can be found in [2].

There are several important subspaces in q-matroids.

Definition 3

Let (Er) be a q-matroid. A subspace A of E is called an independent space of (Er) if

$$\begin{aligned}r(A)=\dim A.\end{aligned}$$

An independent subspace that is maximal with respect to inclusion is called a basis. A subspace that is not an independent space of (Er) is called a dependent space of the q-matroid (Er). We call \(C \in \mathcal {L}(E)\) a circuit if it is itself a dependent space and every proper subspace of C is independent. A spanning space of the q-matroid (Er) is a subspace S such that \(r(S)=r(E)\). A subspace A of a q-matroid (Er) is called a flat if for all 1-dimensional subspaces \(x \in \mathcal {L}(E)\) such that \(x\nsubseteq A\) we have

$$\begin{aligned}r(A+x)>r(A).\end{aligned}$$

A subspace H is called a \({\textbf {hyperplane}}\) if it is a maximal proper flat, i.e. if \(H \ne E\) and the only flat that properly contains H is E. A 1-dimensional subspace \(\ell \) is called a loop if \(r(\ell )=0\). All loops together form a subspace ( [15, Lemma 11]) that we call the loop space of M.

A q-matroid can be equivalently defined by its independent spaces, bases, circuits, spanning spaces, flats and hyperplanes. See [5] for an overview of these cryptomorphic definitions. We will explicitly use the axioms for circuits:

Definition 4

Let \(\mathcal {C}\subseteq \mathcal {L}(E)\). We define the following circuit axioms.

  1. (C1)

    \(\{0\}\notin \mathcal {C}\).

  2. (C2)

    For all \(C_1,C_2\in \mathcal {C}\), if \(C_1\subseteq C_2\), then \(C_1=C_2\).

  3. (C3)

    For distinct \(C_1,C_2 \in \mathcal {C}\) and any \(X\in \mathcal {L}(E)\) of codimension 1 there is a circuit \(C_3 \in \mathcal {C}\) such that \(C_3 \subseteq (C_1+C_2)\cap X\).

If \(\mathcal {C}\) satisfies the circuit axioms (C1)-(C3), we say that \((E,\mathcal {C})\) is a collection of circuits.

Recall that a lattice isomorphism between a pair of lattices \((\mathcal {L}_1,\le _1,\vee _1,\wedge _1)\) and \((\mathcal {L}_2,\le _2,\vee _2,\wedge _2)\) is a bijective function \(\varphi :\mathcal {L}_1\longrightarrow \mathcal {L}_2\) that is order-preserving and preserves the meet and join, that is, for all \(x,y\in \mathcal {L}_1\) we have that \(\varphi (x\wedge _1 y)=\varphi (x)\wedge _2\varphi (y)\) and \(\varphi (x\vee _1 y)=\varphi (x)\vee _2\varphi (y)\). A lattice anti-isomorphism between a pair of lattices is a bijective function \(\psi :\mathcal {L}_1\longrightarrow \mathcal {L}_2\) that is order-reversing and interchanges the meet and join, that is, for all \(x,y\in \mathcal {L}_1\) we have that \(\psi (x\wedge _1 y)=\psi (x)\vee _2\psi (y)\) and \(\psi (x\vee _1 y)=\psi (x)\wedge _2\psi (y)\). We hence define a notion of equivalence and duality between q-matroids.

Definition 5

Let \(E_1,E_2\) be vector spaces over the same field \(\mathbb {F}\). Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be q-matroids. We say that \(M_1\) and \(M_2\) are lattice-equivalent or isomorphic if there exists a lattice isomorphism \(\varphi :\mathcal {L}(E_1)\longrightarrow \mathcal {L}(E_2)\) such that \(r_1(A)=r_2(\varphi (A))\) for all \(A\subseteq E_1\). In this case we write \(M_1 \cong M_2\).

Fix an anti-isomorphism \(\perp :\mathcal {L}(E)\longrightarrow \mathcal {L}(E)\) that is an involution. For any subspace \(X \in \mathcal {L}(E)\) we denote by \(X^\perp \) the dual of X in E with respect to \(\perp \). Note that since an anti-isomorphism preserves the length of intervals, we have for any \(X\le \mathcal {L}(E)\) that \(\dim (X^\perp )=\dim (E)-\dim (X)\).

From a lattice point of view, if \(B=B_1\oplus B_2\), then \(B=B_1\vee B_2\) and \(B_1\wedge B_2=0\). Since \(\perp \) is an anti-isomorphism of \(\mathcal {L}(E)\), we have that \(B^\perp =B_1^\perp \wedge B_2^\perp \) and \(B_1^\perp \vee B_2^\perp =1\). Important operations on q-matroids are restriction, contraction and duality. We give a short summary here and refer to [4, 15] for details.

Definition 6

Let \(M=(E,r)\) be a q-matroid. Then \(M^*=(E,r^*)\) is also a q-matroid, called the dual q -matroid, with rank function

$$\begin{aligned} r^*(A)=\dim (A)-r(E)+r(A^\perp ). \end{aligned}$$

The subspace B is a basis of M if and only if \(B^\perp \) is a basis of \(M^*\). From bi-colouring point of view, we get the dual q-matroid by turning the Hasse diagram upside down and interchange all red and green covers.

Definition 7

Let \(M=(E,r)\) be a q-matroid. The restriction of M to a subspace X is the q-matroid \(M|_X\) with ground space X and rank function \(r(M|_X; A)=r(M;A)\). The contraction of M of a subspace X is the q-matroid M/X with ground space E/X and rank function \(r(M/X;A)=r(M;A)-r(M;X)\). A q-matroid that is obtained by restriction and contraction of M is called a minor of M.

Theorem 8

Restriction and contraction are dual operations, that is, \(M^*/X\cong (M|_{X^\perp })^*\) and \((M/X)^* \cong M^*|_{X^\perp }\).

Finally, we will define what it means for a q-matroid to be representable and give an example of an important class of q-matroids.

Definition 9

Let \(M=(E,r)\) be a q-matroid of rank k over a field K. Let \(A\subseteq E\) and let Y be a matrix with column space A. We say that M is representable if there exists a \(k\times n\) matrix G over an extension field L/K such that for all A, the rank r(A) is equal to the matrix rank of GY over L.

Example 10

Let k be a positive integer, \(k \le n\). The uniform q-matroid is the q-matroid \(M=(E,r)\) with rank function defined as follows:

$$\begin{aligned} r(U):= \left\{ \begin{array}{cl} \dim (U) &{} \text { if } \dim (U) \le k, \\ k &{} \text { if } \dim (U) > k. \end{array}\right. \end{aligned}$$

We denote this q-matroid by \(U_{k,n}\).

3 Intuitive try for the direct sum

As stated in the introduction, the q-analogue of the direct sum is not straightforward. Let \(E=E_1\oplus E_2\) be a direct sum of subspaces and let \(A\subseteq E\). Then we cannot, in general, decompose \(A\subseteq E\) as \(A=A_1\oplus A_2\) with \(A_1\subseteq E_1\) and \(A_2\subseteq E_2\).

With other cryptomorphic definitions of q-matroids we run into similar problems. Look for example at the independent spaces. In the classical case, the independent sets of the direct sum \(M_1\oplus M_2\) are the unions of an independent set in \(M_1\) and an independent set in \(M_2\) [16, Proposition 4.2.8]. If we want to take the direct sum of the q-matroids \(M_1=U_{1,1}\) and \(M_2=U_{1,1}\), we expect all subspaces to be independent. However, not all such spaces can be written as the sum of an independent space in \(M_1\) and an independent space in \(M_2\). Similar problems arise when trying to construct the bases and circuits of the direct sum of the q-matroids \(M_1\) and \(M_2\).

In this section we explore if we can define the rank function of a direct sum of q-matroids by simply defining \(r(A)=r_1(A_1)+r_2(A_2)\) for all A that can be written as \(A=A_1\oplus A_2\), and hoping that the rank axioms will take care of the rest of the subspaces. (Spoiler alert: it will not work).

3.1 First definition and properties

Let us make our first trial to define the direct sum. We start with a definition mimicking the classical case. We consider these properties desirable for the direct sum of q-matroids. We also prove some direct consequences of these properties. The properties from Definition 11 will turn out not to define a unique q-matroid; hence, they are not sufficient for defining the direct sum of q-matroids. However, our final definition will satisfy these properties.

Definition 11

(Minor properties) Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be two q-matroids on trivially intersecting ground spaces. For a q-matroid \(M=(E,r)\) on the ground space \(E=E_1\oplus E_2\) we define the following properties:

  • the minors \(M|_{E_1}\) and \(M/E_2\) are both isomorphic to \(M_1\),

  • the minors \(M|_{E_2}\) and \(M/E_1\) are both isomorphic to \(M_2\).

In particular, it follows from this construction that the rank of M is the sum of the ranks of \(M_1\) and \(M_2\). The next theorem shows that this definition is equivalent to what we recognise as the q-analogue of the definition of direct sum in the classical case.

Theorem 12

Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be two q-matroids on trivially intersecting ground spaces. Let \(M=(E,r)\) be a q-matroid on the ground space \(E=E_1\oplus E_2\). Then M satisfies the minor properties of Definition 11 if and only if for each \(A\subseteq E_1\) and \(B\subseteq E_2\) it holds that \(r(A+B)=r_1(A)+r_2(B)\).

Proof

First, assume M satisfies the minor properties. Note that for all \(A\subseteq E_1\) we have \(r(A)=r(M;A)=r(M|_{E_1};A)=r_1(A)\) and similarly, for all \(B\subseteq E_2\) we have \(r(B)=r_2(B)\). So we need to show that \(r(A+B)=r(A)+r(B)\). We prove this by applying semimodularity multiple times. First we apply it to A and B. Since \(A\cap B=\{0\}\), we have \(r(A\cap B)=0\) and (R3) gives us

$$\begin{aligned} r(A+B)\le r(A)+r(B). \end{aligned}$$

We claim that \(r(M;E_1+B)=r(M;E_1)+r(M;B)\). Indeed, \(r(M/E_1;(E_1+B)/E_1)=r(M_2;B)\) by the minor properties (Definition 11). Moreover, by Definition 7, \(r(M/E_1;(E_1+B)/E_1)=r(M; E_1+B)-r(M;E_1)\). Summing up

$$\begin{aligned}r(M;B)=r(M_2;B)=r(M/E_1;(E_1+B)/E_1)=r(M; E_1+B)-r(M;E_1),\end{aligned}$$

so \(r(M;E_1+B)=r(M;E_1)+r(M;B)\). Now we apply (R3) to \(E_1\) and \(A+B\).

$$\begin{aligned} r(E_1)+r(A+B)&\ge r(E_1+(A+B))+r(E_1\cap (A+B)) \\&= r(B+E_1)+r(A) \\&= r(B)+r(E_1)+r(A). \end{aligned}$$

This implies that

$$\begin{aligned} r(A+B)\ge r(A)+r(B). \end{aligned}$$

Combining the two inequalities gives the desired equality: \(r(A+B)=r(A)+r(B)\).

For the other implication, suppose that \(r(A+B)=r_1(A)+r_2(B)\). The minor properties are symmetric, so we only need to prove the first one. We show that the rank function on \(M|_{E_1}\) is equal to the rank function on \(M_1\). Let \(A\subseteq E_1\). Then

$$\begin{aligned} r(M|_{E_1};A)=r(M;A)=r_1(A)+r_2(0)=r_1(A). \end{aligned}$$

Now for \(M/E_2\), let \(C\subseteq E\) such that \(E_2\subseteq C\). Then we can write \(C=A+E_2\) with \(A\subseteq E_1\). Then

$$\begin{aligned} r(M/E_2;C/E_2)=r(M;C)-r(M;E_2)=r_1(A)+r_2(E_2)-r(M;E_2)=r_1(A). \end{aligned}$$

It follows that \(M|_{E_1}\) and \(M/E_2\) are both isomorphic to \(M_1\). \(\square \)

As mentioned, the classical case of this last theorem is exactly the definition of the rank in the direct sum of matroids. This implies that the minor properties of Definition 11, when applied to the classical case, completely determine the direct sum. We will see in the next subsection that this is not the case in the q-analogue.

We will close this section with some small results that show that the minor properties imply the rank of all spaces of dimension and codimension 1. Note that the next results only depend on the minor properties (Definition 11), with the exception of Lemma 14.

Proposition 13

Let M be a q-matroid satisfying the minor properties. Suppose \(M_1\) has loop space \(L_1\) and \(M_2\) has loop space \(L_2\). Then the loop space of M is \(L_1\oplus L_2\).

Proof

Since loops come in subspaces [15, Lemma 11], \(L_1\oplus L_2\) in E only contains loops. We will show M contains no other loops. Suppose, towards a contradiction, that there is a loop \(\ell \) in M that is not in \(L_1\oplus L_2\). By assumption, \(\ell \) is not in \(E_1\) or in \(E_2\). First we apply the semimodular inequality to \(E_1\) and \(\ell \):

$$\begin{aligned} r(E_1+\ell )+r(E_1\cap \ell )&\le r(E_1)+r(\ell ) \\ r(E_1+\ell )+0&\le r(E_1)+0 \end{aligned}$$

hence \(r(E_1+\ell )=r(E_1)\). Now we consider the 1-dimensional space \(x=(E_1+\ell )\cap E_2\). We claim that this space has rank 1. Towards a contradiction, suppose \(r(x)=0\) hence \(x\subseteq L_2\). Then \(r(\ell +x)=0\). Let y be the 1-dimensional space \((\ell +x)\cap E_1\). It has rank 0 because it is in \(\ell +x\), hence \(y\subseteq L_1\). Now we have \(\ell \subseteq y+x\subseteq L_1\oplus L_2\), which is a contradiction to \(\ell \not \subseteq L_1\oplus L_2\). We conclude that \(r(x)=1\).

Now we apply the semimodular inequality to \(E_1+\ell \) and \(E_2\).

$$\begin{aligned} r((E_1+\ell )+ E_2)+r((E_1+\ell )\cap E_2)&\le r(E_1+\ell )+r(E_2) \\ r(E_1+E_2)+1&\le r(E_1)+r(E_2) \end{aligned}$$

and this is a contradiction. So there are no loops outside \(L_1\oplus L_2\) in M. \(\square \)

In particular, since we know exactly what are the loops of the direct sum, we know that all other 1-dimensional spaces have rank 1. Dually, we can derive a similar result for the codimension-1 spaces.

The next lemma holds for all q-matroids. It is the dual of the statement that loops come in subspaces.

Lemma 14

Let \(M=(E,r)\) be a q-matroid. Let H be the intersection of all codimension 1 spaces in E of rank \(r(M)-1\). Then the spaces A such that \(H\subseteq A\subseteq E\) are exactly all the elements of \(\mathcal {L}(E)\) such that \(r(E)-r(A)=\dim E-\dim A\).

Proof

Let X be a codimension 1 space such that \(r(X)=r(E)-1\). Consider the dual q-matroid \(M^*\). Then \(r^*(X^\perp )=\dim X^\perp -r(E)+r(X)=1-r(E)+r(E)-1=0\). Hence \(X^\perp \) is a loop in \(M^*\). This implies that \(H^\perp \) is the sum of all loops in \(M^*\), hence it is the loop space of \(M^*\), and there are no other loops in \(M^*\). For any A such that \(H\subseteq A\subseteq E\) we have that \(A^\perp \subseteq H^\perp \), so \(A^\perp \) has rank 0 in \(M^*\). This implies

$$\begin{aligned} r(E)-r(A)&=r(E)-(r^*(A^\perp )+\dim A-r^*(E)) \\&=r(E)+r^*(E)-\dim A \\&=r(E)+(r(0)+\dim E-r(E))-\dim A \\&=\dim E-\dim A. \end{aligned}$$

Conversely, if A is a subspace such that \(r(E)-r(A)=\dim E-\dim A\), then \(r^*(A)=0\) by the same calculation as above. This implies the only spaces A for which it holds that \(r(E)-r(A)=\dim E-\dim A\), are the spaces such that \(H\subseteq A\subseteq E\). \(\square \)

The next result is the dual of Proposition 13.

Proposition 15

Let M be a q-matroid satisfying the minor properties of Definition 11. Suppose \(M_1\) and \(M_2\) do not have any codimension 1 spaces of rank \(r(M_1)-1\) and \(r(M_2)-1\), respectively. Then M does not have any codimension 1 spaces of rank \(r(M)-1\).

Proof

Suppose, towards a contradiction, that there is a codimension 1 space H of rank \(r(M)-1\) in M. By construction, H does not contain \(E_1\) or \(E_2\). So \(E_1\cap H\) is of codimension 1 in \(E_1\), and by construction it has rank \(r(E_1)\).

Now we apply the semimodular inequality to \(E_1\) and H.

$$\begin{aligned} r(E_1\cap H)+r(E_1+H)&\le r(E_1)+r(H) \\ r(E_1)+r(M)&\le r(E_1)+r(M)-1 \end{aligned}$$

and this is a contradiction. So there are no codimension 1 spaces in of rank r(M) in M. \(\square \)

3.2 Non-uniqueness of the first definition

In this section we show by example that the minor properties of Definition 11 do not uniquely define the direct sum of q-matroids.

Let \(E=\mathbb {F}_2^4\) and let \(M_1=M_2=U_{1,2}\). We will attempt to construct the direct sum \(M=M_1\oplus M_2\). We assume that it has the minor properties. So the q-matroid M has at least two circuits: \(E_1\) and \(E_2\). Our goal is to determine M completely. Note that Theorem 12 defines the rank for all subspaces of E that can be written as a direct sum of a subspace of \(E_1\) and a subspace of \(E_2\).

All 1-dimensional spaces in E have rank 1 because of Proposition 13 and by Proposition 15 all 3-dimensional spaces in E have rank 2. This means that what is left to do is to decide for all 2-dimensional spaces if they have rank 1 or rank 2, that is, whether they are a circuit or an independent space. We use the next lemma for this.

Lemma 16

Let \(M_1=M_2=U_{1,2}\) and let M satisfy the minor properties of Definition 11. Let \(C_1\) and \(C_2\) be circuits of M of dimension 2. Then \(\dim (C_1\cap C_2)\ne 1\).

Proof

If \(C_1=C_2\), the result is clear. So let \(C_1\ne C_2\). Suppose, towards a contradiction, that \(\dim (C_1\cap C_2)=1\). Then \(\dim (C_1+C_2)=3\). Now apply semimodularity to \(C_1\) and \(C_2\).

$$\begin{aligned} r(C_1+C_2)+r(C_1\cap C_2)&\le r(C_1)+r(C_2) \\ 2+1&\le 1+1 \end{aligned}$$

This is a contradiction, hence \(\dim (C_1\cap C_2)\ne 1\). \(\square \)

This means that every 2-dimensional space that intersects with either \(E_1\) or \(E_2\) is independent. A counting argument shows that there are only six 2-dimensional spaces that have trivial intersection with both \(E_1\) and \(E_2\). Denote by A, B, C, D, F, G the six 2-spaces of unknown rank. The following is independent of a choice of basis for E, but for convenience, we can coordinatise the spaces in the following way:

$$\begin{aligned} \begin{aligned} E_1&=\left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 0 &{}{} 0 \\ 0 &{}{} 1 &{}{} 0 &{}{} 0 \end{array}\right\rangle ,&E_2&=\left\langle \begin{array}{cccc} 0 &{}{} 0 &{}{} 1 &{}{} 0 \\ 0 &{}{} 0 &{}{} 0 &{}{} 1 \end{array}\right\rangle ,{} & {} \\ A&= \left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 0 &{}{} 1 \\ 0 &{}{} 1 &{}{} 1 &{}{} 0 \end{array}\right\rangle ,&B&= \left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 1 &{}{} 0 \\ 0 &{}{} 1 &{}{} 1 &{}{} 1 \end{array}\right\rangle , \qquad&C&= \left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 1 &{}{} 1 \\ 0 &{}{} 1 &{}{} 0 &{}{} 1 \end{array}\right\rangle , \\ D&=\left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 1 &{}{} 0 \\ 0 &{}{} 1 &{}{} 0 &{}{} 1 \end{array}\right\rangle ,&F&=\left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 0 &{}{} 1 \\ 0 &{}{} 1 &{}{} 1 &{}{} 1 \end{array}\right\rangle ,&G&=\left\langle \begin{array}{cccc} 1 &{}{} 0 &{}{} 1 &{}{} 1 \\ 0 &{}{} 1 &{}{} 1 &{}{} 0 \end{array}\right\rangle . \end{aligned}\end{aligned}$$

Note that \(\{E_1,E_2,A,B,C\}\) and \(\{E_1,E_2,D,F,G\}\) form a spread in E (a spread is a set of subspaces of the same dimension such that every 1-dimensional space is in exactly one spread element [18]). The two spreads are isomorphic, in the sense that a change of basis of E maps one to the other. Since A, B and C all intersect D, F and G, deciding that at least one of \(\{A,B,C\}\) is a circuit means \(\{D,F,G\}\) are all independent, and vice versa. So, without loss of generality, we have completely determined the matroid M if we have found which of the three 2-dimensional spaces A, B and C are circuits and this implies that DFG are all independent.

Lemma 17

Every 3-dimensional space T contains an element of the spread

$$\begin{aligned}\{E_1,E_2,A,B,C\}.\end{aligned}$$

Proof

This can be done via a counting argument and the pigeon hole principle. T intersects all spread elements in dimension at least 1, since \(\dim E=4\). All 1-dimensional subspaces of E are by definition contained in exactly one spread element. There are five spread elements and seven 1-dimensional subspaces in T, so there has to be a spread element that contains at least two 1-dimensional subspaces of T, and hence intersects it in dimension 2. But that means the whole spread element is contained in T. \(\square \)

If A, B and C are all circuits, there are no other circuits because of Lemma 16 and axiom (C2). If not all of A, B and C are circuits, there have to be circuits of dimension 3. These will be all the 3-dimensional spaces that do not contain a circuit of dimension 2. These circuits do, however, contain an element of the spread, by Lemma 17.

We check the circuit axioms for this construction. (C1) and (C2) are clear. For (C3), notice that the sum of every pair of circuits is equal to E. Thus it is sufficient to show that every 3-space contains a circuit. This is true by construction: a 3-space either contains a 2-dimensional circuit, or it is a circuit itself.

We have seen that no matter what we decide for the independence of A, B and C, we always get a q-matroid. This means that the minor properties of Definition 11 are not enough to determine the direct sum completely: we can make a q-matroid with 2, 3, 4 or 5 circuits that all satisfy this definition.

3.3 A small non-representable q-matroid

As a by-product of the example in the previous section, we find a non-representable q-matroid in dimension 4. The existence of non-representable q-(poly)matroids was established and discussed in Gluesing-Luerssen and Jany [9]. However, the example here is not included in their construction and it is also the smallest possible non-representable q-matroid. In the classical case, the smallest non-representable matroid is of size 8 and rank 4 (the Vámos matroid). For q-matroids it is smaller: dimension 4 and rank 2.

Proposition 18

Let M be a representable q-matroid over \(\mathbb {F}_2\) of rank 2 and dimension 4, with (at least) two circuits of dimension 2 and no loops. Then the matrix representing M has the shape

$$\begin{aligned} G:=\left[ \begin{array}{cccc} 1 &{} \quad \alpha &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \beta \end{array}\right] , \end{aligned}$$

with \(\alpha ,\beta \in \mathbb {F}_{2^m}\setminus \mathbb {F}_2\), \(m>1\).

Proof

Since M has rank 2 and dimension 4, the shape of the matrix is

$$\begin{aligned} G:=\left[ \begin{array}{cccc} x_1 &{} \quad x_2 &{} \quad x_3 &{} \quad x_4 \\ y_1 &{} \quad y_2 &{} \quad y_3 &{} \quad y_4 \end{array}\right] , \end{aligned}$$

with all entries in \(\mathbb {F}_{2^m}\). Without loss of generality we apply row reduction and get \(x_1=1, y_1=0\). Since there are no loops, the columns of G cannot be all zero. Consider now the two circuits. They are, without loss of generality, \(E_1:=\langle (1,0,0,0),(0,1,0,0) \rangle \) and \(E_2:=\langle (0,0,1,0),(0,0,0,1) \rangle \). We have for \(E_1\)

$$\begin{aligned} \left[ \begin{array}{cccc} 1 &{} \quad x_2 &{} \quad x_3 &{} \quad x_4 \\ 0 &{} \quad y_2 &{} \quad y_3 &{} \quad y_4 \end{array}\right] \cdot \left[ \begin{array}{cc} 1 &{} \quad 0 \\ 0 &{} \quad 1\\ 0 &{} \quad 0 \\ 0 &{} \quad 0 \end{array}\right] = \left[ \begin{array}{cc} 1 &{} \quad x_2 \\ 0 &{} \quad y_2 \end{array}\right] , \end{aligned}$$

whose rank must be one, leading to \(y_2=0\). Similarly, for \(E_2\) we have

$$\begin{aligned} \left[ \begin{array}{cccc} 1 &{} \quad x_2 &{} \quad x_3 &{} \quad x_4 \\ 0 &{} \quad y_2 &{} \quad y_3 &{} \quad y_4 \end{array}\right] \cdot \left[ \begin{array}{cc} 0 &{} \quad 0 \\ 0 &{} \quad 0\\ 1 &{} \quad 0 \\ 0 &{} \quad 1 \end{array}\right] = \left[ \begin{array}{cc} x_3 &{} \quad x_4 \\ y_3 &{} \quad y_4 \end{array}\right] , \end{aligned}$$

whose rank must be one, leading to the fact that \((x_3,x_4)\) and \((y_3,y_4)\) are scalar multiples. By row reduction we can conclude that \(x_3=x_4=0\) and the absence of loops implies that \(x_2,y_3,y_4\ne 0\). We can finally set, again by row reduction, \(y_3=1\). Note that column operations over the ground field \(\mathbb {F}_2\) give an isomorphic q-matroid, so we have that \(x_2\) and \(y_4\) are elements of \(\mathbb {F}_{2^m}\) but not of \(\mathbb {F}_2\). \(\square \)

Theorem 19

If the q-matroid from Sect. 3.2 is representable, it cannot have 4 circuits of dimension 2. This gives an example of a non-representable q-matroid.

Proof

We know the representation is of the form

$$\begin{aligned} \left[ \begin{array}{cccc} 1 &{} \quad \alpha &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \beta \end{array}\right] , \end{aligned}$$

with \(\alpha ,\beta \in \mathbb {F}_{2^m}\setminus \mathbb {F}_2\) by Proposition 18. Consider

$$\begin{aligned} \left[ \begin{array}{cccc} 1 &{} \quad \alpha &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \beta \end{array}\right] \cdot \left[ \begin{array}{cc} a_0 &{} \quad b_0 \\ a_1 &{} \quad b_1 \\ a_2 &{} \quad b_2 \\ a_3 &{} \quad b_3 \end{array}\right] = \left[ \begin{array}{cc} a_0+a_1\alpha &{} \quad b_0+b_1\alpha \\ a_2+a_3\beta &{} \quad b_2+b_3\beta \end{array}\right] . \end{aligned}$$

In order to have a circuit of dimension 2, the determinant of this \(2\times 2\) matrix should be zero. In particular, we need to have proportional columns. This automatically tells us that \(a_0=a_1=0\) implies \(b_0=b_1=0\), and that \(a_2=a_3=0\) implies \(b_2=b_3=0\). These two cases correspond to the two circuits \(E_1\) and \(E_2\) from Proposition 18. Using the representations from Sect. 3.2, we found the determinants of all 2-dimensional spaces ABCDFG. They are the following:

A::

\(\alpha \beta +1\)

B::

\(\alpha +\beta +1\)

C::

\(\alpha \beta +\beta + \alpha \)

D::

\(\alpha +\beta \)

F::

\(\alpha \beta +\beta +1\)

G::

\(\alpha \beta +\alpha +1\)

Now, it is easy to see that if A and B vanish, then C vanishes as well, and the same goes for D, F and G. We already saw that circuits appear either in \(\{A,B,C\}\) or \(\{D,F,G\}\) and the other spaces are independent. Therefore, the alternatives we have are:

  • none of the six determinants above vanishes, so \(E_1\) and \(E_2\) are the only circuits of dimension 2;

  • one determinant vanishes, so we have three circuits of dimension 2;

  • the determinants of all the elements in a spread vanish, leading to five circuits of dimension 2 (that are all circuits in the q-matroid).

\(\square \)

Corollary 20

The q-matroid over \(\mathbb {F}_2\) of rank 2 and dimension 4 with four circuits, as described in Theorem 19, is the smallest non-representable q-matroid.

Proof

See the appendix for a list of all q-matroids with a ground space of dimension at most 3. All of these are representable. Hence, the q-matroid from Theorem 19 is the smallest non-representable q-matroid. \(\square \)

Example 21

Consider the finite field \(\mathbb {F}_{64}\) and a primitive element \(\alpha \) such that \(\alpha ^6=\alpha ^4+\alpha ^3+\alpha +1\). We give some examples of q-matroids of dimension 4 and rank 2, arising from our construction in Sect. 3.2, distinguishing them by the number of their circuits:

  • \(\left[ \begin{array}{cccc} 1 &{} \quad \alpha ^2 &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \alpha ^7 \end{array}\right] \) represents a q-matroid with two 2-dimensional circuits;

  • \(\left[ \begin{array}{cccc} 1 &{} \quad \alpha &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \alpha ^8 \end{array}\right] \) represents a q-matroid with three 2-dimensional circuits;

  • \(\left[ \begin{array}{cccc} 1 &{} \quad \alpha ^{42} &{} \quad 0 &{} \quad 0 \\ 0 &{} \quad 0 &{} \quad 1 &{} \quad \alpha ^{21} \end{array}\right] \) represents a q-matroid with five 2-dimensional circuits.

Remark 22

Example 21 above also tells us something about the direct sum of two representable q-matroids. Suppose we have two representable q-matroids \(M_1\) and \(M_2\) over the same field K. Suppose these q-matroids are representable by matrices \(G_1\) and \(G_2\) over an extension field L of K. One would expect the direct sum \(M_1\oplus M_2\) to be representable by

$$\begin{aligned} G=\left[ \begin{array}{cc} G_1 &{} 0 \\ 0 &{} G_2 \end{array}\right] . \end{aligned}$$

However, this construction is not uniquely defined, in the sense that it depends on the representations of \(M_1\) and \(M_2\). Over \(\mathbb {F}_{64}\), we can represent the q-matroid \(U_{1,2}\) as \(\left[ \begin{array}{cc} 1&\beta \end{array}\right] \) for any \(\beta \in \mathbb {F}_{64}\backslash \mathbb {F}_2\). Then the q-matroids of Example 21 are all of the form of the matrix G above, so we would expect all of them to represent \(U_{1,2}\oplus U_{1,2}\). However, these are not isomorphic q-matroids. For more discussions on this topic, see [11].

4 Submodular functions and associated q-matroids

Our goal is to define the direct sum of q-matroids in terms of matroid union. Before we can define that, we need some background on integer-valued increasing submodular functions. A function f on the subspaces of E is submodular if the following hold for all \(A,B\subseteq E\):

$$\begin{aligned} f(A+B)+f(A\cap B) \le f(A)+f(B). \end{aligned}$$

Such function can be viewed as the rank function of a q-polymatroid, and we refer to Gluesing-Luerssen and Jany [9] for an extension of, and some overlap with, the results presented here.

The following proposition and corollary are the q-analogues of Proposition 11.1.1 and Corollary 11.1.2 in [16].

Proposition 23

Let f be an integer-valued increasing submodular function on the subspaces of a finite-dimensional vector space E. Let

$$\begin{aligned} \mathcal {C}(f)=\{C\subseteq E:C\text { is non-trivial and minimal w.r.t. inclusion s.t. }f(C)<\dim (C)\}. \end{aligned}$$

Then \(\mathcal {C}(f)\) is the collection of circuits of a q-matroid \(M(f)=(E,\mathcal {C}(f))\).

Proof

We prove that \(\mathcal {C}(f)\) satisfies the circuit axioms from Definition 4. The axiom (C1) holds by definition and, by minimality, we have (C2).

Let us now prove (C3). Let \(C_1 \ne C_2\) be two elements of \(\mathcal {C}(f)\) and let X be a codimension 1 space containing neither \(C_1\) nor \(C_2\) (otherwise the assertion holds void). We have \(C_i \cap X \subsetneq C_i\) for \(i=1,2\). Therefore, \(C_i \cap X \notin \mathcal {C}(f)\) by (C2) and so \(\dim (C_i \cap X) \le f(C_i \cap X)\) for \(i=1,2\). Since f is increasing,

$$\begin{aligned} \dim (C_i \cap X) \le f(C_i \cap X) \le f(C_i) < \dim (C_i) \end{aligned}$$

and \(\dim (C_i\cap X)=\dim (C_i)-1\), we have \(\dim (C_i)-1 =f(C_i)\).

Since f is increasing, is suffices to show \(f((C_1+C_2)\cap X)<\dim ((C_1+C_2)\cap X)\), because then \((C_1+C_2)\cap X\) contains a circuit. Now f is increasing and submodular, so

$$\begin{aligned} f((C_1+C_2)\cap X)\le f(C_1+C_2) \le f(C_1)+f(C_2)-f(C_1 \cap C_2) \end{aligned}$$

and because \(C_1 \cap C_2 \subsetneq C_i\) for \(i=1,2\), by minimality, \(f(C_1 \cap C_2) \ge \dim (C_1 \cap C_2)\). Finally,

$$\begin{aligned} f((C_1+C_2)\cap X)&\le f(C_1)+f(C_2)-f(C_1 \cap C_2) \\&= \dim (C_1)+\dim (C_2)-2-f(C_1 \cap C_2) \\&\le \dim (C_1+C_2)-2 \\&=\dim ((C_1+C_2)\cap X)-1. \end{aligned}$$

This shows that M(f) is a q-matroid defined by its circuits \(\mathcal {C}(f)\). \(\square \)

The following is a direct result of the definition of \(\mathcal {C}(f)\) and the fact that every proper subspace of a circuit is independent.

Corollary 24

A subspace \(I\subseteq E\) is independent in M(f) if and only if \(\dim (I')\le f(I')\) for all non-trivial subspaces \(I'\) of I.

The next theorem is the q-analogue of Welsh [20, Chapter 8.1 Theorem 2]. We point out that Theorem 25 and Proposition 27 were already proven in Gluesing-Luerssen and Jany [9, Theorem 3.9], but with the minimum taken over the subspaces of A instead of all spaces in E. See also Remark 26.

Theorem 25

Let f be a non-negative integer-valued increasing submodular function on the subspaces of E with \(f(0)=0\). Then

$$\begin{aligned} r(A)=\min _{X\subseteq E}\{f(X)+\dim (A)-\dim (A\cap X)\} \end{aligned}$$

is the rank function of a q-matroid.

Proof

We will prove that the function r satisfies the rank axioms. It is clear that r is integer-valued. It is non-negative because both f(A) and \(\dim (A)-\dim (A\cap X)\) are non-negative. By taking \(X=\{0\}\) in the definition, we get \(f(\{0\})+\dim (A)-\dim (\{0\})=\dim (A)\) and therefore \(r(A)\le \dim (A)\). This proves (R1).

In order to prove (R2), let \(A\subseteq B\subseteq E\). Then for any \(X\subseteq E\), we have that \(\dim (B)-\dim (A)\ge \dim (B\cap X)-\dim (A\cap X)\). It follows that

$$\begin{aligned} f(X)+\dim (A)-\dim (A\cap X) \le f(X)+\dim (B)-\dim (B\cap X) \end{aligned}$$

for all \(X\subseteq E\) and thus \(r(A)\le r(B)\). The proof of (R3) is rather technical, but essentially a lot of rewriting. We first claim that

This statement will be used later on in the proof. By using that

$$\begin{aligned} \dim (A)+\dim (B)=\dim (A+B)+\dim (A\cap B) \end{aligned}$$

and multiplying by \(-1\) we can rewrite our claim as

Using the modular equality again, we get

and thus our claim is equivalent to

$$\begin{aligned} \dim ((A\cap X)+(B\cap Y))\le \dim ((A+B)\cap (X+Y)). \end{aligned}$$

To prove this, it is enough to show the inclusion of vector spaces \((A\cap X)+(B\cap A)\subseteq (A+B)\cap (X+Y)\). Let \({\textbf{a}}\in A\cap X\) and \({\textbf{b}}\in B\cap Y\) be two nonzero vectors. Then \({\textbf{a}}+{\textbf{b}}\in (A\cap X)+(B\cap Y)\). We prove that \({\textbf{a}}+{\textbf{b}}\in (A+B)\cap (X+Y)\). Because \({\textbf{a}}\in A\) also \({\textbf{a}}\in A+B\) and because \({\textbf{a}}\in X\) also \({\textbf{a}}\in X+Y\). So \({\textbf{a}}\in (A+B)\cap (X+Y)\). By a similar reasoning, \({\textbf{b}}\in (A+B)\cap (X+Y)\). So \({\textbf{a}}+{\textbf{b}}\in (A+B)\cap (X+Y)\) as was to be shown. This finishes the proof of our claim.

We can now get back to proving axiom (R3). In the third step we use the claim together with the submodularity of f. In the fourth step we set \(U=X+Y\) and \(V=X\cap Y\). This will not produce all possible \(U,V\subseteq E\), so the minimum is at least as big as the minimum over all \(U,V\subseteq E\).

So the rank function r satisfies all rank axioms (R1),(R2),(R3). \(\square \)

Remark 26

Note that the minimum in Theorem 25 is taken over all subspaces of E. This is convenient for some of the proofs, but not strictly necessary. Let \(X\subseteq E\) and let \(X'=A\cap X\). Then

$$\begin{aligned} f(X')+\dim (A)-\dim (A\cap X') \le f(X)+\dim (A)-\dim (A\cap X) \end{aligned}$$

because \(f(X')\le f(X)\) and \(\dim (A\cap X')=\dim (A\cap X)=\dim (X')\). This means that the minimum over all subspaces \(X\subseteq E\) is the same as the minimum taken only over the subspaces \(X'\subseteq A\). This makes calculating the rank function a lot faster in practice.

The next proposition shows that the q-matroids from Corollary 24 and Theorem 25 are the same.

Proposition 27

Let f be a non-negative integer-valued increasing submodular function with \(f(0)=0\). Let M(f) be the corresponding q-matroid as defined in Corollary 24 with independent spaces \(\mathcal {I}\). Let r be the rank function as defined in Theorem 25. Then both give the same q-matroid because \(r(I)=\dim (I)\) if and only if \(I\in \mathcal {I}\).

Proof

We have to prove that \(r(I)=\dim (I)\) iff \(\dim (I')\le f(I')\) for all non-trivial subspace \(I'\) of I. Note that since \(f(0)=0\), this holds for all subspaces \(I'\) of I, also the trivial one. (Note that Proposition 23 does not require \(f(0)=0\), but Theorem 25 does.) From the remark before we have that

$$\begin{aligned} r(I)=\min _{I'\subseteq I}\{f(I')+\dim (I)-\dim (I')\}. \end{aligned}$$

As already proven in Theorem 25, \(r(I)\le \dim (I)\). For the other inequality, the following are equivalent:

$$\begin{aligned} I\in \mathcal {I}(M(f))&\Leftrightarrow f(I')\ge \dim (I') \text { for all }I'\subseteq I \\&\Leftrightarrow f(I')+\dim (I)-\dim (I')\ge \dim (I) \text { for all }I'\subseteq I \\&\Leftrightarrow r(I)\ge \dim (I) \end{aligned}$$

This proves that \(r(I)=\dim (I)\). \(\square \)

5 Matroid union

In this section we define the q-analogue of matroid union by means of its rank function and we show what are the independent spaces. We start with a q-analogue of Welsh [20, Chapter 8.3 Theorem 1].

Definition 28

Let \(M_1\) and \(M_2\) be two q-matroids on the same ground space E, with rank functions \(r_1\) and \(r_2\), respectively. Then the matroid union \(M_1\vee M_2\) is defined by the rank function

$$\begin{aligned} r(A)=\min _{X\subseteq A}\{r_1(X)+r_2(X)+\dim A-\dim X\} \end{aligned}$$

Theorem 29

Let \(M_1\) and \(M_2\) be two q-matroids on the same ground space E, with rank functions \(r_1\) and \(r_2\), respectively. Then the matroid union \(M_1\vee M_2\) is a q-matroid.

Proof

For all \(A\subseteq E\), define a function \(f(A)=r_1(A)+r_2(A)\). We claim that f is a non-negative integer-valued submodular function on the subspaces of E with \(f(0)=0\).

Note that \(r_1\) and \(r_2\) are non-negative integer-valued submodular functions on the subspaces of E with \(r_1(\{0\})=r_2(\{0\})=0\). It follows directly that f is a non-negative integer-valued function on the subspaces of E. It is increasing, because for all \(A\subseteq B\subseteq E\) we have

$$\begin{aligned} f(A)= r_1(A)+r_2(A)\le r_1(B)+r_2(B)=f(B). \end{aligned}$$

Furthermore, f is submodular, because for all \(A,B\subseteq E\) we have

$$\begin{aligned} f(A+B)+f(A\cap B)&= r_1(A+B)+r_2(A+B)+r_1(A\cap B)+r_2(A\cap B) \\&\le r_1(A)+r_1(B)+r_2(A)+r_2(B) \\&= f(A)+f(B). \end{aligned}$$

Now we apply Theorem 25 and Remark 26 to the function f: this shows that the function r of Definition 28 is indeed the rank function of a q-matroid (Er). \(\square \)

Remark 30

The matroid union is not always invariant under coordinatisation. That is, if \(\varphi :\mathcal {L}(E)\longrightarrow \mathcal {L}(E)\) is a lattice isomorphism, then it is direct from the definition that \(\varphi (M_1)\vee \varphi (M_2)=\varphi (M_1\vee M_2)\). However, \(M_1\vee M_2\) is not necessarily isomorphic to \(\varphi (M_1)\vee M_2\). This is true both in the classical case as in the q-analogue. We illustrate the latter with a small example.

Let \(M_1\) and \(M_2\) both be isomorphic to the mixed diamond, see 3. That is: \(\dim (E)=2\), \(r(E)=1\) and \(r(A)=1\) for all 1-dimensional spaces except one loop. Suppose the loop is at the same coordinates for both \(M_1\) and \(M_2\), call this subspace \(\ell \). Then the rank of \(M_1\vee M_2\) is one, as we will show. Consider all \(X\subseteq E\). If \(\dim (X)=0\) or \(\dim (X)=2\) then the expression inside the minimum of Definition 28 is equal to 2. If \(\dim (X)=1\) we have to distinguish between \(\ell \) and the any other space. If \(X=\ell \) the expression is \(0+0+2-1=1\), otherwise it is \(1+1+2-1=3\). Therefore, \(r(E)=1\).

Consider now the case where the loop of \(M_1\) is \(\ell _1\) and the loop of \(M_2\) is \(\ell _2\), with \(\ell _1\ne \ell _2\). Then the calculations are as before for \(\dim (X)=0\) or \(\dim (X)=2\). For \(\dim (X)=1\) and \(X\ne \ell _1,\ell _2\) we get \(1+1+2-1=3\). If \(X=\ell _1\) we get \(0+1+2-1=2\), and similarly for \(X=\ell _2\) we get \(1+0+2-1=2\). So \(r(E)=2\).

This example illustrates that we have to be careful to define \(M_1\) and \(M_2\) precisely, not just up to isomorphism. In the classical case, the direct sum of matroid is invariant under coordinatisation. Therefore, in order to achieve the same in the q-analogue, we have to take care when using matroid union in our definition of the direct sum.

We prove a straightforward lemma concerning the matroid union.

Lemma 31

Let \(M_1\) and \(M_2\) be two q-matroids on the same ground space E and let \(r(M_2)=0\). Then \(M_1\vee M_2=M_1\) and in particular, \(M\vee U_{0,n}=M\).

Proof

The rank function of the matroid union is equal to

$$\begin{aligned} r(A)=\min _{X\subseteq A}\{r_1(X)+0+\dim A-\dim X\}. \end{aligned}$$

By local semimodularity (Lemma 2), \(r_1(X)-\dim (X)+\dim (A)\ge r_1(A)\) for all \(X\subseteq A\) and equality is attained for \(X=A\). Hence \(r(A)=r_1(A)\) and \(M_1\vee M_2=M_1\). \(\square \)

The following two lemmas are first steps in the characterisation of independent spaces in the matroid union.

Lemma 32

Let \(M_1\) and \(M_2\) be q-matroids on the same ground space E. Let I be independent in both \(M_1\) and \(M_2\). Then I is independent in \(M_1\vee M_2\).

Proof

We have that \(r(M_1;I)=r(M_2;I)=\dim I\) by definition. Also, all subspaces of I are independent. This means that

$$\begin{aligned} r(M_1\vee M_2;I)&= \min _{X\subseteq I}\{r(M_1;X)+r(M_2;X)+\dim I-\dim X\} \\&= \min _{X\subseteq I}\{\dim X+\dim X+\dim I-\dim X\} \\&= \dim I. \end{aligned}$$

We conclude that I is independent in \(M_1\vee M_2\). \(\square \)

Lemma 33

Let \(M_1=(E,\mathcal {I}_1)\) and \(M_2=(E,\mathcal {I}_2)\) be two q-matroids defined by their independent spaces. Let \(I\subseteq E\) be such that for all \(J\subseteq I\) there exist \(I_1\in \mathcal {I}_1\) and \(I_2\in \mathcal {I}_2\) such that \(J=I_1\oplus I_2\). Then I is an independent space of the matroid union \(M_1\vee M_2\).

Proof

Let \(f(A)=r_1(A)+r_2(A)\), as in the proof of Theorem 29. According to Corollary 24 and Proposition 27, we know that the independent spaces of the matroid union are exactly those \(I\subseteq E\) such that for all non-trivial subspaces \(J\subseteq I\) we have \(\dim J\le f(J)\).

Let \(I\subseteq E\) such that all non-trivial subspace \(J\subseteq I\) can be written as \(J=I_1\oplus I_2\) with \(I_1\in \mathcal {I}_1\) and \(I_2\in \mathcal {I}_2\). Then

$$\begin{aligned} \dim (J)=\dim (I_1)+\dim (I_2) = r_1(I_1)+r_2(I_2) \le r_1(J)+r_2(J)=f(J), \end{aligned}$$

where the inequality comes from axiom (R2). Hence I is independent in \(M_1\vee M_2\).

\(\square \)

Unfortunately, we were not able to give a full characterisation of the independent spaces of the matroid union. We expect the converse of Lemma 33 to be true: if I is independent in \(M_1\vee M_2\), then I can be written as \(I=I_1\oplus I_2\) with \(I_1\in \mathcal {I}(M_1)\) and \(I_2\in \mathcal {I}(M_2)\). Because of the independence axiom (I2), this implies the same for all subspaces \(J\subseteq I\).

If this is true, we get a characterisation of the independent spaces of the matroid union of q-matroids that is indeed a q-analogue of the classical case. There the independent sets of the matroid union are defined by

$$\begin{aligned} \mathcal {I}=\{I_1\cup I_2:I_1\in \mathcal {I}_1,I_2\in \mathcal {I}_2\} \end{aligned}$$

(see [20, Chapter 8.3 Theorem 1]). First of all, note that the union can be rewritten as a disjoint union. Let \(I=J_1\cup J_2\) with \(J_1\in \mathcal {I}_1\) and \(J_2\in \mathcal {I}_2\). Take \(I_1=J_1\) and \(I_2=J_2-J_1\), then \(I=I_1\sqcup I_2\). This procedure does not create a unique \(I_1\) and \(I_2\); there is a lot of choice involved. However, it does imply that every independent set I of the matroid union is of the form \(I=I_1\sqcup I_2\), and conversely, every \(I=I_1\sqcup I_2\) is independent in the matroid union.

In the classical case, if \(I=I_1\sqcup I_2\) then for all \({\bar{J}}\subseteq I\) we can write directly \({\bar{J}}={\bar{J}}_1\sqcup {\bar{J}}_2\) with \({\bar{J}}_1={\bar{J}}\cap I_1\) and \({\bar{J}}_2={\bar{J}}\cap I_2\). Since \({\bar{J}}_1\subseteq I_1\) and \({\bar{J}}_2\subseteq I_2\), these are independent. This reasoning does not hold in the q-analogue (see also the introduction), which is why we specifically have to state it in the definition. For a counterexample, see the example in Remark 30: if \(\ell _1=\ell _2=\ell \) we can write \(E=I_1\oplus I_2\) for some 1-dimensional \(I_1\) and \(I_2\) that are not equal to \(\ell \), but we cannot write \(\ell \) as the direct sum of independent spaces of \(M_1\) and \(M_2\).

6 The direct sum

In this section we will define the direct sum of two q-matroids. To better understand this construction, we consider two (equivalent) definition of the direct sum in the classical case.

First, given two matroids \(M_1=(E_1,\mathcal {I}(M_1)),M_2=(E_2,\mathcal {I}(M_2))\), we can define \(M_1\oplus M_2\) as the matroid on ground set \(E_1\sqcup E_2\) with independent sets

$$\begin{aligned} \{I_1\sqcup I_2:I_1\in \mathcal {I}(M_1),I\in \mathcal {I}(M_2)\}.\end{aligned}$$

As discussed in the beginning of Sect. 3, this notion does not have a clear q-analogue.

Following [3, Proposition 7.6.13 part 2], we can also construct the direct sum as follows. First, add extra elements to \(E_1\) to get a set E of size \(|E_1|+|E_2|\). Let the extra elements have rank zero, i.e. they are loops. We call this matroid \(M_1'\). Then the independent sets of \(M_1'\) are the independent sets of \(M_1\), embedded in E. Similarly, we can construct \(M_2'\). Take an ordering of the elements of E such that the loops of \(M_1'\) are the last elements of E and the loops of \(M_2'\) are the first elements of E. Now we take the matroid union of \(M_1'\) and \(M_2'\). This is a matroid with, by definition, independent sets of the form

$$\begin{aligned} \{I_1\cup I_2:I_1\in \mathcal {I}(M_1'),I\in \mathcal {I}(M_2')\}.\end{aligned}$$

Note that in general, the union needs not to be disjoint. However, by our ordering on E, all such unions will be disjoint. This implies that the two constructions of the direct sum yield equivalent results.

In this section, we will give a q-analogue of the latter construction, but in terms of rank instead of independent spaces. We will later show that this construction has some desirable properties that we would expect the q-analogue of the direct sum to have.

6.1 Defining the direct sum

The next definition explains how to “add a loop” to a q-matroid. By this, we mean taking the direct sum with the q-matroid \(\ell =U_{0,1}\).

Definition 34

Let \(M=(E,r)\) be a q-matroid. Then the direct sum of M and a loop \(\ell \) is denoted by \(M'=M\oplus \ell \) and constructed in the following way. Let \(E'=E\oplus \ell \). Then for every \(A'\subseteq E'\) we can write \(A'+\ell =A\oplus \ell \) for a unique \(A\subseteq E\). Then \(r'(A')=r(A)\).

Before showing this definition is well defined, we give a small example.

Example 35

Let M be the q-matroid of dimension 2 and rank 2, see Sect. 3. Then adding a loop gives the q-matroid \(P_2^*\) in Sect. 5.

Remark 36

The definition above divides the subspaces of \(E'\) into three different kinds.

  • If \(A'\subseteq E\) then \(A'=A\) and \(\dim A'=\dim A\).

  • If \(A'\supseteq \ell \) then \(A=A'\cap E\) and \(\dim A=\dim A'-1\).

  • If \(A'\) is not contained in E and does not contain \(\ell \), then \(\dim A'=\dim A\). There is a diamond with bottom \(A'\cap A\subseteq E\), top \(A'+\ell \) and with A and \(A'\) in between.

This construction is well defined, in the sense that it gives a q-matroid, as the next theorem shows.

Theorem 37

The direct sum \(M'=M\oplus \ell \) as defined above is a q-matroid, that is, the rank function \(r'\) satisfies (R1), (R2), (R3).

Proof

(R1).   Since \(r(A)\ge 0\) we have \(r'(A')\ge 0\) as well. We get that \(r'(A')=r(A)\le \dim A\le \dim A'\) by Remark 36.

(R2).   Let \(A'\subseteq B'\). Since \(A=(A'+l)\cap E\), \(B=(B'+l)\cap E\) and \(A'+l \subseteq B'+l\), we have that \(A \subseteq B\). Therefore \(r'(A')=r(A)\le r(B)=r'(B')\).

(R3).   Let \(A',B'\subseteq E'\). We first claim that \((A'+B')+\ell =(A+B)+\ell \) and \((A'\cap B')+\ell =(A\cap B)+\ell \), because this implies that

$$\begin{aligned} r'(A'+B') + r'(A'\cap B')&= r(A+B) + r(A\cap B) \\&\le r(A)+r(B) \\&= r'(A')+r'(B'). \end{aligned}$$

Now let us prove the claims. For addition, we see that

$$\begin{aligned} (A'+B')+\ell =(A'+\ell )+(B'+\ell )=(A+\ell )+(B+\ell )=(A+B)+\ell . \end{aligned}$$

For intersection we distinguish three cases depending on whether \(A'\) and \(B'\) contain \(\ell \).

  • Let \(\ell \not \subseteq A',B'\). Then \((A'\cap B')+\ell =(A'+\ell )\cap (B'+\ell )=(A+\ell )\cap (B+\ell )=(A\cap B)+\ell \).

  • Let \(\ell \subseteq A',B'\). Then \((A'\cap B')+\ell =A'\cap B'=(A+\ell )\cap (B+\ell )=(A\cap B)+\ell \).

  • Let \(\ell \subseteq A'\) and \(\ell \not \subseteq B'\). Then we have \((A'\cap B')+\ell =((A'\cap E)\cap B')+\ell = ((A'\cap E)+\ell )\cap (B'+\ell )=(A+\ell )\cap (B+\ell )=(A\cap B)+\ell \).

The function \(r'\) satisfies the axioms (R1),(R2),(R3); hence, \(M'\) is a q-matroid. \(\square \)

We combine the adding of loops and the matroid union to define the direct sum.

Definition 38

Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be two q-matroids on trivially intersecting ground spaces. Let \(n_1=\dim E_1\) and \(n_2=\dim E_2\). We construct the direct sum \(M_1\oplus M_2\) as follows.

  • Let \(E=E_1\oplus E_2\). This will be the ground space of M. By slight abuse of notation, we denote by \(E_i\) both the ground space of \(M_i\) and the embedding of \(E_i\) in E.

  • In the lattice \(\mathcal {L}(E)\) we have that the intervals \([0,E_1]\) and \([E_2,1]\) are isomorphic to \(\mathcal {L}(E_1)\), and the intervals \([0,E_2]\) and \([E_1,1]\) are isomorphic to \(\mathcal {L}(E_2)\). Fix the involution \(\perp \) such that \(E_1^\perp =E_2\).

  • Add \(n_2\) times a loop to \(M_1\), using Theorem 37. This gives the q-matroid \(M_1'\) on ground space E. Assume that \(M_1'|_{E_1}\cong M_1\) and \(M_1'|_{E_2}\cong U_{0,n_2}\).

  • Add \(n_1\) times a loop to \(M_2\), using again Theorem 37. This gives the q-matroid \(M_2'\) on ground space E. Assume that \(M_2'|_{E_1}\cong U_{0,n_1}\) and \(M_2'|_{E_2}\cong M_2\).

Now the direct sum is defined as \(M_1\oplus M_2=M_1'\vee M_2'\), with the matroid union as in Theorem 29.

Note that this procedure is well-defined, since we already showed that adding loops and taking the matroid union are well-defined constructions. We do, however, have to show that this procedure always defines the same q-matroid up to isomorphism, since it was observed in Remark 30 that matroid union is not invariant under coordinatisation.

Theorem 39

Let \(M_1=(E_1,r_1)\) and \(M_2=(E_2,r_2)\) be two q-matroids on trivially intersecting ground spaces and let \(M=M_1\oplus M_2\) be their direct sum (see Definition 38). Let \(\varphi _i\) be a lattice-isomorphism of \(\mathcal {L}(E_i)\) for \(i=1,2\). Then there is an isomorphism \(\psi \) of \(\mathcal {L}(E)\) such that \(\varphi _1(M_1)\oplus \varphi _2(M_2)=\psi (M)\).

Proof

By the Fundamental Theorem of Projective Geometry, any isomorphism of a subspace lattice is induced by a linear isomorphism on the underlying vectorspace composed with coordinate-wise field automorphisms. Without loss of generality, we can assume \(E_1\) to be spanned by the first \(n_1\) coordinate vectors of E and \(E_2\) to be spanned by the last \(n_2\) coordinate vectors of E. Then it is clear that we can combine the two linear isomorphisms, as well as the two coordinate-wise automorphisms, of both \(\varphi _1\) and \(\varphi _2\) in order to get a lattice isomorphism \(\psi \) on \(\mathcal {L}(E)\) such that \(\psi |_{E_1}=\varphi _1\) and \(\psi |_{E_2}=\varphi _2\).

Let \(A\subseteq E\) and let \(B\subseteq E_1\) such that \(A+E_2=B\oplus E_2\). This means that \(B=(A+E_2)\cap E_1\). Now we have that

$$\begin{aligned} (\psi (A)+E_2)\cap E_1&= (\psi (A)+\psi (E_2))\cap E_1 \\&= \psi (A+E_2)\cap E_1 \\&= \psi (B\oplus E_2) \cap E_1 \\&= (\psi (B)\oplus \psi (E_2))\cap E_1 \\&= (\varphi _1(B)\oplus E_2)\cap E_1 \\&= \varphi _1(B) \\&= \varphi _1((A+E_2)\cap E_1). \end{aligned}$$

The rank function of \(\varphi _1(M_1)'\) is equal to

$$\begin{aligned} r(\varphi _1(M_1)';A)&= r(\varphi _1(M_1);(A+E_2)\cap E_1) \\&= r(M_1;\varphi _1((A+E_2)\cap E_1)) \\&= r(M_1; (\psi (A)+E_2)\cap E_1) \\&= r(M_1';\psi (A) ). \end{aligned}$$

We have a similar argument for \(M_2\) and \(\varphi _2\). Combining these gives that

This proves the theorem. \(\square \)

The next lemma is a direct consequence of Theorem 45, but we prove it now to make the calculations in the next section easier.

Lemma 40

For two q-matroids \(M_1\) and \(M_2\) it holds that

$$\begin{aligned}r(M_1\oplus M_2)=r(M_1)+r(M_2).\end{aligned}$$

Proof

By applying Definitions 34 and 38, we get that

If we take \(X=E\), we get that

Now let \(Y_1\subseteq E_1\) such that \(X+E_2=Y_1\oplus E_2\). Then \(r(M_1';X)=r(M_1;Y_1)\). Similarly, let \(Y_2\subseteq E_2\) such that \(X+E_1=Y_2\oplus E_1\) so \(r(M_2';X)=r(M_2;Y_2)\). We have that \(\dim (Y_1)=\dim (X)-\dim (X\cap E_2)\) and \(\dim (Y_2)=\dim (X)-\dim (X\cap E_1)\). Note that, by local semimodularity (Lemma 2), \(r(M_1;Y_1)\ge r(M_1;E_1)-\dim (E_1)+\dim (Y_1)\) and similarly \(r(M_2;Y_2)\ge r(M_2;E_2)-\dim (E_2)+\dim (Y_2)\). All together this gives

This means that the minimum \(\min _{X\subseteq E}\{ r(M_1';X)+r(M_2';X)+\dim E-\dim X\}\) is attained by \(X=E\) and \(r(M_1\oplus M_2)=r(M_1)+r(M_2)\). \(\square \)

6.2 Examples of the direct sum

To get some feeling for this construction, we analyse some small examples. We refer to the appendix for an overview of small q-matroids.

We start with the easiest examples possible, with \(n_1=n_2=1\). We have three cases to consider, depending on \(M_1\) and \(M_2\) being equivalent to \(U_{0,1}\) or \(U_{1,1}\).

Example 41

Let \(M_1=M_2=U_{0,1}\). This is the sum of two loops. In fact, we could just use Theorem 37 here, without Definition 38, but we do the whole procedure for clarity. For \(M_1'=M_1\oplus \ell \), let \(E_1=\langle (1,0)\rangle \). Then by Theorem 37, \(M_1'\) is a q-matroid of rank 0, so all its subspaces have rank zero. In fact, \(M_1'\cong U_{0,2}\). Let \(E_2=\langle (0,1)\rangle \). We also have that \(M_2'\cong U_{0,2}\). Applying Theorem 29 we find that \(M_1'\vee M_2'\cong U_{0,2}\).

Example 42

Let \(M_1=U_{0,1}\) and \(M_2=U_{1,1}\). Then \(M_1'=U_{0,2}\) as argued above. For \(M_2'\), let \(E_2=\langle (0,1)\rangle \) and apply Theorem 37. By construction, \(r(\{0\})=0\). In dimension 1 we have that \(r(\langle (0,1)\rangle )=r(E_2)=r_2(E_2)=1\), that \(r(\ell )=r_2(\{0\})=0\), and for all other spaces A of dimension 1 we have that \(r(A)=r_2(E_2)=1\). These are the three cases in Remark 36. Note that \(M_2'\) is a mixed diamond (see Sect. 3). Finally, we have \(r(E)=r_2(E_2)=1\). By Lemma 31, \(M_1 \oplus M_2=M_1' \vee M_2' =M_2'\).

Example 43

The last case to consider is \(M_1=M_2=U_{1,1}\). We have seen that \(M_1'\) and \(M_2'\) are a mixed diamond. To get \(M_1'\vee M_2'\), we first see that \(r(\{0\})=0\). In dimension 1, we have that

$$\begin{aligned} r(\langle (0,1)\rangle )=\min \{ (0+0+1-0), (1+0+1-1) \}=1.\end{aligned}$$

For \(r(\langle (1,0)\rangle )\) we get the same but in a different order, so the rank is again 1. For a 1-dimensional space not equal to \(E_1\) or \(E_2\) we get

$$\begin{aligned} r(A)=\min \{(0+0+1-0), (1+1+1-1)\}=1.\end{aligned}$$

Finally, for E we get

So, \(M_1\oplus M_2=U_{2,2}\).

Note that it follows from this example that \(U_{1,2}\) is connected: it cannot be written as a direct sum of two q-matroids of dimension 1.

Example 44

We calculate the q-matroid \(P_1^*\) (see Sect. 6); it is the sum of a prime diamond (see Sect. 3) and an independent 1-dimensional space, that is, \(M_1=U_{1,2}\) and \(M_2=U_{1,1}\). Let \(E_1=\langle (0,0,1),(0,1,0)\rangle \) and \(E_2=\langle (1,0,0)\rangle \). We first have to make \(M_1'\) and \(M_2'\).

For \(M_1'\) we take \(\ell =E_2=\langle (1,0,0)\rangle \). We have that \(r_1'(0)=0\) and \(r_1'(E)=r(M_1)=1\). For a 1-dimensional space inside \(E_1\), the rank is 1, while \(r_1'(\ell )=0\). For any other 1-dimensional space A, \(r_1'(A)=r_1(A')\) for \(A'\subseteq E_1\), so \(r_1'(A)=1\). For the 2-dimensional spaces A, \(r_1'(E_1)=1\). If \(\ell \subseteq A\), then \(r_1'(A)=r_1(A\cap E_1)=1\). For the other 2-dimensional spaces we have \(r_1'(A)=r_1(E_1)=1\). Together, we find that \(M_1'\) is the q-matroid \(P_1\) in Sect. 3.

For \(M_2'\) we have to add a loop twice to \(U_{1,1}\). The first loop gives the mixed diamond, as explained in the previous example. The second one gives a q-matroid isomorphic to \(P_2\) (see Sect. 4).

Now we take the union. We have \(r(0)=0\) and also \(r(E)=2\) by Lemma 40. There are three types of 1-dimensional spaces, as well as three types of 2-dimensional spaces. Let \(\dim A=1\). If \(A\subseteq E_1\) then

$$\begin{aligned}r(A)=\min \{(0+0+1-0), (1+0+1-1)\}=1.\end{aligned}$$

If \(A=E_2\) then

$$\begin{aligned}r(A)=\min \{(0+0+1-0),(0+1+1-1)\}=1.\end{aligned}$$

For the other 1-dimensional spaces A,

$$\begin{aligned} r(A)=\min \{(0+0+1-0),(1+1+1-1)\}=1. \end{aligned}$$

Now let \(\dim A=2\). If \(A=E_1\) then

$$\begin{aligned} r(A)=\min \{(0+0+2-0),(1+0+2-1),(1+0+2-2)\}=1. \end{aligned}$$

For the other 2-dimensional spaces A, note that any 1-dimensional space has rank 1 in either \(M_1'\) or in \(M_2'\), contributing \((1+0+2-1)=(0+1+2-1)=2\) to the minimum. The zero space also contributes \((0+0+2-0)=2\), and the space itself gives \((1+1+2-2)=2\). So \(r(A)=2\).

In total, we see that \(U_{1,2}\oplus U_{1,1}\cong P_1^*\).

6.3 Properties of the direct sum

We will now show that the direct sum as defined here has some desirable properties. All of these results are also true for the classical case, motivating the ‘correctness’ of the definition of the direct sum presented in the previous section. Further support of the definition is provided by Gluesing-Luerssen and Jany [12], where it is shown that the direct sum is the coproduct in the category of q-matroids and linear weak maps.

Theorem 45

Let \(M_1\) and \(M_2\) be two q-matroids with ground spaces \(E_1\) and \(E_2\), respectively. Then for any \(A\subseteq E\) of the form \(A=A_1\oplus A_2\) with \(A_1\subseteq E_1\) and \(A_2\subseteq E_2\) it holds that \(r(M_1\oplus M_2;A)=r(M_1;A_1)+r(M_2;A_2)\).

Proof

By definition of the direct sum (Definition 38) we have that

$$\begin{aligned} r(M_1\oplus M_2;A)=\min _{X\subseteq A}\{r(M_1';X)+r(M_2';X)+\dim A-\dim X\}. \end{aligned}$$

We will show that the minimum is attained for \(X=A\). First, note that \(A+E_2=A_1\oplus E_2\) and \(A+E_1=A_2\oplus E_1\). Then taking \(X=A\) inside the minimum gives

$$\begin{aligned} r(M_1';A)+r(M_2';A)+\dim A-\dim A=r(M_1;A_1)+r(M_2;A_2). \end{aligned}$$

We have left to show that for any \(X\subseteq A\), the quantity inside the minimum is at least \(r(M_1;A_1)+r(M_2;A_2)\). To see this, take \(B_1\subseteq E_1\) and \(B_2\subseteq E_2\) such that \(X+E_2=B_1\oplus E_2\) and \(X+E_1=B_2\oplus E_1\).

For the dimension of \(B_1\), we have that \(\dim B_1=\dim (X+E_2)-\dim E_2=\dim X-\dim (X\cap E_2)\). Furthermore, \(B_1\subseteq A_1\) and thus by local semimodularity (Lemma 2), \(r(M_1;A_1)-\dim A_1\le r(M_1;B_1)-\dim B_1\). Similar results hold for \(B_2\). Finally, note that \(\dim B_1+\dim B_2\le \dim X\).

Combining this, we get that

This completes the proof that \(r(M_1\oplus M_2;A)=r(M_1;A_1)+r(M_2;A_2)\). \(\square \)

From Theorem 12 the following is now immediate.

Corollary 46

Let \(M_1\) and \(M_2\) be two q-matroids with ground spaces \(E_1\) and \(E_2\), respectively. Then their direct sum satisfies the minor properties of Definition 11.

Note that this implies that also the rest of the results in Sect. 3.1 hold for our Definition 38 of the direct sum. Another desirable property of our definition of the direct sum is that the dual of the direct sum is the direct sum of the duals [16, Proposition 4.2.21].

In order to prove that direct sum commutes with duality, we need to define duality on \(E_1\), \(E_2\) and E in a compatible way.

Definition 47

Let \(E=E_1\oplus E_2\) and let \(\perp \) be an anti-isomorphism on \(\mathcal {L}(E)\) such that \(E_1^\perp =E_2\). Define an anti-isomorphism \(\perp \!\!(E_1)\) on \(E_1\) by

$$\begin{aligned} A^{\perp (E_1)}:=(A+E_2)^\perp =A^\perp \cap E_2^\perp =A^\perp \cap E_1. \end{aligned}$$

Similarly, we define the anti-isomorphism \(A^{\perp (E_2)}=A^\perp \cap E_2\).

The map \(\perp \!\!(E_1)\) (and, similarly, \(\perp \!\!(E_2)\)) is indeed an anti-isomorphism, because it is the concatenation of the isomorphism \([0,E_1]\rightarrow [E_2,E]\) given by \(A\mapsto A\oplus E_2\) and the anti-isomorphism \(\perp \) restricted to \([E_2,E]\rightarrow [0,E_1]\).

Theorem 48

Let \(M_1\) and \(M_2\) be q-matroids on ground spaces \(E_1\) and \(E_2\), respectively. Then we have that \((M_1\oplus M_2)^*=M_1^*\oplus M_2^*\).

Proof

Let B be a basis of \(M_1\oplus M_2\). We will prove that \(B^\perp \) is a basis of \(M_1^*\oplus M_2^*\). First, note that by Lemma 40 we have

$$\begin{aligned} r(M_1^*\oplus M_2^*)&= r(M_1^*)+r(M_2^*) \\&= \dim E_1-r(M_1)+\dim E_2-r(M_2) \\&= \dim E-r(M_1\oplus M_2) \\&= \dim B^\perp . \end{aligned}$$

This means that if we show that \(B^\perp \) is independent in \(M_1^*\oplus M_2^*\), it is also a basis. The rank of \(B^\perp \) in \(M_1^*\oplus M_2^*\) is given by

$$\begin{aligned} r(M_1^*\oplus M_2^*, B^\perp )=\min _{X\subseteq B^\perp }\{r((M_1^*)';X)+r((M_2^*)';X)+\dim B^\perp -\dim X\}. \end{aligned}$$

We want this to be equal to \(\dim B^\perp \); hence, we need to show for all \(X\subseteq B^\perp \) that

$$\begin{aligned} r((M_1^*)';X)+r((M_2^*)';X) \ge \dim X. \end{aligned}$$

This bound is tight: take \(X=\{0\}\) for example. In order to rewrite the left-hand side of this inequality, note that

$$\begin{aligned} ((X+E_2)\cap E_1)^{\perp (E_1)}&= ((X+E_2)\cap E_1)^\perp \cap E_1 \\&= ((X+E_2)^\perp + E_2)\cap E_1 \\&= ((X^\perp \cap E_1)+E_2)\cap E_1 \\&= X^\perp \cap E_1 \end{aligned}$$

because for a space in \(E_1\), first adding \(E_2\) and then intersecting with \(E_1\) is giving the same space we start with. With this in mind, we can rewrite one of the rank functions:

$$\begin{aligned} r((M_1^*)';X)&= r(M_1^*;(X+E_2)\cap E_1) \\&= r(M_1;((X+E_2)\cap E_1)^{\perp (E_1)}) +\dim ((X+E_2)\cap E_1)-r(M_1;E_1) \\&= r(M_1;X^\perp \cap E_1) +\dim E_1-\dim (X^\perp \cap E_1)-r(M_1;E_1). \end{aligned}$$

We have a similar result for \(r((M_2^*)';X)\). Applying this yields

In order for this quantity to be greater than or equal to \(\dim X\), we need to prove for all \(X\subseteq B^\perp \) the following inequality:

We proceed by mathematical induction on \(\dim X^\perp \), so the base case is \(X^\perp =B\). We claim that \(r(M_1;B\cap E_1)=\dim (B\cap E_1)\). Since B is a basis, it holds for all \(Y\subseteq B\) that \(r(M_1';Y)+r(M_2';Y) \ge \dim Y\) (by a reasoning as in the beginning of this proof). In particular, this holds for \(Y=B\cap E_1\subseteq B\), so

$$\begin{aligned} r(M_1';B\cap E_1)+r(M_2';B\cap E_1) = r(M_1;B\cap E_1) + 0 \ge \dim (B\cap E_1) \end{aligned}$$

and thus by the rank axiom (R2) equality holds and we prove our claim. By the same reasoning, we have that \(r(M_2;B\cap E_2)=\dim (B\cap E_2)\). This implies the induction step of our proof:

Now assume the inequality holds for all \(Y\supseteq B\) with \(\dim Y\le d\), where \(\dim B\le d\le \dim E\). Consider a space Y with \(\dim Y=d+1\) and write \(Y=Y'\oplus x\) for some 1-dimensional subspace x. Since x cannot be in both \(E_1\) and \(E_2\), we can assume without loss of generality that \(x\not \subseteq E_1\) for any choice of x such that \(Y=Y'\oplus x\) (the case \(x\not \subseteq E_2\) goes similarly). Then by rewriting and using the induction hypothesis we get

This concludes the proof that \(B^\perp \) is independent in \(M_1^*\oplus M_2^*\), hence a basis, and we have proven that \((M_1\oplus M_2)^*=M_1^*\oplus M_2^*\). \(\square \)

In the last example we will answer the question started in Sect. 3 about the direct sum of two copies of \(U_{1,2}\). This direct sum is now uniquely defined.

Example 49

Let \(M_1=M_2=U_{1,2}\). We will compute \(M:=M_1 \oplus M_2\). This q-matroid is defined as \(M=U_{1,2}'\vee U_{1,2}'\).

Let us coordinatise the ground space of \(M_1\) as \(E_1=\langle (1,0,0,0), (0,1,0,0) \rangle \) and that of \(M_2\) as \(E_2=\langle (0,0,1,0), (0,0,0,1) \rangle \). Let \(E=E_1\oplus E_2\).

We first compute \(U_{1,2}'\). Since \(n_1=n_2=2\), we need to add two loops to \(U_{1,2}\) via Definition 34. This gives a q-matroid with ground space E and \(r(A)=1\) for each \(A\subseteq E\), unless \(A\subseteq E_2\), then \(r(A)=0\).

To determine \(M=U_{1,2}'\vee U_{1,2}'\) we use Lemma 40 to get \(r(M)=2\). By Proposition 13, M does not have any loops. So it suffices to decide for every 2-dimensional space A whether it is a basis or a circuit. First, note that

We distinguish between different types of 2-spaces, depending on their intersection with \(E_1\) and \(E_2\).

  • For \(A=E_1\) or \(A=E_2\) we have \(r(A)=1\) by Corollary 46.

  • Let \(A\cap E_1 =A \cap E_2=\{0\}\), then

    • if \(\dim (X)=0\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    • if \(\dim (X)=1\) then \(r_1(X)+r_2(X)+2-\dim (X)=3\);

    • if \(\dim (X)=2\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    so we conclude that \(r(A)=2\).

  • In the case \(\dim (A\cap E_2)=1\) and \(A\cap E_1 =\{0\}\) (or vice versa) we have

    • if \(\dim (X)=0\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    • if \(\dim (X)=1\) then \(r_1(X)+r_2(X)+2-\dim (X)=3\) if X is not contained in \(E_2\), and \(r_1(X)+r_2(X)+2-\dim (X)=2\) otherwise;

    • if \(\dim (X)=2\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    so we conclude that \(r(A)=2\).

  • Finally, if \(\dim (A\cap E_2)=\dim (A\cap E_1)=1\) we have that

    • if \(\dim (X)=0\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    • if \(\dim (X)=1\) then \(r_1(X)+r_2(X)+2-\dim (X)=3\) if X is not contained in \(E_1\) nor in \(E_2\), and \(r_1(X)+r_2(X)+2-\dim (X)=2\) otherwise;

    • if \(\dim (X)=2\) then \(r_1(X)+r_2(X)+2-\dim (X)=2\);

    so we conclude that \(r(A)=2\).

We see that all 2-spaces except \(E_1\) and \(E_2\) are basis. Since we have \(E_1=E_2^\perp \), it follows that this q-matroid is self-dual. Because \(U_{1,2}^*=U_{1,2}\), this example is in agreement with Theorem 48.

7 Connectedness

In the classical case, every matroid is the direct sum of its connected components. It therefore makes sense to consider the notion of connectedness in the study of the direct sum of q-matroids. In this final section we collect some thoughts and examples concerning a possible q-analogue of connectedness. We will not be able to define the concept, but we hope to argue why it is not straightforward and give some possible paths for further investigation.

To define connectedness in classical matroids, we use the following relation on the elements of a matroid \(M=(E,r)\).

Two elements \(x,y\in E\) are related if either \(x=y\) or if there is a circuit of M that contains both x and y.

This relation is in fact an equivalence relation [13, Theorem 3.36]. We call a matroid connected if it has only one equivalence class under this relation. If there are multiple equivalence classes \(E_1,\ldots ,E_k\), then we can write

$$\begin{aligned} M=M|_{E_1}\oplus \cdots \oplus M|_{E_k}. \end{aligned}$$

We will discuss some attempts to find a q-analogue of this equivalence relation. Note that we are looking for an equivalence relation on the 1-dimensional spaces of E.

7.1 First attempt

The first obvious q-analogue for the relation is the following:

Definition 50

Two 1-dimensional spaces \(x,y\subseteq E\) are related if either \(x=y\) or if there is a circuit of M that contains both x and y.

However, this is not an equivalence relation, because it is not transitive. Look at the matroid \(P_1\) from the catalogue (Sect. 3). The spaces \(\langle (0,1,0)\rangle \) and \(\langle (0,0,1)\rangle \) are in a circuit, and also \(\langle (0,0,1)\rangle \) and \(\langle (1,1,0)\rangle \) are in a circuit, but \(\langle (0,1,0)\rangle \) and \(\langle (1,1,0)\rangle \) are not in a circuit.

7.2 Alternative attempt

Assume we have a q-matroid \(M=(E,r)\) with \(\mathcal {H}\) its family of hyperplanes.

Definition 51

Let x and y be two 1-dimensional spaces in E. We say x and y are related if \(x=y\) or if there is a hyperplane \(H\in \mathcal {H}\) such that \(x,y\not \subseteq H\). We call this relation R.

Remark 52

For classical matroids, consider the following relations:

  • x and y are related if \(x=y\) or if there is a circuit containing both x and y.

  • x and y are related if \(x=y\) or if there is a hyperplane containing neither x nor y.

It is a well-established result for classical matroids (see for example [13, Theorem 3.36]) that the first relation is an equivalence relation. It is also a classical result [13, Theorem 3.48] that both relations give the same equivalence classes. However, the q-analogues of these two relations are not equivalent. Being in a circuit is equivalent to being in the orthogonal complement of a hyperplane, not being outside a hyperplane. So the relation defined in this subsection is not equivalent to the relation in the previous subsection. In fact, Definition 51 is an equivalence relation, as the next theorem shows.

Theorem 53

The relation R from Definition 51 is an equivalence relation.

Proof

We follow the proof of Gordon and McNulty [13, Proposition 3.36], replacing circuits with hyperplanes and reversing inclusion. R is clearly reflexive and symmetric. So we only have to prove it is transitive. We will frequently use the following hyperplane axiom [5]:

  1. (H3’)

    If \(H_1,H_2\in \mathcal {H}\) with \(y\not \subseteq H_1,H_2\) and \(x\subseteq H_2\), \(x\not \subseteq H_1\), then there is an \(H_3\in \mathcal {H}\) such that \((H_1\cap H_2)+y\subseteq H_3\) and \(x\not \subseteq H_3\).

Let xyz be 1-dimensional spaces in E. Let \(x,y\not \subseteq H_1\) and \(y,z\not \subseteq H_2\). We have to show there exists a hyperplane \(H'\) not containing x and z. If \(x\not \subseteq H_2\) or \(z\not \subseteq H_1\), we are done, so suppose \(x\subseteq H_2\) and \(z\subseteq H_1\). We will use induction on \(\dim H_1-\dim (H_1\cap H_2)\).

Suppose \(\dim H_1-\dim (H_1\cap H_2)=1\), then we can write \(H_1\) as \((H_1\cap H_2)+z\). Applying (H3’) yields an \(H'\in \mathcal {H}\) such that \((H_1\cap H_2)+y\subseteq H'\) and \(x\not \subseteq H'\). We need to have that \(z\not \subseteq H'\), because otherwise \(H_1\subsetneq H'\) and this violates axiom (H2). So \(H'\) is a hyperplane not containing x and z, as requested.

Now suppose \(\dim H_1-\dim (H_1\cap H_2)=n>1\) and assume that \(H'\) exists for all pairs of hyperplanes such that \(\dim H_1-\dim (H_1\cap H_2)<n\). We will use (H3’) twice to find a hyperplane \(H_4\in \mathcal {H}\) such that \(\dim H_1-\dim (H_1\cap H_4)<\dim H_1-\dim (H_1\cap H_2)\) and such that \(x\subseteq H_4\), \(x\not \subseteq H_1\) and \(z\subseteq H_1\), \(z\not \subseteq H_4\). Then we can apply the induction hypothesis to \(H_1\) and \(H_4\).

First we apply (H3’) to \(H_1\) and \(H_2\). This gives \(H_3\in \mathcal {H}\) such that \((H_1\cap H_2)+y\subseteq H_3\) and \(x\not \subseteq H_3\). If \(z\not \subseteq H_3\) we are done, so let \(z\subseteq H_3\). However, there is a 1-dimensional space \(z^*\subseteq H_1\), \(z^*\not \subseteq H_2\) such that \(z^*\not \subseteq H_3\): if not, \(H_1\subsetneq H_3\) and this violates axiom (H2).

Now we apply (H3’) again, to \(H_2\) and \(H_3\) with \(z^*\not \subseteq H_2,H_3\) and \(z\subseteq H_3\), \(z\not \subseteq H_2\). This gives \(H_4\in \mathcal {H}\) such that \((H_2\cap H_3)+z^*\subseteq H_4\) and \(z\not \subseteq H_4\). If \(x\not \subseteq H_4\) we are done, so let \(x\subseteq H_4\).

By construction (see picture) we have that \((H_1\cap H_2)\subseteq (H_1\cap H_4)\). This inclusion is strict, because \(z^*\subseteq H_1,H_4\) but \(z^*\not \subseteq H_2\). This means we have \(\dim H_1-\dim (H_1\cap H_4)<\dim H_1-\dim (H_1\cap H_4)\). By the induction hypothesis, we can now find an \(H'\in \mathcal {H}\) such that \(x,z\not \subseteq H'\).

This proves that the relation R is transitive, and hence an equivalence relation. \(\square \)

The good news is that we have found a relation that is in fact an equivalence relation. The bad news is that it does not work like we want to. The uniform q-matroids \(U_{0,3}\) and \(U_{3,3}\) only have one equivalence class, where we would want that \(U_{0,3}\) is the sum of three copies of \(U_{0,1}\) and \(U_{3,3}\) is the sum of three copies of \(U_{1,1}\). Also the q-matroid \(P_1^*\) (Sect. 6) in the catalogue has only one equivalence class, where we constructed it in Example 44 as the direct sum \(U_{1,1}\oplus U_{1,2}\). \(P_1\) on the other hand (the dual of \(P_1^*\)) has more than one equivalence class: a signal that this attempt for an equivalence relation does not play nice with duality.

7.3 Towards a well-defined definition

As we saw, Definition 50 is in general not an equivalence relation. However, in some q-matroids it is an equivalence relation. From our examples, we think the following statements could be true.

Conjecture 54

The relation of Definition 50 is an equivalence relation in at least one of M and \(M^*\).

Conjecture 55

Let M be a q-matroid with circuits \(\mathcal {C}\) and cocircuits \(\mathcal {C}^*\). Suppose \(\dim (C\cap C^*)\ne 1\) for all \(C\in \mathcal {C}\) and \(C^*\in \mathcal {C}^*\). Then Definition 50 is an equivalence relation.

Both conjectures are of course true in the classical case. To see this for the last conjecture, note that it can be proven that the intersection between a circuit and a cocircuit can never be a single element. See for example [16, Proposition 2.1.11]. The q-analogue of this statement is not true in general: see for example the q-matroid \(P_1^*\) of Sect. 6. It has one circuit, \(\langle (0,1,0),(0,0,1)\rangle \), that intersects in dimension 1 with the cocircuit \(\langle (1,1,0),(0,0,1)\rangle \).

We welcome any further hints towards a better understanding of the q-analogues of the direct sum, connectedness and their relation.