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 and having a nearly full Kan extension; 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. Finally, a characterization of matroids in terms of optimality of the greedy algorithm can be rephrased in terms of limits.


Introduction
Matroids are very general structures that capture the notion of independence. They were introduced by Whitney in 1935 as a common generalization of independence in linear algebra and independence in graph theory [26]. They were linked to projective geometry by Mac Lane shortly thereafter [18], and have found a great many applications in geometry, topology, combinatorial optimization, network theory, and coding theory since [21,25]. However, matroids have mostly been studied individually, and most authors do not consider maps between matroids. The only explicitly categorical work we are aware of is [3-6, 17, 24]. The purpose of this article is to survey the properties of the category of matroids.
Of course, speaking of "the" category of matroids entails a choice of morphisms. There are compelling reasons to choose so-called strong maps: -They are a natural choice of structure-preserving functions.
-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 Fig. 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 Fig. 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 Fig. 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.  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.

Definition 2.3
A matroid is pointed when it has a distinguished loop, denoted • and called the point. A (pointed) matroid is: 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.)   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 mapf : 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 M on L such that {λ −1 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 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 also [3,Theorem 53]. The equalizer of f, g : This is a well-defined matroid, that clearly satisfies the universal property. Finally, if M is simple or loopless, then so is E. Remark 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. It follows that these categories do not have pullbacks or exponentials either.
That leaves only three possibilities for a well-defined geometric lattice F: [12], [3], [4] [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 (2) [12]} , because then the inverse image under k of the rank-0 flat is not a flat.

Corollary 3.8 A morphism of Matr is monic if and only if it is injective, and epic if and only if it is surjective.
Proof The functor | − | : Matr → FinSet reflects kernel pairs and cokernel pairs. It follows that | − | preserves and reflects monomorphisms and epimorphisms.

Adjunctions Between Subcategories of Matroids
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. 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 element e of K(S) to either a or b.  (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.

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 t t e e 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 t t t t
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.

Proposition 4.12
The category FMatr is a coreflective subcategory of LMatr: the inclusion FMatr → LMatr has a right adjoint F defined by:  Proposition 4.14 The functor F : LMatr → FMatr has a right adjoint U given by:

It extends to right adjoints of the inclusions
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     Proof If N were a right adjoint, it would satisfy properties (1) and (2)  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 t t t O O d d 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 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.

Corollary 5.3 If M is a pointed matroid and
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.

Lemma 5.4 A function f : M → N is a bijective strong map if and only if it factors as an
Proof Sufficiency follows from Corollary 5.3, necessity is proven by Higgs [12].

Lemma 5.5 Every contraction is a coequalizer in
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 latticepreserving 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 Eq. 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.
Proof As embeddings are by construction injective, the orthogonal factorization systems of Lemma 6.2 and Theorem 6.3 are comparable in the sense of [22,Proposition 2.6], and hence form a double factorization system [22,Theorem 2.7]. The middle class of morphisms are those that are both epic and injective on rank-1 flats, that is, strong maps that are bijective when restricted to rank-1 flats. As for the purported Quillen model structure, the weak equivalences are the strong maps that factor as a lattice-preserving map followed by an embedding, which are precisely the strong maps as in the statement, but [

Functors
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 [1,11]. 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)))), The functor L is surjective on objects, and injective on the objects of SMatr, but not injective on objects in general. 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. There is also a functor in the opposite direction. Proof Proposition 7.6 guarantees that S(f ) is a legitimate morphism in Matr • . 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.
v v n n n n n n n n n 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.

Corollary 7.15 Any orthogonal factorisation system (L, R) in GLat induces an orthogonal factorization system
Proof Apply [27] to the previous proposition.

Vector Spaces
Next we extend Example 2.4 to a functor from the category FVect k of finite vector spaces over k and linear maps to the category of matroids. The functor M is faithful, but not full:

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. 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 . Proof The first statement follows from the fact that every surjective strong map factors as a bijective strong map followed by a strong map τ that reflects and preserves representability (over k) [25, page 228]. Hence we may assume |M| = |N | and ignore the map τ for the rest of the proof.
The independent sets of Q are the intersection of the sets of independent sets of two matroids representable over an extension of k [14], which is proven in steps: 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 Q 1 = I M 1 ∩ {I ∪ {q} | I ∈ I G , q ∈ |G|} from the above equation.
Observe that a strong map M 1 → Q 1 implies I Q 1 ⊆ I M 1 . The independent sets of Q 1 are the minimal subsets I with rk Q 1 (I ) = rk K 1 (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 Since I G ⊆ I Q 1 ⊆ I M 1 , rank does not increase from M 1 to Q 1 and from Q 1 to G.
Therefore, only flats of at most two consecutive levels of L(Q 1 ) can map to F c . And since I G ⊆ I Q 1 , there is always at least one 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 M 1 ! So the independent columns of D + are 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.

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 G 1 G 2 with M(G 1 ) = M(G 2 ): -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. We already saw in Remark 4.2 that adding loops is a functorial process. We now prove that the same holds for adding isthmuses.

Proposition 8.2 There is an endofunctor A : Matr → Matr that acts on objects as B A(M) = {B ∪ { * } | B ∈ B M }, and on morphisms as A(f )( * ) = * and A(f )(x) = f (x).
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 .
Proof The operations on objects are clearly well-defined, and identity and composition are clearly respected. We need only show that the operations on morphisms are well-defined. For X ⊆ Y ⊆ |M| \ Z: 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 , . . . , Z n ) where the sets Z i ⊆ |M| are disjoint, and whose morphisms (M, Z 1 , . . . , Z n ) → (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. 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 * .
Then 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 MN 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 MN → M and MN → N . Neither of the parallel connection and the series connection distributes over each other.

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 [20,21]. Definition 9.1 Let I be a collection of subsets of a finite set E that satisfies the nontrivial and downward closed conditions from Definition 2.1. Given a function w : E → R define the associated weight function w : 2 E → R by 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.

Lemma 9.4 Every run of the greedy algorithm produces a maximal chain of epimorphisms in a subcategory of Vect b
R .
Proof Let the final output of the algorithm be the list B = (b 1 , b 2 , . . . , b r ). The vector (w(b 1 ), w(b 2 ), . . . , w(b r )) 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 e n : 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.

Theorem 9.8 The greedy algorithm solves the optimization problem if and only if the chains in Vect b
R induced by all runs have the same limit.
Proof Combine Theorem 9.3 and Lemma 9.7.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.