The category of matroids

The structure of the category of matroids and strong maps is investigated: it has coproducts and equalizers, but not products or coequalizers; there are functors from the categories of graphs and vector spaces, the latter being faithful; there is a functor to the category of geometric lattices, that is nearly full; there are various adjunctions and free constructions on subcategories, inducing a simplification monad; there are two orthogonal factorization systems; some, but not many, combinatorial constructions from matroid theory are functorial.

Overview of the categorical nature of matroids The construction making matroids out of vector spaces is then functorial, and in fact nearly fully so, as we will show in Section 7. -There is then an elegant orthogonal factorization system, as we will show in Section 6, that connects to the important topic of minors, as we will show in Section 5.
The resulting category has some limits and colimits, but not all, as we will show in Section 3, see Figure 1. It will also turn out that many combinatorial constructions from matroid theory are not even functorial, as we will show in Section 8, see Figure 1. Weaker choices of morphisms, such as the so-called weak maps and comaps [25], lead to less well-behaved categories. However, as we show in Section 9, strong maps allow us to characterize matroids in terms of optimality of the greedy algorithm via limits.
To complete the overview of this article: Section 2 recalls the various equivalent definitions of the objects of the category that we will need, and Section 4 establishes adjunctions between various subcategories of well-studied types of matroids, showing that simplification is monadic. See Figure 2.
One feature of matroid theory that we leave for future work is duality: functoriality of this construction needs a choice of morphisms that stands to strong maps as relations stand to functions. Finally, generalized matroids called bimatroids [15] have a distinctly 2-categorical flavour to them, that we do not go in to here.

The category
Matroids, the objects of our category of interest, can be defined in many equivalent ways. We list some that are used later, writing #X for the cardinality of a set X. Although some of the theory of matroids goes through for infinite sets [8], that situation is much more intricate. Therefore we will only consider the finite case. Definition 2.1 A matroid M consists of a finite ground set |M | with, equivalently: -a family of I of subsets of |M |, called the independent sets, satisfying: nontrivial: the empty set is independent; -downward closed: if I ∈ I and J ⊆ I then also J ∈ I; -independence augmentation: if I, J ∈ I and #I < #J, then I ∪ {e} ∈ I for some e ∈ J \ I. a maximal independent set is called a basis, and their collection is denoted B; -a family F of subsets of |M |, called the closed sets or flats, satisfying: nontrivial: |M | itself is closed; -closed under intersection: if F, G ∈ F then also F ∩ G ∈ F; -partitioning: if {F 1 , F 2 , . . .} are the minimal flats properly containing a flat F , then {F 1 \ F, F 2 \ F, . . .} partitions |M | \ F . -a rank function rk : 2 |M| → N, satisfying: bounded: 0 ≤ r(X) ≤ #|M| for all X ⊆ |M |; -monotonic: if X ⊆ Y ⊆ |M |, then rk(X) ≤ rk(Y ); -valuation: if X, Y ⊆ |M |, then rk(X ∪ Y ) + r(X ∩ Y ) ≤ rk(X) + rk(Y ).
To see how to turn the data of one of the equivalent definitions into the data of another, define the closure operation cl : 2 |M| → 2 |M| by cl(X) = x ∈ |M | rk(X ∪ {x}) = rk(X) .
A closed set or flat is then a subset of |M | which equals its closure, and rk(X) is the size of the largest independent set contained in X ⊆ |M |. Maximal flats are also called hyperplanes; their collection is denoted by H.
Some elements of a matroid are of particular interest.
Definition 2.2 A loop is an element of a matroid that is not contained in any independent set, or equivalently, an element that is contained in all flats. An isthmus is an element that is included in every basis. Nonloop elements of the same rank-1 flat are called parallel.
The following special types of matroids are of special interest in matroid theory. loopless when it has no loops (other than the point); -simple when it has no loops (other than the point) or parallel elements; -free when every subset (not containing the point) is closed and independent.
Here are some typical examples. Example 2.4 Any finite vector space V gives rise to a matroid M (V ), whose ground set is V , and whose independent sets are those subsets of V that are linearly independent; flats correspond to vector subspaces of V , the closure operation takes linear spans, and the rank function computes the dimension of the linear span. The matroid M (V ) is pointed when choosing the distinguished loop • to be the linearly dependent subset {0}. The pointed matroid M (V ) is free only when V is zero-dimensional or when V = Z 2 . (In fact, infinite vector spaces also satisfy the axioms for independence, but we will not consider the infinite setting here.) Example 2.5 Any (undirected) graph G gives rise to a matroid M (G), whose ground set consists of the edges, and where a subset is independent when it contains no cycles. Loops of M (G) are precisely edges of G between a vertex and itself.
Isthmuses are edges that are not contained in any cycle. Parallel elements of M (G) are precisely parallel edges of G. We can point M (G) by choosing a loop. The matroid M (G) is simple when it has no loops and no parallel edges. It is free only when G has no cycles.
Example 2. 6 We can specify a matroid M by giving (the Hasse diagram of) its partially ordered set L(M ) of flats. For example: is a matroid with ground set {a, b, c, d, e}. As we will see later, any geometric lattice L gives rise to a matroid M (L) this way. The matroid M (L) is simple. It is free only when L is a full powerset lattice.
Matroids form a category with strong maps between them.
Definition 2.7 A strong map from M to N is a function f : |M | → |N | such that the inverse image of any flat in N is a flat in M . Write Matr for the category of matroids and strong maps, and LMatr, SMatr, FMatr for the full subcategories of loopless, simple, and free matroids. A strong map between pointed matroids is pointed when it sends the point to the point. Write Matr• for the category of pointed matroids and pointed strong maps, and LMatr•, SMatr•, FMatr• for the full subcategories of loopless, simple, and free matroids.
The flats of a matroid M , when ordered by inclusion, form a geometric lattice L(M ), where the height of an element is the rank of the corresponding flat; and conversely, every geometric lattice is the lattice of some matroid [21,Theorem 1.7.5]. This gives another way to think about strong maps between matroids. (a) f is a strong map; The assignment M → |M | forms a forgetful functor | − | : Matr → FinSet from the category of matroids to the category FinSet of finite sets and functions. Theorem 2.9 There is a series of adjunctions F ⊣ | − | ⊣ C ⊣ (−) 0 given by where F 0 denotes the bottom element of L(M ). There are no further adjoints.
Proof Functoriality is clear. To see that F ⊣ | − |, note that for every set X, every matroid M , and every function f : X → |M |, there must exist a function η X : X → X and a unique strong mapf : Similarly, to see that | − | ⊣ C, observe that for every strong map f : M → C(X) there must exist a strong map η M : M → C(|M |) and a unique strong map We will count the morphisms K(M ) → X and M → F (X). Because the submatroid η(M ) ⊆ K(M ) has at most 4 elements, we may assume that #K(M) ≤ 4. If #K(M) ≤ 3, pick #X = 2 for fewer maps K(M ) → X than M → F (X). If #K(M) = 4, pick #X = 4. Since the unit η of the adjunction cannot map nonloops to loops, it must map nonloops a = b of M to the same nonloop of K(M ). But this prevents surjective f : M → F (X) mapping a, b to the same nonloop from having a matef : K(M ) → X. Thus F has no left adjoint. Finally, suppose B were a right adjoint to (−) 0 . Let M be a nonempty loopless matroid. Then there is a unique function (M) 0 → X, so there can only exist one strong map f : M → B(X). Hence #B(X) = 1 for all X. But this cannot be a right adjoint to (−) 0 , for if M instead is a matroid with at least one loop and #X > 1, there are multiple functions (M) 0 → X.

