In mathematics, **homotopy groups** are used in algebraic topology to classify topological spaces. The first and simplest homotopy group is the fundamental group, which records information about loops in a space. Intuitively, homotopy groups record information about the basic shape, or *holes*, of a topological space.

To define the *n*-th homotopy group, the base-point-preserving maps from an *n*-dimensional sphere (with base point) into a given space (with base point) are collected into equivalence classes, called **Homotopy classes.** Two mappings are **homotopic** if one can be continuously deformed into the other. These homotopy classes form a group, called the** n-th homotopy group**, of the given space

The notion of homotopy of paths was introduced by Camille Jordan.^{[1]}

In modern mathematics it is common to study a category by associating to every object of this category a simpler object that still retains sufficient information about the object of interest. Homotopy groups are such a way of associating groups to topological spaces.

That link between topology and groups lets mathematicians apply insights from group theory to topology. For example, if two topological objects have different homotopy groups, they can not have the same topological structure—a fact that may be difficult to prove using only topological means. For example, the torus is different from the sphere: the torus has a "hole"; the sphere doesn't. However, since continuity (the basic notion of topology) only deals with the local structure, it can be difficult to formally define the obvious global difference. The homotopy groups, however, carry information about the global structure.

As for the example: the first homotopy group of the torus is

because the universal cover of the torus is the Euclidean plane mapping to the torus Here the quotient is in the category of topological spaces, rather than groups or rings. On the other hand, the sphere satisfies:

because every loop can be contracted to a constant map (see homotopy groups of spheres for this and more complicated examples of homotopy groups).

Hence the torus is not homeomorphic to the sphere.

In the *n*-sphere we choose a base point *a*. For a space *X* with base point *b*, we define to be the set of homotopy classes of maps

that map the base point

For the homotopy classes form a group. To define the group operation, recall that in the fundamental group, the product of two loops is defined by setting

The idea of composition in the fundamental group is that of traveling the first path and the second in succession, or, equivalently, setting their two domains together. The concept of composition that we want for the *n*-th homotopy group is the same, except that now the domains that we stick together are cubes, and we must glue them along a face. We therefore define the sum of maps by the formula

For the corresponding definition in terms of spheres, define the sum of maps to be composed with *h*, where is the map from to the wedge sum of two *n*-spheres that collapses the equator and *h* is the map from the wedge sum of two *n*-spheres to *X* that is defined to be *f* on the first sphere and *g* on the second.

If then is abelian.^{[2]} Further, similar to the fundamental group, for a path-connected space any two choices of basepoint give rise to isomorphic ^{[3]}

It is tempting to try to simplify the definition of homotopy groups by omitting the base points, but this does not usually work for spaces that are not simply connected, even for path-connected spaces. The set of homotopy classes of maps from a sphere to a path connected space is not the homotopy group, but is essentially the set of orbits of the fundamental group on the homotopy group, and in general has no natural group structure.

A way out of these difficulties has been found by defining higher homotopy groupoids of filtered spaces and of *n*-cubes of spaces. These are related to relative homotopy groups and to *n*-adic homotopy groups respectively. A higher homotopy van Kampen theorem then enables one to derive some new information on homotopy groups and even on homotopy types. For more background and references, see "Higher dimensional group theory" and the references below.

Let be a basepoint-preserving Serre fibration with fiber that is, a map possessing the homotopy lifting property with respect to CW complexes. Suppose that *B* is path-connected. Then there is a long exact sequence of homotopy groups

Here the maps involving are not group homomorphisms because the are not groups, but they are exact in the sense that the image equals the kernel.

Example: the Hopf fibration. Let *B* equal and *E* equal Let *p* be the Hopf fibration, which has fiber From the long exact sequence

and the fact that for we find that for In particular,

In the case of a cover space, when the fiber is discrete, we have that is isomorphic to for that embeds injectively into for all positive and that the subgroup of that corresponds to the embedding of has cosets in bijection with the elements of the fiber.

