tubular
@tubular

i like math a lot. and of the different kinds of mathematics that i have acquainted myself with, matroids are my favourite mathematical object, bar none. so i'd like to teach you what a matroid is, one chost at a time.

i will try to make this course accessible to as many as i can. however, matroid theory is a graduate level topic in combinatorics and touches many fields. so to get the most out of this course, you should have a basic understanding of linear algebra, and it wouldn't hurt to know a bit of introductory graph theory or combinatorics either. if there is demand for it, i can put together little appendices to get you up to speed on these topics—leave me a comment or shoot me an ask!—but i'll try not to lean too heavily on things without citing them.

what are matroids?

matroids are a kind of finite geometrical object. they capture some geometrical information about a finite set of points, namely which of them lie together on lines, or on planes, or cetera. maybe these points are situated in some ambient space, but maybe not; this data can be taken down without making reference to that space. in this way, matroids are able to extract just the geometry of those points and nothing else, and this makes them extremely versatile objects that crop up all over the place in mathematics. and this is saying nothing of just how highly structured and rich in interesting data they are!

in 1935, hassler whitney defined matroids in order to study the linear independence of vectors in vector spaces. since then they have outgrown linear algebra to infect graph theory and projective geometry, dominate combinatorial optimization, fascinate algebraic geometers, confound enumerationists and logicians, and inspire computer scientists to study the greedy algorithm. they are a nexus at which many radically different kinds of mathematics intersect, and there are many ways to study them.

okay, that's enough motivation. let's get to it!


well, actually, two last bits of housekeeping, now that you're committed to reading. first, matroid theory has a lot of terminology, so as a convention i will be using bold text when i am defining a piece of terminology, and "quoted text" when i am giving a piece of terminology but NOT explicitly defining it.1

second, i am not good with computer. so if mathml does a linebreak in the middle of some inline math then i'm sorry but i tried.2

rank functions

a matroid M=(E,r) consists of a finite "ground set" E and a rank function r:2E that assigns integers called "ranks" to every subset of the ground set, satisfying the rank axioms, listed below:

  1. "properness" – for all subsets XE,

    0r(X)|X|.

  2. "increasingness" – for all nested pairs of subsets XYE,

    r(X)r(Y).

  3. "submodularity" — for all pairs of subsets X,YE,

    r(XY)r(X)+r(Y)r(XY).

we'll say that the rank r(M) of the entire matroid M is just the rank of the ground set r(E). this is kind of like the dimension of the matroid, but more on that later.

first, i'll gently remind you that |X| is the cardinality of X, that is, the number of elements in it. we will only be dealing with finite sets, |X|<. also, XY is the intersection of X and Y, which is to say the elements common to both subsets, and XY is their union, the elements present in at least one of them.3

second, let's get a nice juicy example going. we'll see plenty more of these later but this one is famous so you gotta see it now. take the ground set E(F7)={1,2,3,4,5,6,7} (or 1234567 for short) and define a rank function by

