Advanced maths

Binary matroid representation calculator from a complete list of bases

Validate a finite basis family and construct a binary matrix whose column matroid has exactly those bases, when possible.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Validate a finite basis family and construct a binary matrix whose column matroid has exactly those bases, when possible.

THE FORMULAFor fixed basis B, D[b,e]=1 iff B−{b}+{e} is a listed basis; test bases([I|D])=input bases over GF(2).

A worked example

Bases {1,2},{1,3},{2,3} on four elements give columns (1,0),(0,1),(1,1),(0,0); element 4 is a loop.

Good to know

1–10 labeled elements with a nonempty complete family of equal-size bases, at most 252 bases. Validate all basis exchanges. Fix a basis, construct [I|D] from fundamental circuits and compare ranks/bases on all subsets. Supports loops and parallel elements. GF(2) only; no claim about representability over other fields.

Provide every basis, not a sample

Enter the ground-set size and the complete list of bases, one equal-size subset per line. Labels run from one through the declared number of elements. The ground set matters even when some labels never appear: those elements may be loops, rather than missing observations that should be silently discarded.

A nonempty basis family is required. Repeated labels within a basis are invalid, while duplicate copies of a whole basis carry no extra information. The supported ground set has at most ten elements and the list at most 252 bases. The empty basis is mathematically meaningful for the rank-zero matroid and needs an explicit empty-set convention.

Binary matroid representation from a complete list of bases exampleA binary triangle with one loop1234(1,0)(0,1)(1,1)(0,0)Bases: {1,2}, {1,3}, {2,3}Column 4 is zero: element 4 is a loop
Scroll across to see the full diagram.
Bases {1,2},{1,3},{2,3} on four elements give columns (1,0),(0,1),(1,1),(0,0); element 4 is a loop.

Compare this with the Linear matroid circuits and flats calculator from a matrix. Invert represented-matroid analysis: accept an abstract basis family, validate the basis-exchange axiom, decide whether GF(2) represents it and construct a matrix or a complete failed local-representation certificate. Existing tool requires a matrix and only computes its circuits/flats/bases.

Validate the basis exchange axiom

Before asking about binary representation, check that every listed basis has the same cardinality and that basis exchange holds. Given bases B and C and an element b in B outside C, some c in C outside B must make B−b+c another listed basis. This condition distinguishes a matroid basis family from arbitrary subsets.

An exchange failure means the supplied family does not describe a matroid under this input contract. It should produce a validation explanation, rather than a claim that the object is a nonbinary matroid. A valid matroid can still fail binary representability, so these are separate stages with different mathematical meanings.

Build fundamental columns over GF(2)

Choose one listed basis B and give its elements identity columns. For each element e outside B, examine exchanges B−b+e. The b coordinate of its column is one precisely when that exchange is a basis. Over GF(2), these support positions determine the candidate fundamental-circuit column without sign choices.

All arithmetic is modulo two. Adding a column to itself gives zero, and rank must be computed over that field rather than over real numbers. After construction, compare the independent subsets or complete basis family of the matrix with the supplied matroid. Constructing plausible columns alone is insufficient because nonbinary matroids can produce a candidate that disagrees elsewhere.

Check a triangle plus a loop

The default bases are {1,2}, {1,3} and {2,3}. Select B={1,2}, giving the first two identity columns. Exchanging either basis element for 3 succeeds, so column 3 is (1,1). No exchange involving 4 succeeds, making its column zero and identifying it as a loop.

Every pair among columns 1,2,3 is linearly independent over GF(2), while their sum is zero. Pairs involving column 4 are dependent. The matrix therefore has exactly the three listed bases. Its rank is two, and this direct pair check supplies a short independent verification of the returned representation.

Interpret loops and parallel elements

A zero column represents a loop, an element in no basis. Equal nonzero columns represent parallel elements: either can supply the same direction, but using both creates dependence. These features are valid and should remain labeled in the output matrix, because deleting them would change the represented ground set.

The illustration labels all four default columns, including the zero column. Read a column as the vector assigned to one element, not as a row describing a basis. Row operations by an invertible binary matrix can change the displayed vectors while preserving all dependencies. Different valid output matrices can consequently describe exactly the same labeled matroid.

Separate rejection from other fields

A valid nonbinary example is the rank-two uniform matroid on four elements, whose bases are all six pairs. In two binary dimensions there are only three nonzero column vectors. Four columns with every pair independent are impossible, so this family cannot have a GF(2) representation.

That obstruction says nothing about representability over larger fields. The same uniform matroid is representable over some other fields, and this page does not search them. Do not translate a binary failure into an assertion that no linear representation exists at all. Field choice is part of the problem, not a numerical precision option.

Use the complete comparison as evidence

The result concerns the exact list supplied. Omitting one basis can invalidate exchange or can define a different matroid with a different representability result. When importing data, preserve the declared ground-set size, all element labels and all bases; do not keep only a spanning subset of the basis list.

A successful certificate includes a binary matrix and agreement with the full basis family. You can independently row-reduce every r-column submatrix, where r is the common basis size, and recover the same list. This provides a practical audit path for a small object without relying on a graphical depiction or an unverified representability label.

A few questions, answered

Why include labels that appear in no basis?

They are ground-set elements represented by zero columns, called loops.

Can a valid matroid be nonbinary?

Yes. The uniform rank-two matroid on four elements is a standard example.

Can I enter only some bases?

No. The calculation interprets the list as the complete family.

Does a binary failure rule out every field?

No. Only GF(2) representability is tested.

Find your calculator

Start typing to explore the library.