Given a graph , that is, a collection of vertices and of labeled arrows between them, the free groupoid on is the groupoid that has the vertices of as objects, and whose morphisms are constructed recursively by formal composition (i.e., juxtaposition) from identity maps, the arrows of and formal inverses for the arrows of .
The only relations between morphisms of are the necessary ones defining the identity of each object, the inverse of each arrow in and the associativity of composition. This is clearly a groupoid, which comes with an evident morphism of quivers.
The above sketched construction could be made more precise, but what really matters is the universal property it enjoys: the free groupoid is the universal (initial) groupoid mapping out of . By varying , the free groupoid yields a functor from directed graphs to groupoids, left adjoint to the forgetful functor.
This last conceptual characterization is best taken as the definition. Similarly, it is possible to construct the left adjoint to the forgetful functor from groupoids to categories, that is the free groupoid over a category.
The construction of free groupoids in “Topology and Groupoids” is by taking a disjoint union of copies of the unit interval groupoid and then identifying the vertices according to the scheme given by the directed graph.
See the paper by Crisp and Paris for an application of free groupoids.
For instance (Cote, theorem 2.3).
The fundamental group of the free groupoid of a graph with a single vertex is the free group on the set of edges of the graph. A result relevant to the Jordan Curve Theorem and the Phragmen-Brouwer Property is given in the Corrigendum referenced below. It gives conditions on a pushout of groupoids to contain a free groupoid as a retract.
Philip Higgins, Categories and groupoids, Van Nostrand Reinhold, 1971; Reprints in Theory and Applications of Categories, No. 7 (2005) pp 1-195 (pdf available)
Omar Antolin Camarena and Ronnie Brown, “Corrigendum to ”Groupoids, the Phragmen-Brouwer Property, and the Jordan Curve Theorem“, J. Homotopy and Related Structures 1 (2006) 175-183.” J. Homotopy and Related Structures (pdf)
J. Crisp, L. Paris, “The solution to a conjecture of Tits on the subgroup generated by the squares of the generators of an Artin group”, Invent. math. 145, 19–36 (2001).