quality:correction, information:filtering
Functoriality

If f: X → Y {\displaystyle f\colon X\to Y} is a continuous map, x 0 ∈ X {\displaystyle x_{0}\in X} and y 0 ∈ Y {\displaystyle y_{0}\in Y} with f (x 0) = y 0, {\displaystyle f(x_{0})=y_{0},} then every loop in X {\displaystyle X} with base point x 0 {\displaystyle x_{0}} can be composed with f {\displaystyle f} to yield a loop in Y {\displaystyle Y} with base point y 0. {\displaystyle y_{0}.} This operation is compatible with the homotopy equivalence relation and with composition of loops. The resulting group homomorphism, called the induced homomorphism, is written as π (f) {\displaystyle \pi (f)} or, more commonly,

This mapping from continuous maps to group homomorphisms is compatible with composition of maps and identity morphisms. In the parlance of category theory, the formation of associating to a topological space its fundamental group is therefore a functor

from the category of topological spaces together with a base point to the category of groups. It turns out that this functor does not distinguish maps that are homotopic relative to the base point: if f, g: X → Y {\displaystyle f,g:X\to Y} are continuous maps with f (x 0) = g (x 0) = y 0 {\displaystyle f(x_{0})=g(x_{0})=y_{0}}, and f and g are homotopic relative to { x }, then f = g. As a consequence, two homotopy equivalent path-connected spaces have isomorphic fundamental groups:

For example, the inclusion of the circle in the punctured plane

is a homotopy equivalence and therefore yields an isomorphism of their fundamental groups.

The fundamental group functor takes products to products and coproducts to coproducts. That is, if X and Y are path connected, then

and if they are also locally contractible, then

(In the latter formula, ∨ {\displaystyle \vee } denotes the wedge sum of pointed topological spaces, and ∗ {\displaystyle *} the free product of groups.) The latter formula is a special case of the Seifert–van Kampen theorem, which states that the fundamental group functor takes pushouts along inclusions to pushouts.