⊓ ⊔
Matroids of the form F (X) for some finite set X are precisely free matroids. We will call matroids of the form C(X) cofree matroids.
The fibre of | − | over any finite set X is partially ordered: if M and N are matroids with |M | = |N | = X, then M ≤ N if and only if F M ⊆ F N . This resembles the situation in general topology, with ≤ indicating a "finer" matroid structure, F (X) being the finest (most closed sets) one, and C(X) being the coarsest (fewest closed sets) one.

Limits and colimits
We now examine limits and colimits in Matr and its subcategories. We give proofs and counterexamples to accommodate different variations and to repair mistakes in the literature. Remark 3.1 In some ways, including the computation of limits and colimits, the category of matroids is analogous to the category of topological spaces and continuous functions.
Let D be a diagram in Matr. To construct its limit (if it exists) first take the limit L of |D| in FinSet and denote the limit cone by λ X : L → |X| for X ∈ D. Then the limit of D exists if and only if there is a coarsest matroid structure on L making the λ X strong, that is, if and only if there is a coarsest matroid structure Similarly, for the colimit of D, take the colimit K in FinSet and form a colimit cocone κ X : |X| → K in FinSet. Then the colimit exists if and only if there is a finest matroid structure N on K such that Clearly the empty matroid is an initial object in all subcategories of matroids we consider. The one-element matroid where the element is a loop is a terminal object in all categories of matroids we consider.
The functor | − | : Matr → FinSet restricts to an isomorphism of categories FMatr → FinSet. It follows that FMatr has all finite (co)limits. We turn our attention to larger matroid categories, starting with coproducts and equalizers, that are known to exist, but may alternatively be described as in Remark 3.1. Proof See [9] and also [10,Proposition 4]. The coproduct M + N has ground set It is easy to see that if M and N are simple or loopless, then so is M + N . The coprojections are the inclusions M → M + N and N → M + N , and it is clear that there is a unique strong cotuple M + N → P of strong maps M → P and N → P .
This is a well-defined matroid, that clearly satisfies the universal property. Finally, if M is simple or loopless, then so is E. 3.4 In contrast to topological spaces, there is an obstacle to the existence of all finite limits and colimits of matroids: matroid flat structures on a set X are not closed under finite intersections in 2 2 X because of the partition property. Thus the category of "generalized matroids", with objects defined via closed subsets by removing the partition axiom and strong maps as morphisms, gives a finitely complete and cocomplete category containing Matr. The inclusion preserves coproducts and equalizers. We will now see that products and coequalizers are not reflected. A pair (x, y) ∈ |M | × |M | induces two strong maps x, y : 1 → M , and hence a unique tuple (x, y) : 1 → M × M with π 1 (x, y) = x and π 2 (x, y) = y. Hence M × M has at least 16 elements. The tuple of any permutation σ : |M | → |M | with the identity gives a strong map M → M × M , whose image {(a, σ(a)), (b, σ(b)), (c, σ(c)), (d, σ(d))} must be a flat.

