Skip to main content

Matroids and Graph Duality

Matroids abstract the idea of independence. In linear algebra, independence means no vector is a linear combination of the others. In graph theory, independence often means no cycle has been formed. Matroids capture the shared exchange behavior behind these situations, allowing graph arguments about trees, cycles, and cuts to be expressed in a more general language.

Graph duality becomes especially clean through matroids. The cycle structure of a planar graph is dual to the cut structure of its plane dual, and matroid duality turns this into an exact algebraic statement. Wilson's final chapter uses matroids to unify ideas that appeared earlier as separate graph theorems.

Definitions

A matroid MM on a finite ground set EE can be defined by a family I\mathcal{I} of independent sets satisfying:

  1. I\emptyset\in\mathcal{I}.
  2. If III\in\mathcal{I} and JIJ\subseteq I, then JIJ\in\mathcal{I}.
  3. If I,JII,J\in\mathcal{I} and I<J\vert I\vert \lt \vert J\vert , then some xJIx\in J-I has I{x}II\cup\{x\}\in\mathcal{I}.

A maximal independent set is a base. A minimal dependent set is a circuit.

For a graph GG, the cycle matroid M(G)M(G) has ground set E(G)E(G). A set of edges is independent in M(G)M(G) exactly when it contains no cycle, that is, when it is a forest. The bases of M(G)M(G) are the spanning forests; if GG is connected, they are the spanning trees.

The dual matroid MM^* has bases

{EB:B is a base of M}.\{E-B: B \text{ is a base of } M\}.

In a graph, minimal edge cuts are often called bonds. In the cycle matroid of a graph, cocircuits correspond to bonds.

Key results

Graphic matroid bases. If GG is connected, the bases of M(G)M(G) are exactly the spanning trees of GG.

Reason: independent sets are forests. A maximal forest in a connected graph must connect all vertices; otherwise an edge between components could be added without creating a cycle.

Cycle-cut duality in planar graphs. If GG^* is a geometric dual of a connected plane graph GG, then

M(G)M(G).M(G^*)\cong M(G)^*.

Cycles in GG correspond to cutsets in GG^*, so the independent and dependent structures dualize.

Rank of a graphic matroid. If AE(G)A\subseteq E(G) and the spanning subgraph (V(G),A)(V(G),A) has c(A)c(A) connected components, then

r(A)=V(G)c(A).r(A)=|V(G)|-c(A).

For connected GG, the full rank is V(G)1\vert V(G)\vert -1.

Planarity criterion through matroids. A graph is planar precisely when its cycle matroid has a dual that is also graphic. This is an abstract form of planar duality.

Deletion and contraction. Matroids have deletion and contraction operations that generalize graph deletion and contraction. In a graphic matroid, deleting an edge from the graph corresponds to deleting that element from the matroid. Contracting a non-loop edge in the graph corresponds to matroid contraction. These operations make minor theory possible and explain why forbidden-minor statements occur both in graph theory and matroid theory.

Why the exchange axiom matters. The exchange axiom says that if one independent set is smaller than another, it can be enlarged using an element of the larger set. For graphs, this is the familiar fact that if one forest has fewer edges than another forest on the same vertex set, then some edge from the larger forest can be added to the smaller one without creating a cycle. This property is what makes greedy algorithms work for matroids.

Greedy algorithm theorem for matroids. If elements of a matroid have weights, the greedy algorithm that repeatedly adds the available element of least weight without destroying independence finds a minimum-weight base. Kruskal's MST algorithm is exactly this theorem applied to the cycle matroid of a graph.

Uniform and partition matroids. Not every introductory matroid is graphic. In the uniform matroid Ur,nU_{r,n}, every subset of size at most rr is independent. In a partition matroid, the ground set is split into blocks and each block has a quota. These examples show that matroids abstract the exchange behavior of independence beyond graphs and vector spaces.

Circuits versus cycles. In a graphic matroid, circuits are exactly graph cycles. In a general matroid, the word circuit means a minimal dependent set, even when there is no graph drawing. This terminology is intentional: many proofs about graph cycles work because they use only the matroid circuit axioms.

Dual rank. If MM has rank function rr on ground set EE, the dual rank function is

r(A)=Ar(E)+r(EA).r^*(A)=|A|-r(E)+r(E-A).

This formula explains why complements of bases become bases in the dual.

Visual

The triangle with a pendant edge has cycle matroid circuits and cut structure that are easy to see.

