In the
n-sphere S^n we choose a base point
a. For a space
X with base point
b, we define \pi_n(X) to be the set of homotopy classes of maps f : S^n \to X \mid f(a) = b that map the base point
a to the base point
b. In particular, the equivalence classes are given by homotopies that are constant on the basepoint of the sphere. Equivalently, define \pi_n(X) to be the group of homotopy classes of maps g : [0,1]^n \to X from the
n-cube to
X that take the
boundary of the
n-cube to
b. For n \ge 1, the homotopy classes form a
group. To define the group operation, recall that in the
fundamental group, the product f\ast g of two loops f, g: [0,1] \to X is defined by setting (f * g)(t) = \begin{cases} f(2t) & t \in \left[0, \tfrac{1}{2} \right] \\ g(2t-1) & t \in \left[\tfrac{1}{2}, 1 \right] \end{cases} 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
nth 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 f, g : [0,1]^n \to X by the formula (f + g)(t_1, t_2, \ldots, t_n) = \begin{cases} f(2t_1, t_2, \ldots, t_n) & t_1 \in \left [0, \tfrac{1}{2} \right ] \\ g(2t_1-1, t_2, \ldots, t_n) & t_1 \in \left [\tfrac{1}{2}, 1 \right ] \end{cases} For the corresponding definition in terms of spheres, define the sum f + g of maps f, g : S^n\to X to be \Psi composed with
h, where \Psi is the map from S^n 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 n \geq 2, then \pi_n is
abelian. Further, similar to the fundamental group, for a
path-connected space any two choices of basepoint give rise to
isomorphic \pi_n. 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. == Long exact sequence of a fibration ==