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 X with base point. Topological spaces with differing homotopy groups are never equivalent ( homeomorphic), but topological spaces that are not homeomorphic can have the same homotopy groups.
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
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
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.
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
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.
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 
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  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. 
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.
- 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:
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".  Given a topological space its n-th homotopy group is usually denoted by and its n-th homology group is usually denoted by
- Hopf fibration
- Hopf invariant
- Knot theory
- Homotopy class
- Homotopy groups of spheres
- Topological invariant
- Homotopy group with coefficients
- Pointed set
- Marie Ennemond Camille Jordan
- For a proof of this, note that in two dimensions or greater, two homotopies can be "rotated" around each other. See Eckmann–Hilton argument.
- see Allen Hatcher#Books section 4.1.
- Husemoller. Fiber Bundles. p. 89.
- Milnor, John (1956). "On manifolds homeomorphic to the 7-sphere". Annals of Mathematics. 64: 399–405.
- Ellis, Graham J.; Mikhailov, Roman (2010). "A colimit of classifying spaces". Advances in Mathematics. 223 (6): 2097–2113. arXiv: 0804.3581. doi: 10.1016/j.aim.2009.11.003. MR 2601009.
- Wildberger, N. J. (2012). "An introduction to homology".
- Ronald Brown, `Groupoids and crossed objects in algebraic topology', Homology, Homotopy and Applications, 1 (1999) 1–78.
- Ronald Brown, Philip J. Higgins, Rafael Sivera, Nonabelian algebraic topology: filtered spaces, crossed complexes, cubical homotopy groupoids, EMS Tracts in Mathematics Vol. 15, 703 pages, European Math. Society, Zürich, 2011. doi: 10.4171/083 MR 2841564
- Čech, Eduard (1932), "Höherdimensionale Homotopiegruppen", Verhandlungen des Internationalen Mathematikerkongress, Zürich.
- Hatcher, Allen (2002), Algebraic topology, Cambridge University Press, ISBN 978-0-521-79540-1
- "Homotopy group", Encyclopedia of Mathematics, EMS Press, 2001 
- Hopf, Heinz (1931), "Über die Abbildungen der dreidimensionalen Sphäre auf die Kugelfläche", Mathematische Annalen, 104 (1): 637–665, doi: 10.1007/BF01457962.
- Kamps, Klaus H.; Porter, Timothy (1997). Abstract homotopy and simple homotopy theory. River Edge, NJ: World Scientific Publishing. doi: 10.1142/9789812831989. ISBN 981-02-1602-5. MR 1464944.
- Toda, Hiroshi (1962). Composition methods in homotopy groups of spheres. Annals of Mathematics Studies. 49. Princeton, N.J.: Princeton University Press. ISBN 0-691-09586-8. MR 0143217.
- Whitehead, George William (1978). Elements of homotopy theory. Graduate Texts in Mathematics. 61 (3rd ed.). New York-Berlin: Springer-Verlag. pp. xxi+744. ISBN 978-0-387-90336-1. MR 0516508.