Edge setIn graphIn M(G)M(G)
{AB,BC}\{AB,BC\}forestindependent
{AB,BC,CA}\{AB,BC,CA\}cyclecircuit
{CA,CD}\{CA,CD\}forestindependent
{AB,BC,CD}\{AB,BC,CD\}spanning treebase
{CD}\{CD\}bridge cutcocircuit in connected case

Worked example 1: List bases of a cycle matroid

Problem. Let G=C4G=C_4 with vertices 1,2,3,41,2,3,4 and edges

e1=12,e2=23,e3=34,e4=41.e_1=12,\quad e_2=23,\quad e_3=34,\quad e_4=41.

List the bases of M(G)M(G).

Method.

  1. The graph is connected and has 44 vertices.
  2. Every base of M(G)M(G) is a spanning tree.
  3. A spanning tree on 44 vertices has 33 edges.
  4. In a cycle graph, deleting any one edge leaves a path through all vertices.
  5. Therefore each base is obtained by omitting exactly one of the four cycle edges.

The bases are

{e2,e3,e4},{e1,e3,e4},{e1,e2,e4},{e1,e2,e3}.\{e_2,e_3,e_4\},\quad \{e_1,e_3,e_4\},\quad \{e_1,e_2,e_4\},\quad \{e_1,e_2,e_3\}.

Check. Each set has size 33, is acyclic, and connects all four vertices. No 44-edge set is independent because the whole cycle is dependent.

Worked example 2: Compute graphic matroid rank

Problem. Let GG have vertices {1,2,3,4,5}\{1,2,3,4,5\} and edge subset

A={12,23,45}.A=\{12,23,45\}.

Find the rank r(A)r(A) in the cycle matroid M(G)M(G).

Method.

  1. Build the spanning subgraph with all five vertices and only edges in AA.
  2. The edges 12,2312,23 connect vertices {1,2,3}\{1,2,3\} into one component.
  3. The edge 4545 connects vertices {4,5}\{4,5\} into a second component.
  4. Therefore the subgraph (V,A)(V,A) has
c(A)=2c(A)=2

components.

  1. The rank formula gives
r(A)=Vc(A)=52=3.r(A)=|V|-c(A)=5-2=3.
  1. Since AA itself has three edges and contains no cycle, it is independent, so its rank should indeed be 33.

Checked answer. r(A)=3r(A)=3.

A second way to see the same answer is to ask for the largest forest contained in AA. The set AA is already a forest with three edges, so its largest independent subset has size 33. If the subset had contained a triangle, the rank would have been smaller than the number of selected edges.

Code

The rank of a graphic matroid can be computed by union-find.

class DSU:
def __init__(self, vertices):
self.parent = {v: v for v in vertices}

def find(self, x):
while self.parent[x] != x:
self.parent[x] = self.parent[self.parent[x]]
x = self.parent[x]
return x

def union(self, a, b):
ra, rb = self.find(a), self.find(b)
if ra != rb:
self.parent[rb] = ra

def graphic_rank(vertices, edges):
dsu = DSU(vertices)
for u, v in edges:
dsu.union(u, v)
components = len({dsu.find(v) for v in vertices})
return len(vertices) - components

V = [1, 2, 3, 4, 5]
A = [(1, 2), (2, 3), (4, 5)]
print(graphic_rank(V, A))

The union-find code computes only the graphic rank. A general matroid may not come with vertices or edges, so its rank must be supplied by a different independence oracle or representation. That distinction is important when moving from graph examples to abstract matroid theory.

When translating between graph language and matroid language, keep the ground set visible. In M(G)M(G) the elements are edges, so a "set" in the matroid is a set of edges. This prevents confusion with independent vertex sets from colouring theory.

Matroid language is compact, so examples are essential. Whenever a statement mentions independent sets, bases, circuits, or cocircuits, translate it back into the graphic case: forests, spanning trees, cycles, and bonds. If the translated graph statement is familiar, the matroid statement is usually abstracting exactly the property that made the graph proof work.

Common pitfalls

  • Confusing independent sets in a graph with independent vertex sets. In the cycle matroid, the ground set is the edge set.
  • Calling every cut a cocircuit. Cocircuits are minimal nonempty cuts in the corresponding matroid sense.
  • Assuming every matroid is graphic. Many matroids do not arise from graphs.
  • Forgetting that bases of M(G)M(G) in a disconnected graph are spanning forests, not spanning trees.
  • Treating matroid duality as the same thing as geometric planar duality. They agree for connected plane graphs under the edge correspondence, but matroid duality is broader.
  • Ignoring loops and bridges. In M(G)M(G), loops are circuits of size 11, while bridges appear in every base of a connected graph.

Connections