When the fibration is the mapping fibre, or dually, the cofibration is the mapping cone, then the resulting exact (or dually, coexact) sequence is given by the Puppe sequence.

There are many realizations of spheres as homogeneous spaces, which provide good tools for computing homotopy groups of Lie groups, and the classification of principal bundles on spaces made out of spheres.

There is a fibration^{[4]}

giving the long exact sequence

which computes the low order homotopy groups of for since is -connected. In particular, there is a fibration

whose lower homotopy groups can be computed explicitly. Since and there is the fibration

we have for Using this, and the fact that which can be computed using the Postnikov system, we have the long exact sequence

Since we have Also, the middle row gives since the connecting map is trivial. Also, we can know has two-torsion.

Milnor^{[5]} used the fact to classify 3-sphere bundles over in particular, he was able to find Exotic spheres which are smooth manifolds called Milnor's spheres only homeomorphic to not diffeomorphic. Note that any sphere bundle can be constructed from a -vector bundle, which have structure group since can have the structure of an oriented Riemannian manifold.

There is a fibration

where is the unit sphere in This sequence can be used to show the simple-connectedness of for all

Calculation of homotopy groups is in general much more difficult than some of the other homotopy invariants learned in algebraic topology. Unlike the Seifert–van Kampen theorem for the fundamental group and the excision theorem for singular homology and cohomology, there is no simple known way to calculate the homotopy groups of a space by breaking it up into smaller spaces. However, methods developed in the 1980s involving a van Kampen type theorem for higher homotopy groupoids have allowed new calculations on homotopy types and so on homotopy groups. See for a sample result the 2010 paper by Ellis and Mikhailov.^{[6]}

For some spaces, such as tori, all higher homotopy groups (that is, second and higher homotopy groups) are trivial. These are the so-called aspherical spaces. However, despite intense research in calculating the homotopy groups of spheres, even in two dimensions a complete list is not known. To calculate even the fourth homotopy group of one needs much more advanced techniques than the definitions might suggest. In particular the Serre spectral sequence was constructed for just this purpose.

Certain homotopy groups of *n*-connected spaces can be calculated by comparison with homology groups via the Hurewicz theorem.

- The long exact sequence of homotopy groups of a fibration.
- Hurewicz theorem, which has several versions.
- Blakers–Massey theorem, also known as excision for homotopy groups.
- Freudenthal suspension theorem, a corollary of excision for homotopy groups.

There is also a useful generalization of homotopy groups, called relative homotopy groups for a pair where *A* is a subspace of

The construction is motivated by the observation that for an inclusion there is an induced map on each homotopy group which is not in general an injection. Indeed, elements of the kernel are known by considering a representative and taking a based homotopy to the constant map or in other words while the restriction to any other boundary component of is trivial. Hence, we have the following construction:

The elements of such a group are homotopy classes of based maps which carry the boundary into *A*. Two maps are called homotopic **relative to** *A* if they are homotopic by a basepoint-preserving homotopy such that, for each *p* in and *t* in the element is in *A*. Note that ordinary homotopy groups are recovered for the special case in which is the singleton containing the base point.

These groups are abelian for but for form the top group of a crossed module with bottom group

There is also a long exact sequence of relative homotopy groups that can be obtained via the Puppe sequence:

The homotopy groups are fundamental to homotopy theory, which in turn stimulated the development of model categories. It is possible to define abstract homotopy groups for simplicial sets.

Homology groups are similar to homotopy groups in that they can represent "holes" in a topological space. However, homotopy groups are usually not commutative, and often very complex and hard to compute. In contrast, homology groups are commutative (as are the higher homotopy groups). Hence, it is sometimes said that "homology is a commutative alternative to homotopy".^{[7]} Given a topological space its *n*-th homotopy group is usually denoted by and its *n*-th homology group is usually denoted by