Remark
It follows that these categories do not have pullbacks or exponentials either. Therefore the image of M in P has rank at most 1. But there exist different choices P ′ , such that no rank-1 flat has a strong map to both choices P ′ .
Morphisms f : C(X) → M and g : C(X) → N in Matr correspond tof : X → |M | andĝ : X → |N | in FinSet by Theorem 2.9. These have a pushout Y in set, and it follows that C(Y ) is the pushout of f and g in Matr.
That proof is invalid, as the map y → [y] need not be strong. However, it does hold for the choices in our proof below; that is, there are strong maps from N to options (1) and (3).
Each flat G of C must be of the form In fact each flat F of C must satisfy F = [F ] in N . Thus the only flats which may be contained in C are [3], [4]}, {•, [12], [3], [4]}.
That leaves only three possibilities for a well-defined geometric lattice F: [12], [3], [4] Option (1) fails when we set C ′ to have the same ground set as C with flats (2), because then the inverse image under k of any rank-1 flat is not a flat. Option ( We have seen various classes of matroids: all matroids, simple matroids, free matroids, and loopless matroids. We now study free and cofree constructions translating between these classes. Theorem 2.9 already showed that free matroids over sets exist, and are precisely what we have been calling free matroids. We go on to consider whether the inclusions FMatr ֒→ SMatr ֒→ LMatr ֒→ Matr have adjoints.

Pointed matroids
We first focus on pointed matroids, which play an important role in matroid theory. The proof of Proposition 3.3 applies unchanged to the pointed categories to show that equalizers exist. As in Remark 3.1, the category FMatr• is isomorphic to the category FinSet• of pointed finite sets and pointed functions, and so has all finite (co)limits [2, 28.9.5].
Apart from coproducts, Matr• does not have many colimits: the proofs of Proposition 3.6 and Proposition 3.7 apply unchanged to the corresponding pointed categories to show that there are no coequalizers or pushouts. Because of this, we cannot invoke the adjoint functor theorem. We will reason concretely below, to avoid and repair mistakes in the literature. The categories Matr• and Matr are not equivalent. In particular, Matr• has a zero object: the one-element matroid is both initial and terminal. This matroid is a terminal object in Matr, but not initial.

Free pointed matroids
We start with right adjoints of functors out of the category of free pointed matroids.

⊓ ⊔
The above functor F extends to right adjoints of the inclusions FMatr• ֒→ Matr• and FMatr• ֒→ SMatr•. We now examine whether the functor F itself has a right adjoint for each of those three cases. For LMatr• we have to consider one extra case: The above proof method, of counting morphisms between clever choices of matroids, will be used often and abbreviated in this section.
where M ′ is got from M by deleting all but loops.

Simple pointed matroids
Next, we turn to the inclusion of simple matroids into larger categories. Proof The first statement follows directly from Theorem 7.12. For the second, suppose K ⊣ si•. Take M to be the pointed matroid with two parallel elements a, b and the loop •, and write F 1 for its rank-1 flat. Take S to be the pointed simple matroid with elements e and •. Let f map e to F 1 . Its transposef must map some  (1), R(S) has 4 elements, so its family of flats must be either that of S or The latter case gives 25 strong maps S → M but only 14 strong maps S → R(M ). In the former case the transposef of any map f must be surjective by property (2), but there are no surjective strong maps S → M .

Loopless pointed matroids
Let us consider adjoints of the inclusion of loopless matroids into larger categories.
The The following theorem summarizes all adjunctions in the pointed case. Theorem 4.11 The inclusions have the following adjunctions: The functors in the above diagram have no adjoints other than those indicated.
Proof Collate the previous results in this section.

Unpointed categories
We would like to have a translation principle between pointed and unpointed versions of our matroid categories. Unfortunately, as we have seen in the previous Section, the categories Matr• and Matr are not equivalent. So our results for the pointed categories do not necessarily translate into the unpointed versions, and we have to reason directly for the (non)existence of adjoints. The functor F : Matr → FMatr has a right adjoint V : FMatr → Matr, which in turn has a right adjoint H : Matr → FMatr, both defined as in Theorem 4.6, and H has no right adjoint; we omit the proofs. ⊓ ⊔ Proposition 4.14 The functor F : LMatr → FMatr has a right adjoint U given by: The functor U has no right adjoint.
Proof Take the unit to be the identity andf = f to establish F ⊣ U . Suppose U ⊣ G. Take D to be the free matroid on 2 elements, so U (D) is the matroid with 2 parallel elements. Taking

⊓ ⊔
The following theorem summarizes all adjunctions in the unpointed case. Theorem 4.19 The inclusions have the following adjunctions:

t t t t t t t t t t t t t t t t t t t t t t t t t t t t t
The functors in the above diagram have no adjoints other than those indicated.
Proof Collate the previous results in this subsection.

Deletion and contraction
Let us recall some standard terminology from matroid theory. We can identify the (categorical) subobjects, that is, equivalence classes of monomorphisms M N , where two such monomorphisms are equivalent when there is an isomorphism M ≃ M ′ making the triangle commute. In terms of their domains, subobjects of N correspond to the matroids from which there exists an injective strong map into N . 3 Next we move to the dual notion of subobjects, (categorical) quotients: that is, equivalence classes of epimorphisms M ։ N where two such epimorphisms are equivalent when there is an isomorphism N ≃ N ′ making the triangle commute.
Hence by definition, (matroid) quotients are strong maps that are composed of a contraction after an embedding. The rest of this section proves that quotients are precisely the bijective strong maps, from which it follows by Corollary 3.8 that matroid quotients are not categorical quotients in the category of matroids. This also leads us to a characterisation of subobjects; these are embeddings followed by matroid quotient maps.
Theorem 7.8 in a later section shows that matroid quotients do correspond to categorical quotients in a related category, that we now introduce.
We can derive that contractions, like embeddings, are strong maps.
Lemma 2.8 now establishes the result.

⊓ ⊔
By the standard definition of the contraction operation, the strong map corresponding to contraction acts as the identity on noncontracted elements and maps the rest to the distinguished loop. Alternatively, one may redefine the contracted matroid on the original ground set, keeping the original elements as loops. In the latter case, the contraction map acts as the identity on all elements.
Finally we establish that matroid quotients are precisely bijective strong maps.
Sufficiency follows from Corollary 5.3, necessity is proven by Higgs [12]. ⊓ ⊔ Then c is a coequalizer of f and g.
Conversely, keeping f the same but letting g send all nonloop elements to the same nonloop element results in a coequalizer that is not a contraction.

Factorization
In this section we study how morphisms between matroids can be factored into easier classes of strong maps. Let us first recall the basic definition [2]. Definition 6.1 A weak factorization system in a category consists of two classes of morphisms L and R such that: every morphism f factors as f = r • l for some l ∈ L and r ∈ R; -both L and R contain all isomorphisms; -if l, l ′ ∈ L, r, r ′ ∈ R, and arbitrary morphism f, g make the following diagram commute, then there is fill-in h making both squares commute: In an orthogonal factorization system the fill-in h is additionally unique.
The standard example of an orthogonal factorization system is that every function between sets factors as an epimorphism followed by a monomorphism. The category of matroids has a very similar orthogonal factorization system. Proof The fill-in is the restriction of g to the image of l, which is a strong map. ⊓ ⊔ Epimorphisms in Matr• can be further decomposed into a quotient followed by a lattice-preserving map [25, page 228]. This would give another orthogonal factorization system with L quotients and and R lattice-preserving maps followed by embeddings, except that the fill-in h, which has to be the function l ′ • f • l −1 by Lemma 5.4, need not be a strong map.
Finally, any quotient can be decomposed into an embedding followed by a contraction, as we have seen in Lemma 7.21. Again this does not give a weak factorization system, but the matroid Q of Lemma 7.21 is the minimal matroid through which a quotient factors like this [14]. For the fill-in h in (4), take the morphisms with L(h) = L(f ) that acts on g on elements when ignoring indices. This is by construction the unique strong map that makes both squares commute, as we conclude by considering what h does on lattices and on elements.
⊓ ⊔ Remark 6. 4 The category Matr• has a double factorization system [22]: every morphism decomposes as a lattice-preserving map followed by an epimorphism injective on elements of each rank-1 flat followed by an embedding. This would give a Quillen model structure, whose fibrations are the maps that distinguish between parallel elements (i.e. are injective on elements of each rank-1 flat), whose cofibrations are the epimorphisms, and whose weak equivalences are the monomorphisms f such that L(f ) preserves rank, except that g need not be a weak equivalence when f and g • f are. This section considers functors into and out of the category of matroids from the categories of geometric lattices, vector spaces, and graphs. We will need the following general notions. Definition 7.1 A functor F : C → D is nearly full when any morphism g in D between objects in the image of F is of the form g = F (f) for a morphism f in C.
A full functor is nearly full, but the converse is not true in general: the functions C(A, B) → D(F A, F B) need not be surjective for all objects A and B in C.
For the next notion, recall that the category of left actions on sets of a monoid M is monoidal [19,VII.4], so one can consider categories enriched in it. Any locally small monoidal category is an example via scalar multiplication [11,1].

Definition 7.2 Let M be a monoid, and C a category enriched in left
Any faithful functor is nearly faithful, but the converse it not true in general. Intuitively, a nearly faithful functor is 'faithful up to a scalar in M '.

Geometric lattices
We start with a functor from the category of matroids to the following category of geometric lattices, extending Example 2.6. Definition 7.3 Write GLat for the category with geometric lattices as objects and as morphisms functions that preserve joins and that map every atom to either an atom or to the least element.
Note that morphisms in GLat are completely determined by their action on atoms, as in geometric lattices all elements are joins of atoms. Proof Lemma 2.8 guarantees that L(f ) is a well-defined morphism in GLat. If X ∈ L(M ) then X = cl(X), so L preserves identities. Finally, to see that L preserves composition, let f : M → N and g : N → P be strong maps. For X ∈ L(M ) then cl(f(M)) ∈ L(N ), so because g is strong cl(g(f(X))) = cl(g(cl(f(X)))). But cl(g(f(X))) = cl(g(cl(f(X)))), so L(g • f ) = L(g) • L(f ).

⊓ ⊔
The functor L is surjective on objects, and injective on the objects of SMatr, but not injective on objects in general.

⊓ ⊔
The functor L is not full. To see this, consider the unique matroid on ground set ∅. Any matroid M allows a unique morphism L(M ) → L(∅), but clearly there is no strong map M → ∅ for nonempty M . This is the only obstruction to fullness in the following sense. Proposition 7.6 The functor L is nearly full; its restriction to Matr• is full. Proof Let M and N be matroids, and let g : L(M ) → L(N ) be a morphism in GLat. First assume that M and N are pointed. Construct a function f : M → N as follows. For every rank-1 flat X in M for which g(X) is the least element of L(N ), define f (x) = • for all x ∈ X. For every rank-1 flat X in M for which the flat g(X) in N has rank 1, let f map all x ∈ X that have not yet been accounted for to an element of g(X) which is not a loop. Lemma 2.8 shows that f is a strong map, and by construction L(f ) = g. Hence L : Matr• → GLat is full.
Finally, observe that in general L(M ) ≃ L(M •). It follows from the argument above that L : Matr → GLat is nearly full.

⊓ ⊔
We will call a morphisms f is lattice-preserving when L(f ) = id. As promised in Section 2, we can now prove that matroid quotients are precisely categorical quotients in GLat via the functor L.  Clearly S preserves identities. Seeing that it also preserves composition comes down to noticing that for simple matroids M , a strong map M → N is completely defined by its action on L(M ), and that adding a loop does not change this. Faithfulness is a direct consequence of the fact that there is a one-to-one correspondence between atoms of the lattice and elements of the matroid's ground set; different mappings between atoms therefore give rise to differents functions between ground sets. Fullness follows from Lemma 2.8. Finally, S is injective on objects because its lattice of flats is unique to a matroid.   [12]. For the fill-in (4), define h : I → I ′ as the morphism that sends every atom a of I that is also in L(A) to f (a), and all other atoms to 0 I ′ .

⊓ ⊔
The rest of this subsection shows that if GLat has an orthogonal factorization system, then it must induce a factorization system in Matr•.  For a morphism f : l 1 → l 2 in GLat/L(N ), define R N (f) : R N l1 (G) → R N l2 (G) as the map with L(R N (f)) = f that acts as the identity on elements. Since R N (l 1 ) • R N (f) = R N (l 2 ), this is a legitimate morphism in Matr•/N , and it clearly respects identities and composition, giving a well-defined functor R N .
Moreover, we claim that the there uniquely exist morphisms η f andĥ making the following diagrams commute for every f : M → N in Matr•, every g : K → L(M ) in GLat, and every strong map h : Namely, take η to be the lattice-preserving map that acts as f on elements when ignoring indices. In the left diagram, the upper and right triangles then commute by construction. By the left triangle, the map h acts as f on elements when ignoring indices. Because both paths along the outer triangle act as f on elements, and both act as h on the lattice, the outer triangle commutes. Since η is lattice-preserving, there can exist at most oneĥ that makes the large triangle commute; namely L(h).
Finally, to see that R N is full: within each rank-1 flat, the strong maps forming the objects of Matr•/N are one-to-one. Therefore, fixing the lattice maps that form the objects of GLat/L(N ) constrains the morphisms of Matr•/N to identities on elements.

⊓ ⊔
The functor M is faithful, but not full: but not linear. Lemma 7.17 The functor M does not preserve coproducts, so has no right adjoint.
Proof As we saw in Section 3 above, coproducts of matroids have to satisfy |M

⊓ ⊔
A matroid M is representable (over k) if there is a strong map f : M → M (V ) for some vector space V (over k) such that a subset X ⊆ |M | is independent if and only if f (X) is independent. In particular, to a matrix with entries in k we may associate a matroid whose ground set consists of the columns of the matrix, and where a subset is independent if the corresponding columns are linearly independent. The rank function of the matroid counts the rank of the matrix of selected columns. Every representable matroid arises this way. When the matroid N is represented by a matrix A, and B ⊆ |M |, we write A [B] for the ordered set of columns of A labelled by elements of B. Not all matroids are representable, so the functor M is not surjective on objects. Nor is it injective on objects: swapping the role of two collinear elements in a vector spaces results in the same matroid.
We now embark on altering the functor M to make it nearly full. Intuitively, we consider the above way to turn a matrix into a matroid, and remove some structure from the matrix. In all cases r ≤ r ′ , and so rk( . The proof is completed by repeating for the other elements of J \ I.

⊓ ⊔
We will consider matrices as multisets of vectors. Recall that a multisubset of a set S is a function j : S → N, which is finite when supp(j) = j −1 (N \ {0}) is finite; a map between multisubsets j → j ′ is a function supp(j) → supp(j ′ ). Definition 7.19 Write MVect k for the category whose objects are finite multisubsets j : V → N of some vector space V over k, and whose morphisms (V, j) → (V ′ , j ′ ) are linear maps V → V ′ that restrict to supp(j) → supp(j ′ ).
There is a canonical inclusion Vect k → MVect k . Theorem 7.20 There is a functor M : MVect k → Matr sending (V, j) to the matroid with ground set having an element for each element of supp(j) where a subset is independent if and only if the corresponding multisubset of vectors in V is (a subset and) linearly independent. It makes the following diagram commute: By induction it suffices to prove that Q 1 is representable over an extension of k.
Construction of Q 1 . We first recall the construction of Q 1 . Let S be a set of cardinality n = rk N (N) − rk M (M). Define a matroid M 1 by |M 1 | = |M | ⊔ S and I M1 = {I 1 ∪ I 2 | I 1 ∈ I P , I 2 ∈ 2 S }. This is clearly representable over k and hence over all its extensions. Define a matroid G by |G| = |M | ⊔ S and I G = I N . Again this is clearly representable over k as it merely adds n loops, say with matrix D. Write f ′ for the map M 1 → G acting as f on |M | and as the identity on S. We make M 2 with |M 2 | = |G| into a matroid by I M2 = {A ⊆ |G| | rk G (A) ≥ |A| − 1}, which is well-defined as we will construct a matrix representing it.
Extend the field k with a transcendental λ i for each x i ∈ |G|. Extend D to a matrix D + over k[λ i ] by adding one more row λ 1 λ 2 · · · λ #G , and set M ′ 2 = M (D + ). By construction a subset A ⊆ |M ′ 2 | = |G| is independent in M ′ 2 precisely when the corresponding columns of D + are independent, or equivalently rk(D +[A] ) = |A|. As λ i are algebraically independent from each other and from any other element of D + , for A dependent in Well-definedness of Q 1 . We will show that which is a well-defined matroid with a strong map M 1 → Q 1 [25, Exercise 7.20(a)]. We will derive I Q1 = I M1 ∩ {I ∪ {q} | I ∈ I G , q ∈ |G|} from the above equation.
Observe that a strong map M 1 → Q 1 implies I Q1 ⊆ I M1 . The independent sets of Q 1 are the minimal subsets I with rk Q1 (I) = rk K1 (F ), for F ∈ F(Q 1 ). It suffices to show that the flats of Q 1 are exactly those flats F of M 1 for which either rk Q1 (F ) = rk G (F ) or rk Q1 (F ) = rk G (F ) + 1. If F ∈ {X ∈ F(M 1 ) | rk M1 (X) = rk G (X)} this is clear as rk M1 (F ) = rk G (F ) = rk Q1 (F ). It remains to show that rk Q1 (F ) = rk G (F ) + 1 when rk Q1 (F ) = rk G (F ) and F = sup f ′ (Y )=clG(f ′ (F )) Y .
Since I G ⊆ I Q1 ⊆ I M1 , rank does not increase from M 1 to Q 1 and from Q 1 to G. Take Fc = cl G (f ′ (F )) and Therefore, only flats of at most two consecutive levels of L(Q 1 ) can map to Fc. And since I G ⊆ I Q1 , there is always at least one F 0 ∈ F(Q 1 ) with Fc = cl G (f ′ (F 0 )) and rk Q1 (F 0 ) = rk G (Fc), namely F 0 = cl K1 (I) for I independent in G. Hence rk Q1 (F ) = rk G (F ) + 1 and consequently I Q1 = I M1 ∩ {I ∪ {q} | I ∈ I G , q ∈ |G|}. Thus Q 1 is well-defined.
Representability of Q 1 . Let M 1 be represented by the matrix C. Extend k with transcendentals µ l for l = 1, 2, . . . , rk(M 1 ), and multiply the lth row of C by µ l . Now construct the matrix D ′ + from D as we constructed D + above, but now setting λ ′ i = l µ l C li in place of λ i in the new row. The elements of the new row are algebraically independent if and only if the corresponding columns of C are linearly independent. We will show that D ′ + in fact represents Q 1 . As before, if I is independent in G then it is also independent in D ′ + . In addition, X dependent in G is independent in D ′ + if and only if rk G (X) = #X − 1 and the new row of D ′ +[X] adds 1 to the rank, that is, if its elements {λ ′ i } are algebraically independent. But this happens exactly when X is independent in

⊓ ⊔
We can now prove our main result about the functor M , adapting [15]. A matroid representable over the finite fields GF (3) and GF (8) is also representable over Q and over all finite fields except possibly GF (2) [21,Theorem 14.7.7]. Hence it suffices to prove the following statement: Strong maps f i : M k (V ) → M k (W ) for finite k are exactly those maps for which one can find a suitable morphism L : V ′ → W ′ of MVect j for some finite j so that f i = M (L). We go on to prove this.
First assume g is surjective. Factor it as in Lemma 7.21 and represent N as a matrix A over a field extension l of k. Multiply A by the matrix that has zeroes everywhere except the diagonal entries labelled by Q, where it has entries one. Now B = CA represents N . Since matrices A and B represent objects of MVect l , the matrix C is a linear map between their respective spans.
If g is not surjective, precompose it with another embedding to give another matroid N ′ representable over k. Specifically, we may take I N ′ = {I 1 ∪ I 2 | I 1 ∈ I N , I 2 ∈ I M }, let g ′ acts as g on |N | and as the identity elsewhere [12].

⊓ ⊔
The rest of this subsection considers the functor L • M that turns a vector space into its lattice of vector subspaces, which is of interest to e.g. quantum logic.
Because v, v ′ were not multiples of each other, v − v ′ cannot be a multiple of v. So we must have β = β ′ , and g = βf .

Graphs
Lastly we briefly discuss functoriality of the construction of Example 2.5 turning an undirected graph into a matroid. We simplify the definition of undirected graph [7], as we need not to distinguish bands and loops. Definition 7.24 Write Graph for the following category. Objects are undirected graphs: a set V of vertices, a set E of edges and source and a boundary map θ from E to the class of singleton and two-element subsets V . A morphism is a pair of maps f : V → V ′ and g : E → E ′ satisfying f • θ = θ ′ • g, and #(θ ′ (e)) ≤ #(θ(e)).
To extend Example 2.5 to a functor Graph → Matr, we could restrict the category of graphs to only permit 'strong' morphisms of graphs, whose preimage preserves closed sets (here a set of edges is closed if the addition of an edge does not change the size of a spanning tree in the corresponding subgraph). There is some evidence that this choice of morphisms is useful for some applications of graph theory [23]. Alternatively, we could allow more functions than strong maps as morphisms between matroids. We must at least keep the restriction that loops map to loops. Or we could restrict both the domain and codomain. Let us write Graph * and Matr * for the chosen domain and codomain.
For a functor M : Graph * → Matr * to be of any practical use it should act as the identity on morphisms. It must then have the following properties: -It cannot be surjective on objects. A matroid is of the form M (G) precisely when it is graphic, and there exist non-graphic matroids. -It cannot be injective on objects. 4 Here are graphs -It cannot be full. There are no maps G 1 → G 2 that are surjective on edges, whereas M (G 1 ) must have at least one morphism to itself (namely the identity). -It cannot be faithful. Functions G 2 → G 1 corresponding to the identity matroid map may act differently on vertices.
One could define functors from the category of graphs and strong maps to the category of matroids that assign more obscure matroids to graphs, that we briefly list, but none of them is surjective or injective on objects, nor likely full or faithful. Bicircular matroids [21,Section 12.1], frame matroids and lift matroids [28] reduce to the cycle matroid for Example 2.5. Bond matroids [21,Section 2.3], in the case of planar graphs, reduce to the cycle matroid of the dual graph. A transversal matroid [21,Section 1.6] is defined on the vertices of one side of a bipartite graph.
Recall that the coproduct in Graph is given by disjoint union. Taking strong morphisms in does not change this, that is, the inclusion Graph * → Graph preserves and reflects coproducts. Therefore the functor M : Graph * → Matr must preserve coproducts.

Constructions
This section examines functoriality of various operations of matroid theory.
We start with one of the most prominent ones: the dual M * of a matroid M has the same ground set, but the bases of M * are complements of bases of M . One might hope that taking duals is functorial on matroids and strong maps, but that is not the case. Taking duals is functorial on the subcategory of Matr of surjective strong maps between matroids of equal cardinality, since a quotient q : M → N does induce a strong map q * : N * → M * .
We already saw in Remark 4.2 that adding loops is a functorial process. We now prove that the same holds for adding isthmuses. Proof By construction * is an isthmus in A(M ). Since A = (−) + D, where D is the free matroid on { * }, the assignment A is clearly functorial.

⊓ ⊔
Next we consider the operations of deletion and contraction. As defined in Definition 5.1, they are not functorial. To see this, suppose f : M → N maps m → n and g : L → M maps l → m, where l, m, n are all nonloops; if m is among the elements by which we contract or delete but the elements l and n are not, then the composite morphism f • g cannot canonically be mapped to any strong map, either covariant or contravariant. However, these operations become functorial when we change the category to ensure the deleted/contracted elements in M are exactly those that map to deleted/contracted elements of N .
The result now follows from Lemma 2.8.

⊓ ⊔
We may implement a series of n deletions and contractions by employing the category Matr * n, whose objects are (M, Z 1 , . . . , Zn) where the sets Z i ⊆ |M | are disjoint, and whose morphisms (M, Z 1 , . . . , Zn) → (M ′ , Z ′ 1 , . . . , Z ′ n ) are strong maps f : M → M ′ such that Z i is the preimage of Z ′ i for all i. Then we can define functors C, D : Matr * n+1 → Matr * n. The composition of all these functors produces a minor, so taking minors in Matr is functorial.

⊓ ⊔
The following matroid operation of extension turns out not to be functorial. There are no strong maps X(M ) → X(N ) that agree with f . Hence X(f ) cannot be canonically defined in a way that respects identities, and the free extension cannot be functorial.
It follows that the matroid operation of truncation (contraction by p after free extension by p) cannot be functorial, because it is equivalent to a free extension by p after the addition of an isthmus p which is functorial by Proposition 8.2. A similar counterexample (omitted here) shows that the dual operations of the free extension and the truncation, namely the free coextension and the Higgs lift, are not functorial either.
Finally we consider erection, the inverse matroid operation of truncation. The erections of a matroid M form a lattice based on a certain ordering [25, Chapter 7.5], whose top element E(M ) is the so-called free erection and whose bottom element is M itself; by convention E(M ) = M if M has no erections at all. This operation turns out to be not functorial. Then the identity function is a strong map f : M → N . But there are no strong maps E(M ) → E(N ) that agree with f , so erection cannot be functorial.
So far we have considered operations that input a single matroid. The rest of this section considers operations that combine two matroids into a new one, and discusses whether they give monoidal structure on the category Matr of Matr•. For example, by Proposition 3.2, the coproduct gives one monoidal structure.
The following operations from in matroid theory do not give monoidal structure: the sum or union M ∪N is the matroid whose independent sets are the unions of the independent sets of its constituents; the product or intersection of M ∩ N is the matroid (M * ∪ N * ) * ; the half-dual sum is the matroid M * ∪ N * .    Example 8. 10 Half-dual unions do not give monoidal structure: there are maps A → C and B → D such that there are no maps A ∪ B * → C ∪ D * .
Then F A∪B * = {0} and F C∪D * = ∅, { * } . Once again, the homsets Matr(A, C) and Matr(B, D) each have to contain at least the map sending everything to the loop, whereas A ∪ B * has a loop that cannot be mapped to anything in C ∪ D * .
The intertwining of two matroids, defined as a minor-minimal matroid that contains them both as minors, is not a monoidal product either, as it is not always unique up to isomorphism.
We end on a positive note, by showing that altering the category slightly allows for two more monoidal structures. Write Matr × for the category of matroids with a distinguished element and strong maps preserving the distinguished element. The parallel connection M ||N is the coproduct in this category [25]. Explicitly, the ground set of M ||N is the disjoint union of |M | and |N |, the distinguished elements are identified, and the flats of M ||N are the unions of flats in M and in N . This is similar to the coproduct in Matr, except that the distinguished element need not be a loop.
Finally, the series connection M N is defined dually to the parallel connection: (M * ||N * ) * , and gives another monoidal structure on Matr × . This monoidal structure is not a product, but remarkably enough it is naturally affine, in the sense that there are always natural transformations M N → M and M N → N . Neither of the parallel connection and the series connection distributes over each other. 9 The greedy algorithm There exists a well-known characterization of matroids which, intriguingly, is algorithmic in nature and exemplifies the connection between matroids and problems in combinatorics [21,20]. The optimization problem for the pair (I, w) is to find a maximal member B of I of maximum weight. Definition 9.2 The greedy algorithm for a pair (I, w) as in Definition 9.1 is: (i) Set X 0 = ∅ and j = 0. (ii) If E − X j contains an element e such that X j ∪ {e} ∈ I, choose such an element e j+1 of maximum weight, let X j+1 = X j ∪ {e j+1 }, and go to (iii); otherwise, let B G = X j and go to (iv). (iii) Add 1 to j and go to (ii). (iv) Stop.

⊓ ⊔
Crucially, this theorem is equivalent to the following statement: "The greedy algorithm solves the optimization problem if and only if all maximal independent sets have the same cardinality". It is easy to show that the latter condition is equivalent to the independence augmentation axiom of Definition 2.1.
We observe that this theorem induces an elegant categorical characterization of matroids. Write Vect b k for the category of vector spaces over k with a chosen basis b and linear transformations between them. Proof Let the final output of the algorithm be the list B = (b 1 , b 2 , . . . , br). The vector (w(b 1 ), w(b 2 ), . . . , w(br)) is an element of R r . At the nth step of the algorithm, the candidate output corresponds to a vector in R n . Then the nth step of the algorithm corresponds to an epimorphism en : R n → R n−1 which projects out the largest element of the vector. The algorithm continues as long as there exist incoming morphisms in the subcategory formed by all such epimorphisms (i.e. there exist candidate elements), making the chain maximal in that diagram.

⊓ ⊔
This is the categorical equivalent of the fact that the greedy algorithm produces a maximal independent set; the length of the chain equals the cardinality of that set. The following definition makes precise when a partially ordered set is 'as wide as it is tall'. Definition 9.5 An element z in a partially ordered set covers x when x ≤ z, and if x ≤ y ≤ z then x = y or y = z. Define a square poset to be a finite partially ordered set P with least element, such that any element A ∈ P covers exactly n A + 1 elements, where n A is the length of the maximal chain from the least element to A. A square functor is a functor I : P → Sub from a square poset P to the category Sub of sets and inclusions that is injective on objects and preserves chain lengths.
Every square functor I : P → Sub induces a pair (I, E) where I is a nontrivial downwards closed collection of subsets of a set E. Namely, define E to be the union of all the sets S i in the image of I, and set I = {S i \ I(0)}, where 0 is the least element of P . This is evidently a collection of subsets of E, and it contains the empty set. Because I is injective on objects, the number of inclusions into each object S i is maximal, guaranteeing that all subsets of each member of I are in the image of I. Proof Each nonidentity inclusion in C adds one element to the domain, therefore the length of the chain equals the cardinality of the final codomain. This statement is therefore equivalent to "all maximal elements of I have the same cardinality", which together with the first two axioms defines a matroid. The colimit formulation now follows from the fact that sets with the same cardinality are isomorphic. ⊓ ⊔ Lemma 9.7 Given a square functor I : P → Sub, the induced pair (I, E) is the collection of independent sets and ground set of a matroid if and only if for every contravariant functor W : P → Vect b R such that I factors through W , the limit of the diagram W : C → Vect b R is independent of the maximal chain C ⊆ P . Proof This is equivalent to the above lemma, by the definition of a limit and the fact that vector spaces of the same dimension are isomorphic.

⊓ ⊔
The following theorem summarizes the main result of this section.