r(X)= { |X|if |X|2, 2 if X is  123 145 167 246 257 347, or  356, 3otherwise.

in other words, r is as big as it can be for small subsets, but it caps out at 3, and also there are some special triples (which you will soon learn are called "lines") that are capped even earlier at 2. you can check that this satisfies the rank axioms—1 and 2 should be obvious, and for 3 essentially the only nonobvious computation is when X and Y are both lines—so this is indeed a matroid, of rank 3. this matroid F7 is known as the Fano plane and you will see it again; this is not a threat, it is a promise.

finally, a quick nonexample of a matroid. let E(P3)={a,b,c} be the edges of the path graph of length 3 and let ν(X) be the "matching number" of the subgraph on the edges X: ν()=0, ν(ac)=ν(abc)=2, and ν(X)=1 otherwise. then the "necklace" N3=(E(P3),ν) is not a matroid, as it fails submodularity:

ν(ab)+ν(bc)ν(b)=1+11=12=ν(abc).

the intuition

the intuitive slogan for rank is "rank = 1 + dimension", or more precisely, r(X)=1+dimX, for whatever it is that the "dimension of X" could mean.

the idea is, you need one element to specify a point, geometrically speaking, even though points are obviously zero-dimensional. likewise, straight lines are one-dimensional, but you need two distinct points to span a line. two dimensional planes can be spanned by three points, so long as they are non-colinear. and so on. so perhaps instead of clinging to dimensional terminology, let's say: points are rank 1, lines are rank 2, planes are rank 3, etc.

this highlight one big reason why we use rank and not dimension: because the empty set needs a rank of its own, below points, but there's no sensible dimension to assign it. except maybe −1, which is really an awful number to start counting upwards from. i'm not interested in getting into it any deeper than this, but if this reason is unsatisfying then i encourage you to keep this issue in the back of your mind as we continue, especially as we start to discuss loops and, later, projective geometry.

with this intuition in place, let's try to interpret the rank axioms intuitively:

  1. if you have n elements then they specify an object of dimension at most n1.
  2. if you have some elements specifying an object, and then you add more elements to it, the dimension of the object specified must stay the same or increase; it can't go down.

so far so good. but submodularity is a bit tricky though:

  1. if you have two intersecting objects X and Y, then the space they jointly specify can have dimension at most dimX+dimYdimXY.

if X and Y have some intersection of dimension dimXY, then they definitely have to share those dimensions. so when you're considering the dimension of XY which is jointly spanned by X and Y, you can only spend the dimensions of the intersection once, not twice.

i like to imagine this with an open book, representing two planes meeting at a line: X and Y are the two covers, intersecting at the spine, and jointly spanning the 3d space in which you are opening the book. the covers of the book are attached along the whole spine, so they can only unfold into 3d; you would have to cut the spine down to a single point of connection (or disconnect them entirely) if you wanted to splay the covers out into 4d. but you could also keep the book closed without destorying the spine, and it would only span 2d which is less dimensions than 3d. so submodularity permits the rank to be deficient.

i also like to think of it in terms of an equivalent formulation of submodularity, which is may be more or less intuitive for you:

r(XY)r(X)+r(Y)r(XY).

now it's more like, since the two covers of an open book jointly span 3d space, the spine cannot have too large of a dimension, since some of the dimensions of X and Y are busy jointly spanning XY.

however, the dimension of the intersection could be strictly less than this bound implies, if X and Y fail to actually intersect each other enough. maybe one or both of X and Y have no points located on the spine at all, only strictly inside the covers. then their arrangement in XY is gesturing at an intersection—whose size matroid theorists might call the local connectivity c(X,Y)=r(X)+r(Y)r(XY)—that we don't have the points (in XY) to articulate.

regardless of whether my intuitive exposition made any sense, the real trick of matroid theory is that these axioms are all it takes to impose a coherent notion of geometry on the ground set. if you have ranks that are proper, increasing, and submodular, then—matroid theorists claim—you have geometrical information. i have some more theory to do and terms to define in the following sections, and i hope that will clear some of this up, by giving you some terminological ground to stand on.

the lattice of flats

let's prove our first proposition about matroids.

proposition 1.1. every subset XE is contained in a unique maximal superset XX of equal rank.

okay, that statement was a little bit glib, can i get an action replay on that?4

proof of prop 1.1. suppose Y,ZX are two distinct supersets of equal rank to X. first note that YZX, so since rank is increasing, r(X)r(YZ). then, together with submodularity at Y and Z, we see that

r(X)r(YZ)r(Y)+r(Z)r(YZ)r(X)+r(X)r(X)=r(X),

which means all the inequalities were really equalities = and thus r(YZ)=r(X).

since Y and Z were arbitrary, this means that for any two supersets of X of equal rank, their union is an even greater superset of equal rank. there are only finitely many supersets of X, as they are all subsets of E, so the union of all supersets of X whose rank is r(X), will be the unique maximal superset of that rank. ∎

okay, whew, glad that's over. that was a pretty sneaky trick we pulled at the end: because you could combine any two supersets into a bigger superset that still fits the bill, you know that your maximal superset must be unique, as if it wasn't unique then it wouldn't even be maximal!5

now that we know this maximal superset is unique, let's name it: X is the closure of X. and let's also say that X spans X.

a flat is a set which is closed, i.e. equal to its own closure—F=F. flats are special among subsets of matroids as they are "where the geometry is happening". let me explain by defining some more terminology: flats of rank 1 are called points, flats of rank 2 are called lines, flats of rank 3 are called planes, and flats of rank r(M)1 are called hyperplanes. there's also a unique flat of rank 0, so it doesn't usually get a name, but its elements are called loops, and loops belong to every flat.

flats behave like you might expect from straight line geometry. most importantly, intersections of flats are again flats,6 so by considering their ranks you get a limited number of possible outcomes. for instance, if two lines meet, they are either equal (i.e. they are the same line), or they meet at a point, or they meet only at the loops (i.e. effectively not meeting at all, and literally so in a "loopless" matroid). if two planes meet, they are either the same plane, or they meet in a line, or in a point, or at the loops.

the union FF of two flats might not be a flat. however, you can always take the closure afterwards, to get a flat called the join FF=FF. it turns out the flats of a matroid form a "lattice" where the "meet" is and the "join" is . i love lattices and have a long history of being unable to shut up about them, but i will mostly hold my tongue for now. there used to be a heavily algebraic school of combinatorics that studied matroids lattice-theoretically, and while they have been largely relegated to history, their work and ambitions remain influential, so it would be a disservice to skip it entirely, but we should see a little more modern matroid theory first.

matroid diagrams

to conclude this first lesson, let's use our flat terminology to draw pictures of matroids. to start, a very simple proposition.

proposition 1.2. r(X)=minflat FXr(F).

proof. X is a flat and has the same rank as X. and by maximality, every other flat containing X has a strictly larger rank. ∎

perhaps this seems so simple as to be boring, but this is an important way to reframe rank: to give you a matroid, it suffices to tell you just the flats and their ranks. and since we have such suggestively geometric names for flats of low rank, maybe you can already see the trick we will try to pull... we're gonna just draw matroids as configurations of points and lines and planes! and if we're clever with perspective or use other visualization tricks, maybe we can depict higher rank flats too.

matroid diagram sampler

check out the matroid diagrams above. all lines (straight or not) are flats of rank 2, and all triples of points not lying on a line are not rank 2. the planes of the rank 4 matroids are unshaded but i have made an effort to suggest their existence by shading lines, and annotated with the number of planes of maximum size.

of some interest is the rank-3 "non-pappian matroid", so called because it defies pappus' hexagon theorem, which states that if you tried to draw that matroid on paper then the three medial points will also be colinear. in matroid theoretic terms this theorem might be restated "the non-pappian matroid is not representable over the reals".7 we'll see more of this later in this series.

there is also an attempt at depicting the necklace in a diagrammatic way, to demonstrate that not every such diagram defines a matroid. it uses (and abuses) the convention that, to depict points of size 2, you might draw them as an appropriate number of spots all touching each other, to indicate colocation. of course, this diagram is gibberish because it is not a matroid. but i think it's fun.

chestnut 1.3. recall the loops of a matroid are those elements e. where should you draw the loops in a matroid diagram?

next time

this chost is getting real long and i'm over time so i should wrap it up. next time we'll build some more examples of matroids, learn some more about matroid anatomy and taxonomy, and discuss the fascinating phenomenon of "cryptomorphism" through matroid axiomatizations. there are so so many ways to look at a matroid, and i can't wait to show them to you!


  1. the distinction, to me, is that sometimes i will give a definition of a complicated thing and give names to a bunch of parts of it. the thing itself will definitely be in bold, because i am explaining it, but the parts may be bold or "quoted" depending on whether i think there is something worth explaining about them. so if you see some new word in bold, that means i am explaining it or about to explain it, but if you see it in quotation marks instead, that means you should not worry about knowing what it is

  2. cohost simply has too many widths and i too strongly despise writing around a trillion displaymaths. this chost is long enough as it is and i have so much more to bloviate about. i don't know why @staff won't just give me a little mathjax. as a treat for posting so slowly and gently that i don't wear out the servers

  3. if you didn't already know this stuff, then i admire your gumption in hoping to follow along, but i fear it will be an uphill battle for you. if you did already know this stuff then here's a free time-saving tip: you can skip8 that paragraph9 the next time you read this post :eggbug-wink:

  4. yes! unique... maximal... superset... of equal rank...! haha jk here you go:

    • "superset" just means larger set: XXE.
    • "superset of equal rank" means that despite being larger we're making sure the rank is the same: r(X)=r(X).
    • "maximal" means that we are taking something as large as possible, subject to the conditions. a maximal superset of equal rank means if you try to add in any more elements, the rank will change (and because rank functions are increasing, we know that the change that will occur won't be a decrease).
    • "unique" means that there's only one such maximal superset of equal rank. in our necklace nonexample N3, the singleton set {b} has two distinct maximal supersets of equal matching number, namely {a,b} and {b,c}. this proposition says that will never happen in a matroid.
  5. all this talk of maximal elements and proofs by contradiction is getting me a little zorny

  6. exercise! :eggbug-uwu:

  7. my professor used to joke that this is certainly the earliest theorem in matroid theory, as 340 BCE predates even the definition of matroids by over two thousand years! if you're reading this, jim 🍻 cheers

  8. my favourite part of reading math is skipping the boring parts you know already. nobody ever puts anything interesting in there!! doing the exercises is for cowards

  9. you can also skip these footnotes!10

  10. i love me some footnote tomfoolery. unfortunately markdown automatically renumbers footnotes, so this first pit of snakes won't be numbered 4, 5, 6 (as authorially intended) without giving up the laziness of markdown. i have complained about this before and i will do so again


You must log in to comment.
Pinned Tags