In group theory, a branch of mathematics, the Nielsen–Schreier theorem states that every subgroup of a free group is itself free. It is named after Jakob Nielsen and Otto Schreier.
A free group may be defined from a group presentation consisting of a set of generators with no relations. That is, every element is a product of some sequence of generators and their inverses, but these elements do not obey any equations except those trivially following from = 1. The elements of a free group may be described as all possible reduced words, those strings of generators and their inverses in which no generator is adjacent to its own inverse. Two reduced words may be multiplied by concatenating them and then removing any generator-inverse pairs that result from the concatenation.
The Nielsen–Schreier theorem states that if H is a subgroup of a free group G, then H is itself isomorphic to a free group. That is, there exists a set S of elements which generate H, with no nontrivial relations among the elements of S.
The Nielsen–Schreier formula, or Schreier index formula, quantifies the result in the case where the subgroup has finite index: if G is a free group of rank n (free on n generators), and H is a subgroup of finite index [''G'' : ''H''] = e, then H is free of rank
Let G be the free group with two generators
p=aa, q=ab, r=ba, s=bb, t=ab-1, u=a-1b.
s=rp-1q, t=pr-1, u=p-1q
p=aa, q=ab, r=ba,
A short proof of the Nielsen–Schreier theorem uses the algebraic topology of fundamental groups and covering spaces. A free group G on a set of generators is the fundamental group of a bouquet of circles, a topological graph X with a single vertex and with a loop-edge for each generator. Any subgroup H of the fundamental group is itself the fundamental group of a connected covering space Y → X. The space Y is a (possibly infinite) topological graph, the Schreier coset graph having one vertex for each coset in G/H. In any connected topological graph, it is possible to shrink the edges of a spanning tree of the graph, producing a bouquet of circles that has the same fundamental group H. Since H is the fundamental group of a bouquet of circles, it is itself free.
Simplicial homology allows the computation of the rank of H, which is equal to h1(Y), the first Betti number of the covering space, the number of independent cycles. For G free of rank n, the graph X has n edges and 1 vertex; assuming H has finite index [''G'' : ''H''] = e, the covering graph Y has en edges and e vertices. The first Betti number of a graph is equal to the number of edges, minus the number of vertices, plus the number of connected components; hence the rank of H is:
This proof is due to ; the original proof by Schreier forms the Schreier graph in a different way as a quotient of the Cayley graph of modulo the action of .
According to Schreier's subgroup lemma, a set of generators for a free presentation of may be constructed from cycles in the covering graph formed by concatenating a spanning tree path from a base point (the coset of the identity) to one of the cosets, a single non-tree edge, and an inverse spanning tree path from the other endpoint of the edge back to the base point.
Although several different proofs of the Nielsen–Schreier theorem are known, they all depend on the axiom of choice. In the proof based on fundamental groups of bouquets, for instance, the axiom of choice appears in the guise of the statement that every connected graph has a spanning tree. The use of this axiom is necessary, as there exist models of Zermelo–Fraenkel set theory in which the axiom of choice and the Nielsen–Schreier theorem are both false. The Nielsen–Schreier theorem in turn implies a weaker version of the axiom of choice, for finite sets.
The Nielsen–Schreier theorem is a non-abelian analogue of an older result of Richard Dedekind, that every subgroup of a free abelian group is free abelian.
originally proved a restricted form of the theorem, stating that any finitely-generated subgroup of a free group is free. His proof involves performing a sequence of Nielsen transformations on the subgroup's generating set that reduce their length (as reduced words in the free group from which they are drawn).  Otto Schreier proved the Nielsen–Schreier theorem in its full generality in his 1926 habilitation thesis, Die Untergruppen der freien Gruppe, also published in 1927 in Abh. math. Sem. Hamburg. Univ.
The topological proof based on fundamental groups of bouquets of circles is due to . Another topological proof, based on the Bass–Serre theory of group actions on trees, was published by .