In mathematics, specifically group theory, the **free product** is an operation that takes two groups *G* and *H* and constructs a new group *G* ∗ *H*. The result contains both *G* and *H* as subgroups, is generated by the elements of these subgroups, and is the “universal” group having these properties, in the sense that any two homomorphisms from *G* and *H* into a group *K* factor uniquely through a homomorphism from *G* ∗ *H* to *K*. Unless one of the groups *G* and *H* is trivial, the free product is always infinite. The construction of a free product is similar in spirit to the construction of a free group (the universal group with a given set of generators).

The free product is the coproduct in the category of groups. That is, the free product plays the same role in group theory that disjoint union plays in set theory, or that the direct sum plays in module theory. Even if the groups are commutative, their free product is not, unless one of the two groups is the trivial group. Therefore, the free product is not the coproduct in the category of abelian groups.

The free product is important in algebraic topology because of van Kampen's theorem, which states that the fundamental group of the union of two path-connected topological spaces whose intersection is also path-connected is always an **amalgamated free product** of the fundamental groups of the spaces. In particular, the fundamental group of the wedge sum of two spaces (i.e. the space obtained by joining two spaces together at a single point) is, under certain conditions given in the Seifert van-Kampen theorem, the free product of the fundamental groups of the spaces.

Free products are also important in Bass–Serre theory, the study of groups acting by automorphisms on trees. Specifically, any group acting with finite vertex stabilizers on a tree may be constructed from finite groups using amalgamated free products and HNN extensions. Using the action of the modular group on a certain tessellation of the hyperbolic plane, it follows from this theory that the modular group is isomorphic to the free product of cyclic groups of orders 4 and 6 amalgamated over a cyclic group of order 2.

If *G* and *H* are groups, a **word** in *G* and *H* is a product of the form

where each *s*_{i} is either an element of *G* or an element of *H*. Such a word may be **reduced** using the following operations:

- Remove an instance of the identity element (of either
*G*or*H*). - Replace a pair of the form
*g*_{1}*g*_{2}by its product in*G*, or a pair*h*_{1}*h*_{2}by its product in*H*.

Every reduced word is an alternating product of elements of *G* and elements of *H*, e.g.

The **free product** *G* ∗ *H* is the group whose elements are the reduced words in *G* and *H*, under the operation of concatenation followed by reduction.

For example, if *G* is the infinite cyclic group , and *H* is the infinite cyclic group , then every element of *G* ∗ *H* is an alternating product of powers of *x* with powers of *y*. In this case, *G* ∗ *H* is isomorphic to the free group generated by *x* and *y*.

Suppose that

is a presentation for *G* (where *S*_{G} is a set of generators and *R*_{G} is a set of relations), and suppose that

is a presentation for *H*. Then

That is, *G* ∗ *H* is generated by the generators for *G* together with the generators for *H*, with relations consisting of the relations from *G* together with the relations from *H* (assume here no notational clashes so that these are in fact disjoint unions).

For example, suppose that *G* is a cyclic group of order 4,

and *H* is a cyclic group of order 5

Then *G* ∗ *H* is the infinite group

Because there are no relations in a free group, the free product of free groups is always a free group. In particular,

where *F*_{n} denotes the free group on *n* generators.

Another example is the modular group . It is isomorphic to the free product of two cyclic groups:^{[1]}

The more general construction of **free product with amalgamation** is correspondingly a special kind of pushout in the same category. Suppose and are given as before, along with monomorphisms (i.e. injective group homomorphisms):

- and

where is some arbitrary group. Start with the free product and adjoin as relations

for every in . In other words, take the smallest normal subgroup of containing all elements on the left-hand side of the above equation, which are tacitly being considered in by means of the inclusions of and in their free product. The free product with amalgamation of and , with respect to and , is the quotient group

The amalgamation has forced an identification between in with in , element by element. This is the construction needed to compute the fundamental group of two connected spaces joined along a path-connected subspace, with taking the role of the fundamental group of the subspace. See: Seifert–van Kampen theorem.

Karrass and Solitar have given a description of the subgroups of a free product with amalgamation.^{[2]} For example, the homomorphisms from and to the quotient group that are induced by and are both injective, as is the induced homomorphism from .

Free products with amalgamation and a closely related notion of HNN extension are basic building blocks in Bass–Serre theory of groups acting on trees.

One may similarly define free products of other algebraic structures than groups, including algebras over a field. Free products of algebras of random variables play the same role in defining "freeness" in the theory of free probability that Cartesian products play in defining statistical independence in classical probability theory.